🎉 Premium Proxies · 24-Hour Free TrialClaim Now
Comparisons

Crawl4AI vs Firecrawl vs Scrapy: The Output Contract

Crawl4AI vs Firecrawl vs Scrapy, compared on output contract: token counts we measured per page, prices published October 2026, and what markdown drops.

S SparkProxy 14 32 min read
Share
Crawl4AI vs Firecrawl vs Scrapy: The Output Contract

Crawl4AI vs Firecrawl usually gets asked as though the two were rival products in one category, with Scrapy bolted on as the legacy option. Three genuinely different things are on the table: a self-hosted Python library, a hosted API billed per page, and a framework you build a crawler inside. What separates them in production is not the feature grid. It is the output contract, and what that output costs once a language model has to read every token of it.

Every price, version number, star count and default setting below was read from the project's own page, documentation or repository on 2026-10-09, in US dollars. The token counts are ones we measured ourselves, and the method is described so you can rerun it. Crawl4AI's hosted service is in soft launch and says so on its own pricing page, so treat its numbers as the most volatile here.

A library, a hosted API, and a framework

Start by separating the categories, because almost every comparison of these three quietly treats them as interchangeable and then argues about speed.

Crawl4AI is a Python library you install and run on your own machines. pip install -U crawl4ai followed by crawl4ai-setup, per its README. Its PyPI metadata for version 0.9.4 lists 54 dependency entries, among them playwright>=1.49.0, patchright>=1.49.0 and playwright-stealth>=2.0.0. That dependency list tells you what the library is: a browser automation stack with a markdown generator stapled to the front. There is now also a hosted Crawl4AI Cloud, launched on the repository's main branch in a commit dated 2026-10-05, but the library came first and still runs standalone. Its own site puts it plainly: "It's Apache-2.0. pip install crawl4ai, point it at your own boxes and proxies. No gate, no token. It's yours."

Firecrawl is a hosted API first. You send a POST to https://api.firecrawl.dev/v2/scrape with a bearer token and get a document back. The code is public under AGPL-3.0 and can be self-hosted, but the self-host documentation is candid that this is a reduced product, which we cover below. The commercial shape is a credit meter: "1 credit = 1 page on a basic scrape, crawl, or map," per the pricing page.

Scrapy is a framework. You do not call Scrapy; Scrapy calls your code. You write a spider class, define what an item looks like, and the framework supplies the scheduler, the duplicate filter, the retry middleware, the throttling, and the feed exporters. Its PyPI metadata for 2.19.0 lists 24 runtime dependencies: twisted, lxml, parsel, w3lib, queuelib, protego, cryptography and friends. There is no browser anywhere in that list, which is the single most important structural fact about Scrapy and the reason it costs so little per page.

So the real question is not which is best. It is which layer you want to own. Firecrawl owns the fetch, the render and the conversion, and hands you text. Crawl4AI hands you the same kind of text but makes you own the machines, unless you buy the cloud version. Scrapy owns none of the fetching politics and all of the structure, and expects you to define what the data means.

If you are weighing a hosted crawler against building the pipeline, our write-up on web scraping vs API covers the build-versus-buy framing at the data-source level, and web scraping vs web crawling separates discovery from fetching, which is where most cost surprises originate.

Crawl4AI vs Firecrawl: the output contract

Here is the axis that matters.

Crawl4AI and Firecrawl both promise markdown. Crawl4AI's README describes "LLM-ready output: smart Markdown with headings, tables, code and citation hints." Firecrawl's v2 scrape endpoint defaults its formats parameter to ["markdown"]. Both are selling the same contract: give us a URL, get back prose a model can read without you writing a single selector.

Scrapy sells the opposite contract. You get exactly the fields you asked for, and nothing else. From the official Scrapy tutorial:

def parse(self, response):
    for quote in response.css("div.quote"):
        yield {
            "text": quote.css("span.text::text").get(),
            "author": quote.css("small.author::text").get(),
            "tags": quote.css("div.tags a.tag::text").getall(),
        }

Three keys. That is the whole output. Nothing about the navigation bar, the cookie banner, the pagination widget or the footer survives, because you never asked for it.

The markdown contract is a bet that a model reading a whole page is cheaper than an engineer writing selectors. That bet is sometimes right, and the cases where it is right are specific: the page structure changes often, you do not know in advance which fields you need, or you are building retrieval rather than a table. The bet is wrong whenever you know the schema, because then you are paying a model to rediscover it on every page, forever.

Both contracts have a measurable price. Markdown costs tokens. Selectors cost engineering hours and break when the DOM changes. The rest of this post puts numbers on the first half of that trade, because the first half is the half nobody quantifies.

Free trial

Scraping at scale? Skip the blocks.

Fast, unblockable datacentre proxies with unlimited bandwidth.

Token counts we measured on three real pages

We ran this ourselves on 2026-10-09. Here is exactly what we did, so you can judge it and repeat it.

We fetched three public pages with curl and a desktop user-agent: quotes.toscrape.com/page/1/ (the target the official Scrapy tutorial uses), news.ycombinator.com/ (a thirty-item list page), and the books.toscrape.com mystery category listing (twenty product cards). For each page we produced three artifacts:

  1. Raw HTML, as served.
  2. Markdown, via Turndown 7.2.4 plus joplin-turndown-plugin-gfm, with script, style, noscript, svg, link, meta, nav, header, footer and form removed first. That converter pair is not our invention: apps/api/package.json in the Firecrawl repository declares "turndown": "^7.1.3" and "joplin-turndown-plugin-gfm": "^1.0.12". So this is Firecrawl's declared converter, run locally by us.
  3. Targeted item extraction, using lxml with CSS selectors through cssselect, serialised as compact JSON. For the quotes page we used the selectors printed in the Scrapy tutorial verbatim.

Token counts came from tiktoken 0.14.0 with the o200k_base encoding.

PageRecordsHTML bytesHTML tokensMarkdown tokensTargeted JSON tokensMarkdown ÷ JSON
quotes.toscrape.com/page/1/1011,0642,9078604202.05x
news.ycombinator.com/3034,49311,7124,4131,3573.25x
books.toscrape.com (mystery, page 1)2050,3889,6733,0649813.12x

Two reductions compound here, and they are roughly equal in size.

Markdown conversion cuts the HTML token count to between 29.6% and 37.7% of the original across the three pages. That is the value Crawl4AI and Firecrawl are selling, and it is real: feeding raw HTML to a model is wasteful and nobody sensible does it.

Targeted extraction then cuts the markdown count again, to between 30.8% and 48.8%. The combined effect is that the Scrapy-style output is 10.1% to 14.4% of the raw HTML token count. On the Hacker News front page, markdown is 3.25 times the tokens of the thirty records it contains.

Converting those ratios to money needs a real token price. Claude Sonnet 5.5 input is listed at "$2 / MTok" on Anthropic's pricing page, and gpt-5-mini input at $0.25 per 1M tokens on OpenAI's. Per 1,000 pages of the books listing:

Input fed to the modelTokens per 1,000 pagesAt $2.00/MTokAt $0.25/MTok
Raw HTML9,673,000$19.35$2.42
Markdown (Turndown + GFM)3,064,000$6.13$0.77
Targeted JSON items981,000$1.96$0.25

The markdown-to-JSON gap on that page is $4.17 per 1,000 pages at Sonnet 5.5 input rates, and $0.52 at gpt-5-mini rates. On the Hacker News page the gap is $6.11 and $0.76 respectively.

Hold on to a detail: these are input token prices for a single pass. A RAG pipeline that chunks, embeds, reranks and then stuffs context will touch the same tokens several times. Multiply accordingly, because the ratio is what survives the multiplication.

One honest limitation. We did not run Crawl4AI's own DefaultMarkdownGenerator, nor Firecrawl's hosted pipeline. Crawl4AI's documentation describes a second output, fit_markdown, produced by a content filter: in the v0.9.4 source, PruningContentFilterLXML takes threshold_type="fixed" and threshold=0.48, and BM25ContentFilter takes bm25_threshold=1.0, language="english" and use_stemming=True. The docs say the filtered version can be fed "into a vector database to reduce token usage." Those filters would push the markdown number down, and by how much depends entirely on your pages. The direction of the gap would not change: a filter that keeps the readable page still keeps far more than five JSON fields.

What the markdown quietly drops

Token count is the cost you can see. The losses are the cost you find later. These are things we observed in the converted output, not things we assume.

Attribute-only data disappears. On books.toscrape.com, the star rating of each product exists nowhere in the visible text. It lives in a class name: class="star-rating Four", class="star-rating One". Searching the converted markdown for any rating value returns zero matches, for all twenty products. The targeted extraction picks it up in one line, because it reads the attribute:

rating = pod.cssselect("p.star-rating")[0].get("class").split()[-1]

Any data the page encodes in a class, a data-* attribute, an itemprop, a content= value or an aria-label is invisible to a markdown converter by design. Prices in data-price, stock state in a CSS class, variant IDs in data-sku, sort order in data-index: all gone.

Machine timestamps become human ones. Hacker News publishes the exact posting time in an attribute: . The markdown keeps only the rendered text, so what reaches the model is "1 hour ago". You cannot recover the ISO timestamp, and "1 hour ago" is meaningless the moment it lands in a database. For change detection, where you need to compare a timestamp across runs, this is a hard failure rather than a nuisance.

Relative URLs stay relative. The books listing converts to links like Sharp Objects. A model reading that markdown out of a vector store has no way to resolve it, because the base URL is not in the document. Scrapy solves this at the framework level with response.urljoin() and response.follow(), which resolve against the response URL automatically.

Layout tables survive perfectly, which is the problem. The Hacker News front page is built from nested layout tables, and the GFM plugin converts them faithfully. The result looks like this:

|     |     |     |
| --- | --- | --- |
|     |     | 28 points by [dhruv_ahuja](user?id=dhruv_ahuja) [1 hour ago](item?id=50016974) \| [hide](hide?id=50016974&goto=news) \| [1 comment](item?id=50016974) |

Empty header row, two empty columns per row, and the real content in column three. The converter is doing its job correctly. It has no way to know the table was a layout decision from 2007 rather than data. Every one of those pipes and spaces is a token you pay for.

Data tables lose their header semantics when the headers are rows. The books.toscrape.com product page has a genuine

where each row is . Row headers, not column headers. The GFM plugin preserves the content but has to synthesise a header row, so the output begins:

|     |     |
| --- | --- |
| UPC | e00eb4fd7b871a48 |
| Price (excl. tax) | £47.82 |
| Availability | In stock (20 available) |

That is valid GFM with a blank header. The information that column one holds field names and column two holds values is now purely positional. A model will usually infer it. Usually is not a contract, and a pipeline that silently swaps a UPC into a price field fails quietly.

Worth saying clearly: this is what we saw from Firecrawl's declared converter run against those pages, not a measurement of Firecrawl's production service, which may post-process further. Crawl4AI's README claims its generator handles "headings, lists, tables and code blocks, in a structure an LLM reads well," and we have not tested that claim. The class-attribute and relative-URL losses are inherent to markdown as a format, so they apply to any converter.

Published prices and dollars per thousand pages

All figures read on 2026-10-09, in US dollars.

Firecrawl (firecrawl.dev/pricing). Credits equal pages for a basic scrape. The page defaults to annual billing; both rates are shown.

FieldValue
PlanAnnual billingMonthly billingCredits per monthConcurrentExtra credits
Free$0$01,0002n/a
Hobby$16/mo$19/mo5,00051,000 per $5
Standard$83/mo$99/mo100,000252,000 per $5
Growth$333/mo$399/mo500,000502,500 per $5
Scale$599/mo$719/mo1,000,0001005,000 per $5

Firecrawl's format add-ons are where the meter moves. Its scrape documentation lists json, question, highlights and PII redaction at "+4 additional credits per page," PDF parsing at +1 credit per PDF page, and zero data retention at +1. A page scraped with the json format therefore costs 5 credits, not 1. The proxy setting is the opposite: basic, enhanced and auto are documented with "Enhanced proxy requests cost the same as basic requests, 1 credit per request," and an escalated retry "is not charged separately."

Crawl4AI Cloud (crawl4ai.com, cross-checked against the live table it points to at api.crawl4ai.com/v1/prices). The site states "1 credit = $0.001 · page 0.5 · search 1 · from our archive 0.25 · real browser 1 · hard site 2". The live JSON agrees: "usd_per_credit": 0.001, a scrape base of 0.5 credits, and level multipliers of 0.5 for "already in our archive", 1.0 for a plain fetch and the standard path, 2.0 for "a real browser rendered it", and 4.0 for "the site fought back; we used our strongest road".

Tiers, from the same source: Free gives 2,500 credits a month, 10 requests a minute and 2 concurrent, with 20 guest credits before signup. Starter sells $10, $25 and $100 credit packs (10,000, 27,500 and 125,000 credits respectively, so the $100 pack is a 20% bonus), capped at 50,000 credits a month, 120 a minute, 10 at a time, and "Credit never expires." Builder is listed as "Coming soon" at 600 a minute, 20 concurrent, 500,000 credits a month. The page carries its own warning, quoted verbatim: "Soft launch: the prices and the free credit can change while we learn."

Scrapy costs nothing. BSD-3-Clause, pip install scrapy. Your bill is compute plus proxies.

Now the per-1,000-pages comparison, which is the only form that makes these comparable:

PathCost per 1,000 pagesWhere the number comes from
Crawl4AI Cloud, archived page$0.250.25 credits at $0.001
Crawl4AI Cloud, plain fetch$0.500.5 credits at $0.001
Firecrawl Scale, annual$0.599$599 ÷ 1,000,000 credits
Firecrawl Growth, annual$0.666$333 ÷ 500,000 credits
Firecrawl Standard, annual$0.83$83 ÷ 100,000 credits
Crawl4AI Cloud, real browser$1.001 credit at $0.001
Firecrawl Scale, overage$1.00$5 per 5,000 credits
Crawl4AI Cloud, hard site$2.002 credits at $0.001
Firecrawl Hobby, annual$3.20$16 ÷ 5,000 credits
Firecrawl Standard + `json`, annual$4.155 credits per page
Firecrawl Hobby, overage$5.00$5 per 1,000 credits
Firecrawl Hobby + `json`, annual$16.005 credits per page
Scrapy$0 softwareyour compute and proxies

Two things jump out of that table.

First, the spread inside a single vendor is larger than the spread between vendors. Firecrawl ranges from $0.599 to $16.00 per 1,000 pages depending on plan and format. Crawl4AI Cloud ranges from $0.25 to $2.00 depending on how hard the site fights. Picking the vendor is a smaller decision than picking the plan and the format, which is the same conclusion our firecrawl alternatives comparison reaches from the other direction, stage by stage rather than product by product.

Second, compare these fetch prices against the token prices from the previous section. Fetching 1,000 books listing pages through Firecrawl Standard costs $0.83. Feeding the resulting markdown to Sonnet 5.5 as input costs $6.13. The fetch is 12% of the bill. Everyone shops the fetch price and nobody shops the token count, and the token count is where the money is.

Crawl4AI's live price table makes that link explicit in a way worth quoting, because it is the only place we found a vendor billing crawl output by the token. The table contains "llm": {"block_tokens": 5000, "credits_per_block_mc": 1000, "default": "gemini-3.1-flash-lite"} alongside "usd_per_credit": 0.001. One credit per 5,000-token block, at a tenth of a cent per credit, is $0.20 per million tokens of extraction work on their published rate. Their own meter prices the thing this post is about: the tokens your markdown contains.

Running it yourself versus handing it over

Both open-source projects here can be self-hosted. The terms are not the same, and the documentation says so.

Crawl4AI self-hosting is the primary mode. Apache-2.0, pip install crawl4ai, no account, no key. The library brings its own browser stack, which means your infrastructure bill is a Playwright bill: a Chromium process per concurrent crawl, the memory that implies, and the usual headless-browser operational tax of crashes, zombie processes and version pinning. We have not benchmarked its footprint, so size it on your own pages before you plan capacity. Nothing is withheld from the self-hosted version. That is the strongest thing about the project and it costs them nothing to offer, because the library is the product and the cloud is the convenience.

Firecrawl self-hosting is explicitly a reduced build. Their self-host documentation is unusually honest and worth quoting directly. On scope: "This trusted-network quickstart disables API authentication and is not a production architecture." On ownership: "You own upgrades, secrets, storage, monitoring, recovery, and incident response." On what you do not get, the docs list screenshots and page actions, "fire-engine's advanced anti-bot behavior", agent, browser, interact and feedback features, and the specialised product, menu, audio and video formats. The required stack is Docker and Compose v2, PostgreSQL as a queue backend, Redis, RabbitMQ and Playwright.

Read that list again, because the second item is the whole point. The anti-bot capability is the part of Firecrawl you were paying for, and self-hosting removes it. You end up running three stateful services plus a browser to get a markdown converter that gets blocked.

Scrapy is only ever self-hosted, and that is the comparison that flatters it. There is no browser in its 24 runtime dependencies, so a worker's memory footprint is the Python interpreter plus whatever documents it currently holds parsed. Twisted's event loop handles all the concurrency inside one process, which is why a single modest instance can keep many requests in flight without a container per page. We are not quoting a throughput number here, ours or anyone's, because throughput depends entirely on the target. What we can say from the dependency list is that Scrapy's cost per concurrent request is a socket and a parse, while the other two spend a browser.

Here is a Scrapy default that almost nobody knows, and it explains most complaints that Scrapy is slow. The framework defaults in scrapy/settings/default_settings.py at tag 2.19.0 are:

CONCURRENT_REQUESTS = 16
CONCURRENT_REQUESTS_PER_DOMAIN = 8
DOWNLOAD_DELAY = 0
ROBOTSTXT_OBEY = False
AUTOTHROTTLE_ENABLED = False
RETRY_TIMES = 2  # initial response + 2 retries = 3 requests
DOWNLOAD_TIMEOUT = 180
USER_AGENT = "Scrapy/VERSION (+https://scrapy.org)"

But scrapy startproject does not give you those. The project template at the same tag writes a settings file containing:

ROBOTSTXT_OBEY = True
CONCURRENT_REQUESTS_PER_DOMAIN = 1
DOWNLOAD_DELAY = 1

A freshly generated Scrapy project crawls one request per second per domain, serially, and obeys robots.txt. That is a deliberate good-citizen default, and it is also a 1 request-per-second ceiling that people then benchmark against a hosted API running fifty concurrent browsers. Raise CONCURRENT_REQUESTS_PER_DOMAIN and drop DOWNLOAD_DELAY before you conclude anything about Scrapy's throughput. If you want the framework to find its own pace, turn on AUTOTHROTTLE_ENABLED, which ships disabled with AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0 and AUTOTHROTTLE_START_DELAY = 5.0.

The decision between self-hosting and paying per page is covered in more depth, with the operational side weighted properly, in web scraping API vs self-managed proxies.

Commits, releases, and dependency weight

Maintenance claims should rest on dates, so here are the dates. All read from the GitHub and PyPI APIs on 2026-10-09.

ProjectStarsForksOpen issuesLicenseFirst commitLatest releaseLast commit on default branch
unclecode/crawl4ai85,0488,821235Apache-2.02024-05-09v0.9.4, 2026-09-232026-10-05
scrapy/scrapy64,68011,992270BSD-3-Clause2010-02-222.19.0, 2026-09-102026-10-09
firecrawl/firecrawl189,718n/an/aAGPL-3.0n/an/a2026-10-09

All three are actively maintained, and none of them is close to abandoned. The character of the activity differs.

Scrapy's three most recent commits on 2026-10-09 were "Honor request priority across the scheduler memory and disk queues", "Fix fragment inheritance for redirects with an empty fragment", and "Fix the import of a deprecated module." That is sixteen years of a scheduler being made correct in small increments. Nobody writes a blog post about redirect fragment inheritance, and you will be glad somebody fixed it the first time a canonical URL with an empty fragment poisons your dedupe set.

Crawl4AI's three most recent commits on the same date were about the cloud launch: docs banner, docs home, and a README price row. The project is eighteen months old by its first commit date, has more stars than Scrapy, and is currently shipping a commercial service. That is not a criticism, but it does change the risk profile. A library whose maintainers are mid-launch has different priorities than one whose maintainers are fixing queue priority ordering.

Dependency weight is the other durable difference. Crawl4AI 0.9.4 lists 54 entries in requires_dist and requires Python 3.10 or newer; among them are two browser drivers (playwright and patchright), a stealth plugin, an LLM router published under the maintainer's own name and pinned exactly at unclecode-litellm==1.81.13, plus nltk, rank-bm25, snowballstemmer, alphashape and shapely, with torch, scikit-learn and transformers behind extras. Scrapy 2.19.0 lists 24 runtime dependencies and also requires Python 3.10 or newer, with nothing heavier than lxml and cryptography. Both matter inside a Docker image, and the first list is a much larger surface to keep patched. An exact pin on a renamed fork of somebody else's library is the kind of detail worth noticing before you put a project in a build you have to maintain.

Project speed claims, quoted as claims rather than facts: Crawl4AI's README says it is "Fast in practice: async browser pool, caching, minimal hops", and that prefetch=True "finds URLs 5 to 10 times faster". The deprecation warning inside content_filter_strategy.py at tag v0.9.4 calls the lxml filter "an lxml reimplementation that is ~10x faster with identical output". Scrapy's repository describes itself as "a fast high-level web crawling & scraping framework for Python." None of those is a benchmark, none states its test conditions, and we have not reproduced any of them. Treat them as the projects' own claims until somebody publishes a method.

The part none of the three sells you

All three fetch over HTTP from wherever you run them, and all three therefore share one failure mode: the target decides whether your request deserves an answer.

Scrapy is the most exposed, by default and on purpose. Its default user-agent string is literally "Scrapy/VERSION (+https://scrapy.org)", straight from default_settings.py. It announces itself. It also ships HttpProxyMiddleware enabled, which reads the proxy key from Request.meta, so routing is a one-line change rather than a plugin hunt. There is no fingerprint to speak of, because there is no browser: TLS and HTTP/2 behaviour come from Twisted, not Chrome.

Crawl4AI brings more to the fight. The presence of patchright and playwright-stealth in its install requirements means a patched Chromium and a set of fingerprint corrections arrive with pip install. BrowserConfig accepts a proxy_config with server, username and password fields, so credentialed proxies work without wrapping anything. Its authors have a stated position on the arms race, printed on their own homepage: "and the whole 'block the bots' arms race? a phase. let crawlers crawl." That is a philosophy, not a mitigation.

Firecrawl's hosted service carries anti-bot handling it calls fire-engine, documented mainly by its absence from the self-hosted build, plus basic, enhanced and auto proxy modes at no credit premium. That is genuine value you lose the moment you self-host.

What none of the three sells is IP diversity at scale. Crawl4AI tells you to supply your own: "point it at your own boxes and proxies." Firecrawl's proxy pool is undocumented in size and composition, and disappears when you self-host. Scrapy has no opinion at all. Whichever output contract you pick, the IP question lands on your desk.

That is the layer we build. SparkProxy residential plans start from $75 per month, and the plans are packs with unlimited bandwidth included, so the billing unit is the plan and its concurrency rather than traffic consumed. The pool is 1M+ premium IPs across 80+ countries, with random rotation or 5-minute auto-rotation, over HTTP, HTTPS or SOCKS5, authenticated by IP whitelist or user and password, on 1 Gbps ports. There is a 24-hour free trial with no credit card, and term discounts of 5% at three months, 10% at six and 15% at twelve.

Wiring that into Scrapy takes one setting and one middleware hook. The pattern, with retry handling and per-request rotation, is written out in full in how to use proxies with Scrapy. The short version:

# settings.py
DOWNLOADER_MIDDLEWARES = {
    "scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware": 750,
    "myproject.middlewares.SparkProxyMiddleware": 740,
}
SPARKPROXY_ENDPOINT = "http://USER:PASS@gateway.sparkproxy.io:11000"
CONCURRENT_REQUESTS_PER_DOMAIN = 8
DOWNLOAD_DELAY = 0.25
AUTOTHROTTLE_ENABLED = True
RETRY_TIMES = 4
RETRY_HTTP_CODES = [403, 429, 500, 502, 503, 504, 522, 524]
# middlewares.py
class SparkProxyMiddleware:
    """Attach the rotating gateway to every request that has not set its own proxy."""

    def __init__(self, endpoint):
        if not endpoint:
            raise ValueError("SPARKPROXY_ENDPOINT is not set")
        self.endpoint = endpoint

    @classmethod
    def from_crawler(cls, crawler):
        return cls(crawler.settings.get("SPARKPROXY_ENDPOINT"))

    def process_request(self, request, spider):
        request.meta.setdefault("proxy", self.endpoint)

For Crawl4AI the equivalent is a BrowserConfig field:

import asyncio

from crawl4ai import AsyncWebCrawler, BrowserConfig, CrawlerRunConfig


async def main():
    browser_cfg = BrowserConfig(
        headless=True,
        proxy_config={
            "server": "http://gateway.sparkproxy.io:11000",
            "username": "USER",
            "password": "PASS",
        },
    )
    run_cfg = CrawlerRunConfig(wait_for="div.quote")

    async with AsyncWebCrawler(config=browser_cfg) as crawler:
        result = await crawler.arun(
            url="https://quotes.toscrape.com/page/1/",
            config=run_cfg,
        )
        print(len(result.markdown.raw_markdown), "characters of raw markdown")


if __name__ == "__main__":
    asyncio.run(main())

A caution on reading your own block rate: a 200 response containing a challenge page is still a failure, and every one of these three tools will hand it to you as a success. Count words or assert on a known selector before you believe a status code. The failure patterns are catalogued in how to detect when your scraper is blocked.

The same twenty records, written three ways

Concrete beats abstract. Here is the same job, extracting twenty book records from one books.toscrape.com category page, expressed in each of the three contracts.

Firecrawl: a POST and a markdown document.

curl -X POST https://api.firecrawl.dev/v2/scrape \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html",
    "formats": ["markdown"]
  }'

One credit. What comes back is a markdown document, and when we ran that page through Firecrawl's declared converter locally it came to 3,064 tokens. You still have to pull twenty records out of it, which means either a regex over prose or a model call. If you ask Firecrawl to do that parsing with the json format, the page costs 5 credits instead of 1.

Crawl4AI: the same document, from your own machine.

import asyncio

from crawl4ai import (
    AsyncWebCrawler,
    CrawlerRunConfig,
    DefaultMarkdownGenerator,
    PruningContentFilterLXML,
)

URL = "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html"


async def main():
    # PruningContentFilter is deprecated in 0.9.4 in favour of the lxml build.
    run_cfg = CrawlerRunConfig(
        markdown_generator=DefaultMarkdownGenerator(
            content_filter=PruningContentFilterLXML(
                threshold=0.48,
                threshold_type="fixed",
                min_word_threshold=50,
            ),
        ),
    )
    async with AsyncWebCrawler() as crawler:
        result = await crawler.arun(url=URL, config=run_cfg)
        raw = result.markdown.raw_markdown
        fit = result.markdown.fit_markdown
        print(f"raw {len(raw)} chars, fit {len(fit)} chars")


if __name__ == "__main__":
    asyncio.run(main())

No per-page charge, a browser per concurrent crawl, and the same parsing problem waiting at the end. The fit_markdown output is smaller than raw_markdown, by an amount that depends on your pages.

Scrapy: twenty dictionaries, and no parsing problem.

import scrapy


class BooksSpider(scrapy.Spider):
    name = "books"
    start_urls = [
        "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html",
    ]
    custom_settings = {
        "CONCURRENT_REQUESTS_PER_DOMAIN": 8,
        "DOWNLOAD_DELAY": 0.25,
        "FEED_EXPORT_ENCODING": "utf-8",
    }

    def parse(self, response):
        for pod in response.css("article.product_pod"):
            classes = pod.css("p.star-rating").attrib.get("class", "").split()
            yield {
                "title": pod.css("h3 > a::attr(title)").get(),
                "url": response.urljoin(pod.css("h3 > a::attr(href)").get()),
                "price_gbp": pod.css("p.price_color::text").get("").strip(),
                "rating": classes[-1] if len(classes) > 1 else None,
                "in_stock": bool(pod.css("p.instock.availability")),
            }

        next_page = response.css("li.next > a::attr(href)").get()
        if next_page:
            yield response.follow(next_page, callback=self.parse)

Run it with scrapy crawl books -O books.json. That produces 981 tokens of JSON for the whole page by our count, carries the rating that markdown throws away, resolves every URL to absolute with response.urljoin, and follows pagination. The cost is the twenty minutes you spent reading the DOM, and the maintenance when the site redesigns.

A fourth option worth naming, because it sits between the contracts. The SparkProxy Scraping API treats format as a conversion step on a fetch you control, rather than as the product. Base URL https://scrape.sparkproxy.io/api/v1, header X-API-Key, 1,000 free credits to start. Be aware that render_js defaults to true and costs 5 credits; a plain fetch is 1 credit and you have to ask for it:

import requests

API = "https://scrape.sparkproxy.io/api/v1"
KEY = "YOUR_SPARKPROXY_KEY"
URL = "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html"

resp = requests.get(
    API,
    headers={"X-API-Key": KEY},
    params={
        "url": URL,
        "render_js": "false",   # plain HTTP fetch, 1 credit instead of 5
        "format": "md",         # content conversion only: html|md|mdx|json|screenshot|pdf
    },
    timeout=90,
)
resp.raise_for_status()
markdown = resp.text
print(len(markdown), "characters of markdown")

Ask for the envelope and you get the metering data, with one trap that bites everyone exactly once. json_response=true is the only thing that produces the envelope, and the body field inside it is base64. Decode before you match anything:

import base64

import requests

resp = requests.get(
    "https://scrape.sparkproxy.io/api/v1",
    headers={"X-API-Key": "YOUR_SPARKPROXY_KEY"},
    params={
        "url": "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html",
        "render_js": "false",
        "format": "md",
        "json_response": "true",
    },
    timeout=90,
)
env = resp.json()
markdown = base64.b64decode(env["body"]).decode("utf-8", "replace")

print(env["status_code"], env["duration_ms"], "ms", env["credits_used"], "credits")
if "star-rating" not in markdown:
    print("confirmed: the rating attribute did not survive conversion")

Setting format=json does not give you that envelope. It is a content conversion like md and mdx, and confusing the two is a bug we have shipped and fixed more than once.

If you want fields rather than a document, extract_rules replaces the response body with an extracted object. Do not stack it with json_response; pick one:

import json

import requests

rules = {
    "titles": {"selector": "article.product_pod h3 > a", "type": "list"},
    "prices": {"selector": "article.product_pod p.price_color", "type": "list"},
    "links": {"selector": "article.product_pod h3 > a", "type": "href"},
}

resp = requests.get(
    "https://scrape.sparkproxy.io/api/v1",
    headers={"X-API-Key": "YOUR_SPARKPROXY_KEY"},
    params={
        "url": "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html",
        "render_js": "false",
        "extract_rules": json.dumps(rules),
    },
    timeout=90,
)
print(resp.json()["extracted"]["titles"][:3])

For a URL list you already hold, batch mode is the cheapest shape available: it requires render_js=false, and the whole batch costs 1 credit regardless of how many URLs are in it. The full credit ladder, including why geo-targeting and JS scenarios each add 5, is broken down in scraping API credit pricing explained.

Which one, by the shape of your job

Pick by the output you need, then by who you want running the machines.

Your situationPickWhy
You know the fields and the site is staticScrapy10% of the HTML token count, $0 software, no browser
You know the fields and the site needs a browserScrapy for the graph, a browser for the leavesKeeps browser count proportional to pages that need one
Building RAG over documentation or articlesCrawl4AI self-hosted, or Firecrawl if you prefer a bill to a clusterMarkdown is the right contract for prose
Agent needs one page as text, right nowFirecrawl, or Crawl4AI CloudOne HTTP call, no infrastructure
Thousands of pages a day, markdown output, cost-sensitiveCrawl4AI self-hostedNo per-page meter; you pay for browsers
You need JSON fields but not a schema you wroteFirecrawl `json` format, with eyes open5 credits per page, $4.15 per 1,000 on Standard annual
Target blocks you regardless of toolAny of the three, plus a real IP poolNone of them sells IP diversity
Compliance forbids an AGPL server in your stackCrawl4AI or ScrapyApache-2.0 and BSD-3-Clause

The pattern that beats all three for most commercial scraping is unglamorous. Use Scrapy for the crawl graph, because its scheduler, dedupe filter and retry semantics are sixteen years deep and free. Send only the pages that genuinely need rendering through a browser or a rendering API. Define your items, so your token bill scales with the data you keep rather than with the pages you touched. Reach for markdown when the target really is prose, and when you honestly cannot name the fields in advance.

Three numbers to carry away. Markdown is roughly a third of raw HTML by token count. Targeted extraction is roughly a third of markdown. On the pages we measured, the fetch was about 12% of the combined fetch-plus-token bill, so the output contract, not the vendor, is the decision worth arguing about.

Frequently asked questions

FAQ

For markdown output on URLs you already have, close to it: both hand back a markdown document and Crawl4AI is Apache-2.0 with no key required. It is not a drop-in for Firecrawl's hosted anti-bot handling, which Firecrawl's own self-host docs list as cloud-only, and running Crawl4AI means running a Playwright browser pool yourself.

Yes, because it answers the same business question with a different output contract. Crawl4AI and Firecrawl give you a whole page as markdown; Scrapy gives you the fields you defined. On the three pages we measured, the Scrapy-style output was 10.1% to 14.4% of the raw HTML token count, against 29.6% to 37.7% for markdown.

On our measurements with Turndown 7.2.4 plus the GFM plugin and tiktoken o200k_base: 860 tokens for a ten-quote page, 3,064 for a twenty-product listing, and 4,413 for the Hacker News front page. At $2 per million input tokens, 1,000 copies of that listing page cost $6.13 to read once.

On published October 2026 rates, a plain fetch is $0.50 per 1,000 pages on Crawl4AI Cloud against $0.83 on Firecrawl Standard annual and $0.599 on Scale annual. Crawl4AI's own pricing page labels the service a soft launch and warns its prices can change, so verify before you plan a budget around it.

No, and the documentation says so. The self-hosted build omits screenshots and page actions, fire-engine's advanced anti-bot behaviour, the agent, browser, interact and feedback features, and the product, menu, audio and video formats, while requiring you to run PostgreSQL, Redis, RabbitMQ and Playwright yourself.

Usually yes, for anything commercially interesting. Crawl4AI's own site tells you to point it at your own proxies, Firecrawl's proxy pool vanishes when you self-host, and Scrapy ships a default user-agent that identifies itself as Scrapy. A residential pool with rotation is the layer under all three, not an alternative to them.

Special Discount · 20% off

Get 20% off your first month

Premium datacentre proxies with unlimited bandwidth. Use the code at checkout.

Save up to 15% more on quarterly, half-yearly and yearly plans

Claim Discount

About the Author

The SparkProxy Technical Team builds and operates residential and datacenter proxy infrastructure and the SparkProxy Scraping API, used by teams collecting web data for price monitoring, search tracking, research and AI training pipelines. We sell the IP layer that sits under all three tools compared here, and we have said plainly where our Scraping API does not compete: it has no crawl or map endpoint, no LLM extraction, and render_js defaults to true at 5 credits, which surprises people. Vendor prices, versions, commit dates and star counts were read from each project's own pages, documentation, repository or package metadata on 2026-10-09 and will drift. Token figures are our own measurements and the method is stated in the body so you can check it. Corrections are welcome at support@sparkproxy.io.

Keep reading

Related articles

Nodriver vs Playwright: Stealth vs Ecosystem

Nodriver vs Playwright: Stealth vs Ecosystem

Nodriver vs Playwright, measured: navigator.webdriver, headless tells and launch flags in Chrome 157, plus auto-waits, proxies, licences and when each one wins.

SparkProxy·Comparisons