|

Use Firecrawl to scrape web pages into AI-readable Markdown: one local program, plus cloud search

Use Firecrawl to scrape web pages into AI-readable Markdown: one local program, plus cloud search

Your web page is open right there—so why is it that when you hand it straight to an AI agent, what it reads is usually navigation, scripts, and repeated footers? The problem is rarely the model. It’s the input: HTML is built for browsers to render, not for models to save tokens on. What Firecrawl does is turn the page into reasonably clean Markdown first, then let the agent read it, search it, or keep working with it.

This tutorial isn’t about “the more you scrape, the better.” It’s about dividing the work: for read-only pages your own machine can reach, use a local program; for search, hosted browsers, and scheduled monitoring, add the cloud; and only when you have compliance or infrastructure requirements should you consider self-hosting. By the end, you’ll have three takeaways: a clear picture of where the endpoints for the three run modes start and stop, commands you can use to scrape a page, crawl a site, and connect to an agent, and an understanding of how to hand the resulting Markdown to gpt-6-luna—along with the input, output, and cached-read pricing for that tier.

firecrawl-markdown-local-cloud-tutorial-en-image-0

3 Ways to Run Firecrawl: Local, Cloud, or Self-Hosted—Which One Should You Choose?

As read on 2026-12-04, the Firecrawl repository was created on 2024-04-15, its primary language is TypeScript, and the main repository is under AGPL-3.0; the README also notes that the SDK and some interfaces are under MIT. It splits its capabilities into two sides: one side lets agents search, read pages, and operate web pages; the other side calls Alexandria, which pulls from data providers for company registrations, court records, papers, and more. For the goal of “scraping web pages into Markdown,” start with this division-of-labor table.

Run mode Scraping and endpoints available Capabilities that only the cloud adds Prerequisites and boundaries
Firecrawl Local Scrape can produce Markdown, HTML, raw HTML, and links; supports Crawl, Map, and batch scraping; PDF and Office files are parsed locally; comes with MCP and a localhost API Search is routed to the cloud and can be used with rate limits even without logging in; Alexandria requires running firecrawl-local login first; Interact, Agent, and Monitor are cloud-only A single local program; JavaScript pages use an existing Chrome or Chromium; static pages still work without a browser, while pages that require a browser come back with a warning
Firecrawl Cloud Includes the same scraping and provides Search, Scrape, Crawl, Map, and Parse; Scrape adds structured JSON, summaries, screenshots, and browser actions Alexandria, Interact, Agent, and Monitor are all in the cloud, so you don’t need to maintain your own machine Use a cloud key against the https://api.firecrawl.dev/v2/ endpoint; good for search, multi-step operations after login, and continuous monitoring
Self-host Run the self-hosted scraping service from the repository’s apps/api Does not include Alexandria; Interact, Agent, and Monitor shouldn’t be expected to match cloud capabilities Beyond Docker Compose, you also need Redis, PostgreSQL, and a browser service; you’re responsible for the operational overhead

Local also has a default behavior that’s easy to overlook: if a single page can’t be fetched locally, it falls back to cloud scraping, and the source field in the result is marked firecrawl-cloud. That improves the success rate, but it doesn’t mean requests always stay local. If a page isn’t allowed to leave the current environment, set FIRECRAWL_CLOUD=off so all scraping stays local.

firecrawl-markdown-local-cloud-tutorial-en-image-1

Keyless also needs to be understood separately according to the two source texts. The README says no registration and no key are required, and MCP, CLI, and API get 1000 credits per month; the official site’s llms.txt describes Keyless as a rate-limited tier, listing Search, Scrape, and Parse on MCP, while CLI also has Interact. Don’t merge them into a claim that “every client can call every endpoint without a key”; what the current client and API return is authoritative. No matter which run mode you use, robots.txt is respected by default, and you still need to verify the target site’s rules and access permissions yourself.

Firecrawl Local Quick Start: From Scraping 1 Page to Crawling 50 Pages

If you want to see whether the output works for your agent before building the full service, you don’t have to start with a complete setup. Before signing up, you can run npx -y firecrawl-cli@latest scrape with a URL and inspect the scraped result. If you plan to use the local program long-term, install it with cargo install firecrawl-local; that requires Rust. On macOS, run xcode-select --install first.

How to Use Scrape, Crawl, and Map in Firecrawl Local

Once it’s installed, the three commands map to “read one page, crawl a site, list URLs only.” The first is firecrawl-local scrape 网址 --markdown, which is handy for handing a single page to a model. The second is firerawl-local crawl 网址 --limit 50 --out 目录, which is handy for batch-saving at a bounded scale. The third is firecrawl-local map 网址; it only discovers URLs and doesn’t fetch page content, so it’s useful for checking a site’s scope before deciding which pages are worth putting into context.

I’d recommend always keeping a boundary like --limit. A successful scrape doesn’t mean everything should go into the model—index pages, tag pages, and repeatedly updated pages can still generate a lot of low-value tokens. A safer sequence is to use Map first to inspect the structure, then Crawl a small batch and save it, and finally strip navigation, footers, and duplicate sections at the application layer, sending only the Markdown relevant to the question to the model.

How to Connect Firecrawl Local to MCP and the localhost API

If your agent is already installed locally, run firecrawl-local init. It looks for Claude Code, Claude Desktop, Cursor, Windsurf, Gemini CLI, and Codex, and backs up configs before changing them. MCP requires Node.js 22 or newer, and you’ll need to restart the agent after the changes. If you want to connect all the cloud tools, use npx -y firecrawl-cli@latest init --all --browser.

Developers who prefer the SDK can run firecrawl-local serve. The local API runs on port 3002, and local routes don’t need a key—just set the SDK’s API URL to http://localhost:3002. At this point, scraping, saving, and agent integration form a closed loop, but we still haven’t answered “who reads the scraped text, and how much each read costs?”

Quick Start Tip: Once you’ve got the Markdown, don’t rush to switch to a bigger model. Try summarizing or asking questions over the same batch of pages, and compare token usage before and after cleaning. APIYI apiyi.com offers a unified model API and free trial credits—great for validating this reading pipeline before you decide whether to expand the crawl.

Firecrawl Cloud Adds Search: 8 Endpoint Types, Credits, and 2 Sets of Official Speed Numbers

The local setup handles “I know exactly which page or site I want,” while the cloud fills in “find the page first, then keep working once you’ve found it.” It’s not simply a matter of fast vs. slow — the endpoint boundaries are worth looking at before the benchmark numbers.

How Firecrawl Cloud’s 8 Endpoint Types Divide the Work

  • Search: Returns the body text of result pages in one call — good for finding material first, without needing a full URL list ready in advance.
  • Scrape: Turns a URL into Markdown, HTML, a screenshot, or structured JSON — the main entry point for reading a single page.
  • Crawl: Recursively crawls a site, with limits on paths and depth — good for docs sites, help centers, and other content with clear boundaries.
  • Map: Lists only URLs without fetching page bodies — good for scoping out the surface area and keeping budgets in check.
  • Parse: Handles PDFs, DOCX files, and other documents, so you don’t have to shove all the parsing work into the model.
  • Interact: Uses a managed browser to click, fill out forms, and complete multi-step flows — for tasks where page interaction has to happen.
  • Agent: Give it a single sentence and no URL — the cloud runs a more open-ended search process.
  • Monitor: Runs scheduled checks by page, by crawl, or by search, then notifies you of changes via webhook, email, or Slack.

So “searching the whole site” doesn’t mean “Crawl the whole site first.” If the goal is just to find a specific answer, Search or Agent is often more direct. It’s only when you want to keep the body text of a batch of pages around long-term and ask questions against it repeatedly that it’s worth scraping it into your own Markdown first.

How Firecrawl Cloud Credits Are Deducted

The prices below come from the Firecrawl pricing page, which lists an effective date of 2026-09-04 and uses USD. The credit rules most likely to affect your budget are whether billing is per result, per page, or per browser minute, along with the extra charges for enhanced fields.

Billing item Official deduction rule What to watch for in budgeting
Free tier 1,000 credits per month, no credit card required Keep this separate from the wording in the Keyless README
Scrape, Crawl 1 credit per page Crawl page counts directly multiply consumption
Map 1 credit per call Only lists URLs; not the same as fetching page body
Search 2 credits per 10 results The number of results affects cost
Interact 2 credits per browser minute Estimate multi-step operations by duration
Monitor 1 credit per page per check Check frequency and page count are billed together
JSON, Question, Highlight Add 4 credits per page on top of Scrape, Crawl Structured extraction can’t be estimated at the base page price alone
Agent 5 free runs per day during preview; otherwise dynamic pricing Not suitable for applying a fixed per-page price

Scrapes that return no results don’t cost credits, but a 403 or 404 response still costs 1 credit. The annualized monthly prices for the plans are: Hobby at $16 per month when billed annually, or $19 when billed monthly, including 5,000 credits; Standard at $83 per month when billed annually, or $99 when billed monthly, including 100,000 credits; Growth at $333 per month when billed annually, or $399 when billed monthly, including 500,000 credits; Scale at $599 per month when billed annually, or $749 when billed monthly, including 1,000,000 credits. Concurrent browsers are 2 on the Free tier, 5 on Hobby, 25 on Standard, 50 on Growth, and 100 on Scale.

Firecrawl’s Self-Reported 37x, 230x, and 11 MB

The local release notes from November 18, 2026 throw out some eye-catching numbers. They’re all vendor-reported — we didn’t measure any of them here. The page doesn’t say which pages were tested, on what machine, or how many runs, so you can’t stitch them into a tidy-looking benchmark suite.

Vendor-reported metric Value Comparison given on the page
Rust crawl speed 37x faster vs. self-hosted
Memory usage 230x less vs. self-hosted
Idle memory 11 MB Firecrawl Local at idle

These numbers do show how much the project cares about staying light on your own machine, but they aren’t enough on their own to predict how long your crawl will take. The 37x page in particular gives no test method, so it shouldn’t be mixed with the next set of figures as if it were one experiment.

Firecrawl’s Self-Reported 20x, 550 ms, and 9x

The local crawling notes from December 2, 2026 list another batch of vendor-reported data, and this time they spell out page counts, run counts, and some environment details. It’s a different experiment from the 37x on November 18, and the scenario is closer to sustained crawling.

Vendor-reported metric Value Method stated on the page
Local crawl speed 20x faster Local: 577 pages crawled, median 1.68 s; self-hosted: 566 pages, 34.5 s; 3 runs each with default settings
100 pages of local Python docs 550 ms 5 runs came in between 0.53 and 0.56 s
Peak memory 9x less Local: roughly 0.5 to 0.7 GB; self-hosted: roughly 6.3 to 6.7 GB

When you cite these numbers, keep both “vendor-reported” and the date attached. What actually shapes your experience also includes the target site’s response time, where your network sits, whether you need a browser, and whether you’re hoarding a pile of irrelevant pages along the way.

firecrawl-markdown-local-cloud-tutorial-en-image-2

Who Reads It After Scraping: Feeding Markdown into gpt-6-luna

Markdown is just an intermediate format — its real value is realized at the reading stage. For summarization, field extraction, and document Q&A, you can have the model process the cleaned body text first, then keep the original URL and scrape results around for later verification. Don’t expect “converting to Markdown” to automatically eliminate all noise — it simply makes downstream chunking, deduplication, and citation easier.

How to hand Firecrawl’s Markdown over to gpt-6-luna

As of 2026-12-04, the model list at APIYI (apiyi.com) includes gpt-6-luna, typed as text with pay-as-you-go billing. When integrating, prefer the responses endpoint; chat also works. A minimal call breaks down into three steps: install the client with pip install openai, initialize client = openai.OpenAI(api_key="YOUR_API_KEY", base_url="https://api.apiyi.com/v1"), then run client.responses.create(model="gpt-6-luna", input=markdown_text).

If you need to make the task explicit, you can write input as "Please answer only based on the web page Markdown below, and preserve the cited URLs:\n" + markdown_text. If you switch to the chat interface, the model ID and key stay the same, and you still use base_url="https://api.apiyi.com/v1" — only the request method and message structure are organized according to that interface. The available groups are CodexResponses, Codex_Reverse, Default, and SVIP.

Pricing and licensing for Firecrawl feeding into gpt-6-luna

gpt-6-luna pricing should only be taken from the platform’s model list — don’t add a context length, and don’t apply another model’s tier structure. The list’s base-tier prices are as follows; cached reads suit scenarios where the same prefix content is reused, though whether a cache hit actually occurs still depends on the actual request.

Billing dimension Price or rule Applicability
Input, 0 to 272000 tokens $0.1 / million tokens Pay-as-you-go
Input, over 272000 tokens $0.2 / million tokens Calculated at the corresponding tier after exceeding the threshold
Output, base tier $0.5 / million tokens The list states the output price equals the corresponding tier’s input price multiplied by the output multiplier
Cached read $0.01 / million tokens Suits reusable input content

From the base-tier input and output prices, you can see the output multiplier is 5x; converted per the list’s rules, the high-tier output corresponds to $1.0 / million tokens. For example, 100k tokens of input and 10k tokens of output come to about $0.015 at the base tier, not counting caching or other factors. When integrating through APIYI apiyi.com, you can first compare the usage of “raw HTML” versus “cleaned Markdown” on a small batch, then decide on the Crawl scale.

On licensing, you need to distinguish two layers: the Firecrawl repository core is AGPL-3.0, while the SDK and some of the UI are MIT; model invocation is a separate interface protocol entirely. APIYI apiyi.com uses an OpenAI-compatible approach, and the list recommends that GPT-5 and later go through /v1/responses where possible, which lets you use reasoning and tools at the same time — including web search. It’s not the same thing as Firecrawl: if all you want is for the model to search the web for a single sentence, you can use the model’s built-in search; if you want to capture a page into Markdown that you can hold onto and reprocess repeatedly, reach for Firecrawl first.

3 Boundaries for Firecrawl: When You Shouldn’t Force a Scrape

First, when the model only needs to search a single query itself. If the question doesn’t require a fixed page archive, turning on model-side search is the shorter path. Firecrawl’s value lies in preserving page content and keeping control over downstream processing — not in replacing every kind of search.

Second, when the page requires login or involves sensitive operations. Local Scrape isn’t a general-purpose login solution. If you genuinely need clicks, form filling, and multi-step flows, you can evaluate cloud Interact — but still confirm authorization, the site’s terms, and your data boundaries. Don’t read “can operate a browser” as “can bypass access controls.”

Third, when the goal is just to find one answer across an entire site. In that case, crawling the whole site first usually means paying credits and tokens for pages you don’t need. Start with Search to grab the body text of the result pages, or use Map to see the URL scope. Only move to bulk scraping once you’ve confirmed you’ll read, cite, and update that body of content over the long term.

Firecrawl Frequent Questions (FAQ)

Q1: What’s the difference between the local Firecrawl app and self-hosting?

The local app focuses on a single program, clean Markdown, MCP, and a localhost API. Self-hosting centers on `apps/api`, and you also need to prepare Docker Compose, Redis, PostgreSQL, and a browser service. Self-hosting doesn’t include Alexandria, and you’re responsible for operations yourself.

Q2: If local Firecrawl can’t fetch a page, does it fall back to the cloud?

Yes. When a single page can’t be opened locally, it defaults to fetching from the cloud, and the result’s `source` is marked as `firecrawl-cloud`. If you require that requests never leave your machine, set `FIRECRAWL_CLOUD=off`.

Q3: Are Keyless and the free tier the same thing in Firecrawl?

Don’t merge them. The README says Keyless needs no signup and no key, with 1000 credits per month for MCP, CLI, and API; `llms.txt` describes a rate-limited tier and different client endpoints. The pricing page’s free tier is 1000 credits per month with no credit card required.

Q4: How do I handle pages that need JavaScript or login?

JavaScript pages can use an existing local Chrome or Chromium. Without a browser, static pages still work, and pages that need a browser come back with a warning. When you must click and fill forms, evaluate cloud Interact — and confirm access authorization first.

Q5: Does Firecrawl still charge credits for a 403 or 404?

The pricing page states that scrapes with no result aren’t charged, but returning `403` or `404` still costs 1 credit. Batch jobs should log status codes so you don’t keep re-queueing invalid pages.

Q6: Once the Markdown is scraped, how do I call gpt-6-luna?

You can get a key and free test credits at apiyi.com, use the `responses` call style from this article, and set the model to `gpt-6-luna`. I’d recommend passing only the relevant body text and the source URLs; for model versions and pricing, refer to the platform’s model list.

Q7: I already have model web search — do I still need Firecrawl?

If you’re only searching a single query and don’t need to save the body text, you can skip it. But if you want to turn specific pages into your own Markdown for multi-turn Q&A, chunking, and auditing, Firecrawl still handles a different kind of collection work.

Q8: Why not crawl the whole site first when searching a site?

Because you may end up paying credits and downstream tokens for a large number of irrelevant pages. Search can return the body text of result pages in one go, and Map can list URLs first. Once you’ve confirmed you need to keep that whole batch of body text long-term, then run Crawl with path and depth limits.

Key points for scraping web pages with Firecrawl

  • Split by run mode first: local mode handles specific pages and local Markdown, the cloud fills in search and browser capabilities, and self-hosting means you own the infrastructure yourself.
  • Mind the default fallback: a failed single-page run locally may get routed to the cloud, and the result’s source field shows where it came from — turn it off with FIRECRAWL_CLOUD=off when you need to.
  • Let the command set the scope: Scrape reads a single page, Crawl crawls a site within limits, Map only lists URLs — don’t confuse how much you scrape with how much you read.
  • Keep the speed numbers in context: 37x, 230x, and 11 MB, versus 20x, 550 ms, and 9x, are two separate sets of vendor-reported figures — not results from the same experiment.
  • Budget reading by token: clean the Markdown before handing it to gpt-6-luna, and take input, output, and cached-read pricing from the platform’s master price sheet.

Summary

The point of using Firecrawl to turn web pages into AI-readable Markdown isn’t to rank local, cloud, and self-hosted as good-better-best tiers — it’s to divide the work by task: the local program is great for quick page scrapes, site crawls, and MCP hookups; the cloud fills in Search, Alexandria, Interact, Agent, and Monitor; and self-hosting suits people who are willing to maintain apps/api, Redis, PostgreSQL, and browser services themselves.

Before you actually go to production, run two cost calculations. The first is Firecrawl credits — estimate by page, by result, or by browser minute, and pay attention to how 403, 404, and structured fields are billed. The second is model tokens — deduplicate and trim first, then compare the cost of different reading models. To validate summarization or Q&A quality in small batches with gpt-6-luna, we recommend going through APIYI at apiyi.com; model names and pricing follow the platform’s model list.

References

  1. Firecrawl official repository: source code, README, the three ways to run it, and licensing details
    Link: github.com/firecrawl/firecrawl

  2. Firecrawl product introduction: what search, page reading, page actions, and Alexandria can and can’t do
    Link: docs.firecrawl.dev/introduction

  3. Firecrawl cloud capabilities index: endpoint descriptions for Search, Scrape, Crawl, Map, Parse, and more
    Link: firecrawl.dev/llms.txt

  4. Firecrawl pricing page: credits, plans, concurrency, and effective dates
    Link: firecrawl.dev/pricing

  5. Firecrawl Local release notes: the official self-reported 37x, 230x, and 11 MB figures from 2026-11-18
    Link: firecrawl.dev/changelog/firecrawl-local

  6. Firecrawl Local Crawl documentation: the 20x, 550 ms, 9x, and testing methodology from 2026-12-02
    Link: firecrawl.dev/changelog/firecrawl-local-crawl

  7. APIYI model list: availability status, API endpoints, and token pricing for gpt-6-luna
    Link: docs.apiyi.com/models.md


Author: APIYI Team
Technical discussion: For more model integration resources, visit the APIYI documentation center. For scraping and model pricing, please refer to the latest information on the corresponding official pages.

Related Articles

Similar Posts