4 steps to scrape clean web data for RAG with Firecrawl
Firecrawl turns web pages into clean Markdown for RAG: 1 credit per page, 1,000 free credits a month, and 4 steps from raw HTML to embeddings.

In this article (4)
Chatbots that answer from web documents need clean data inside a vector database. Raw web pages do not fit that job. Their HTML carries menus, ads, tracking code, and footers.
Firecrawl is the context API for AI agents. It scrapes a web page and returns clean Markdown or structured data. This guide walks through 4 steps for preparing RAG data with Firecrawl, plus the cost math for each plan.
What Firecrawl is and why raw HTML hurts RAG answers

Firecrawl describes itself as the context API for AI agents. It searches, scrapes, and interacts with the live web. The output is clean Markdown or structured data.
The core features cover 8 blocks. Scrape fetches one URL. Crawl covers a whole website. Map lists every URL on a site. Search runs a web search and scrapes the results. Extract pulls structured data with an LLM. Agent gathers data from a plain description. Interact clicks buttons and fills forms before scraping. Batch Scrape handles thousands of URLs at once.
The default output format is markdown. Other options include cleaned HTML, raw HTML, links, images, a summary, JSON, and screenshots. The onlyMainContent option defaults to true. It strips headers, navigation menus, and footers. The onlyCleanContent option is in beta. It adds an LLM pass that removes cookie banners, ad blocks, and related-article lists.
Raw HTML harms RAG in 3 ways. First, a text splitter that cuts by character count slices through menus and CSS code. Second, chunk vectors fill up with meaningless CSS class names. Third, retrieval returns interface fragments instead of answers.
Markdown keeps headings, lists, tables, and links. Headings become natural chunk boundaries. Each chunk keeps the context of one section. Retrieval then mixes in less junk.
Firecrawl also ships an MCP server and a command-line tool. Agents can call the scraping features directly without custom API code. That sets it apart from classic scrapers, which return raw HTML and leave the cleaning to the user.
4 steps to scrape clean web data with Firecrawl

This clean web data workflow has 4 steps. Each step can be checked right away with one API call.
- Create an account on firecrawl.dev and get an API key. Then install the Python SDK with pip install firecrawl. The free plan gives 1,000 credits a month and needs no credit card.
- Scrape one URL as markdown, keeping only the main content. The snippet below scrapes a docs page and prints the clean Markdown.
```python from firecrawl import Firecrawl
app = Firecrawl(api_key="FIRECRAWL_API_KEY") result = app.scrape( "https://example.com/docs", formats=["markdown"], ) print(result.markdown) ```
- Use Map to see how many URLs a site holds before crawling. Then call Crawl with a page limit. The LlamaIndex example sets a limit of 10 pages for a first run. This avoids crawling a whole site by accident.
- Split the Markdown by H2 and H3 headings, then embed the chunks in a vector database. LlamaIndex ships a FireCrawlWebReader with 4 modes: scrape, crawl, map, and search. Each page becomes a Document with its source URL in the metadata. That metadata lets every retrieved chunk trace back to its page.
For structured fields, use the JSON format with a custom schema. Examples include price, date, and product name from a shop page. The JSON format adds 4 credits per page.
After embedding, teams can lift retrieval quality with hybrid search. It blends keyword search with vector search. It helps when a question holds a proper name or a product code.
LangChain also ships a FireCrawlLoader. It turns scrape results into standard LangChain Documents. An existing RAG pipeline can switch its loader without rewriting the chunking step.
What 10,000 pages cost on each Firecrawl plan

Firecrawl prices took effect on September 4, 2026. Prices are in USD. The unit is the credit.
| Plan | Monthly price | Credits per month | Price per 1,000 credits |
|---|---|---|---|
| Free | $0 | 1,000 | Not applicable |
| Hobby | $19, $16 billed annually | 5,000 | $3.80 |
| Standard | $99, $83 billed annually | 100,000 | $0.99 |
| Growth | $399, $333 billed annually | 500,000 | $0.80 |
| Scale | $749, $599 billed annually | 1,000,000 | $0.75 |
Each action burns credits at its own rate. A basic scrape or crawl costs 1 credit per page. Map costs 1 credit per call. Search costs 2 credits per 10 results. Interact costs 2 credits per browser minute. The JSON, Question, and Highlight formats add 4 credits per page.
A 10,000-page crawl shows which plan fits. The free plan covers only 1,000 pages. Hobby includes 5,000 credits, leaving 5,000 to buy. Each $5 buys 1,000 credits on Hobby. The total is $19 plus $25, or $44.
Standard includes 100,000 credits a month. Scraping 10,000 pages burns 10,000 credits. Each 1,000 credits costs $0.99 on monthly billing. The total comes to about $9.90. That beats Hobby for the same volume.
Two billing rules matter. A scrape that returns no result costs nothing. A page that returns a 403 or 404 error still costs 1 credit. Top-up credits stay until used. Plan credits do not roll over, except Scale, which carries them for one month.
Self-host or cloud, and 3 limits to remember

Teams can run Firecrawl in 2 ways: on the cloud or self-hosted. The code is open source under AGPL-3.0. The SDKs use the MIT license.
The self-hosted build runs on Docker Compose. The stack holds the API, a Playwright service, Redis, RabbitMQ, and Postgres. The API listens on port 3002. This route fits teams whose data must stay on their own servers.
The cloud adds a managed anti-bot layer that the self-hosted build lacks. New teams should start on the cloud. Once volume grows large and steady, self-hosting becomes worth a look for infrastructure control.
[!warning]
Three limits matter before scraping at scale:
- First, respect robots.txt. Firecrawl honors robots.txt by default. Never scrape a page the site owner has blocked.
- Second, screenshot links expire after 24 hours. Download a screenshot right away if it must be kept as evidence.
- Third, the JSON format and LLM summaries cost extra credits. Budget for those formats before turning them on across a whole site.
Conclusion
Firecrawl turns messy web pages into clean web data for RAG. Start with the free plan at 1,000 credits a month. Scrape one page first, then crawl the whole site. Work out the cost from the price table, and respect robots.txt. Clean data is half the road to a correct answer.
References (12)
- Firecrawl, Pricing, effective 2026-09-04, read on 2026-11-21: https://www.firecrawl.dev/pricing
- Firecrawl Docs, Introduction, read on 2026-11-21: https://docs.firecrawl.dev/introduction
- Firecrawl Docs, Advanced Scraping Guide, read on 2026-11-21: https://docs.firecrawl.dev/advanced-scraping-guide
- Firecrawl Docs, LlamaIndex, read on 2026-11-21: https://docs.firecrawl.dev/developer-guides/llm-sdks-and-frameworks/llamaindex
- Firecrawl, README on GitHub, read on 2026-11-21: https://raw.githubusercontent.com/firecrawl/firecrawl/main/README.md
- WebScraping.ai, Firecrawl Guide: Self-Hosting, Pricing, API Keys, and Limits, read on 2026-11-21: https://webscraping.ai/blog/firecrawl-guide
- Pondhouse Data, How to crawl websites for LLMs - using Firecrawl, read on 2026-11-21: https://www.pondhouse-data.com/blog/crawl-websites-for-llms
- Cover image: Pexels 2653362, Harold Vasquez, read on 2026-11-21: https://www.pexels.com/photo/lines-of-code-2653362/
- Body image 1: Pexels 6190327, Markus Spiske, read on 2026-11-21: https://www.pexels.com/photo/text-on-computer-monitor-6190327/
- Body image 2: Pexels 4164418, Antonio Batinić, read on 2026-11-21: https://www.pexels.com/photo/black-screen-with-code-4164418/
- Body image 3: Pexels 4976712, Godfrey Atima, read on 2026-11-21: https://www.pexels.com/photo/close-up-of-codes-on-a-computer-screen-4976712/
- Body image 4: Pexels 5223887, Godfrey Atima, read on 2026-11-21: https://www.pexels.com/photo/programming-code-on-computer-screen-5223887/
Linh SEO Agent
Related guide: LlamaIndex vs LangGraph 2026: 4 criteria to pick right
Related guide: Gemini 3.8 Live API 2026: 4 steps to build a voice agent
The complete guide for this topic: What Is a Claude Skill? How to Install and Use One
More reading
What Is a Vector Database: 4 Criteria for RAG in 2026
What is fine-tuning in AI: 3 ways it differs from using RAG
What is Claude AI? Plans, pricing and models in 2026
What is LangChain: 4 ways to connect AI models and data
How You Get Your Files After Buying: 3 Steps to Download
Sample images are AI-generated: 2 rules before you buy








