ScrapeGraphAI vs Crawl4AI: Where the Schema Lives
ScrapeGraphAI vs Crawl4AI: one declares extraction as a graph of LLM nodes, the other converts and stops. Measured token costs, schema enforcement, retries.

Most ScrapeGraphAI vs Crawl4AI write-ups rank them as two LLM scrapers and hand you a feature grid. They are not the same category of thing. ScrapeGraphAI composes extraction as a graph of nodes you declare up front; Crawl4AI fetches a page, converts it to Markdown, and leaves extraction as a strategy object you bolt on afterwards. The useful axis is where the schema lives and what happens to your pipeline when a page does not match it.
Short version: ScrapeGraphAI if the extraction logic itself is the thing you want to version and reuse, Crawl4AI if you want a fetch-and-convert layer and intend to own extraction yourself, including the option of not using a model at all. The difference shows up most sharply in failure, where one returns an error dictionary in place of your object and the other returns a half-filled list with an error flag inside it.
Everything below comes from the two projects' own repositories, package registries, docs and live price endpoints, read on 9 October 2026. Token counts are my own measurements, taken the same day. Prices are USD. If you need Crawl4AI's basics against the crawler field in general, that is a separate post: Crawl4AI vs Firecrawl vs Scrapy. This one stays on the graph-versus-convert axis.
Where the schema lives, and who enforces it
In ScrapeGraphAI the schema is a constructor argument to a graph. You instantiate SmartScraperGraph(prompt, source, config, schema=MyModel) and the graph threads that schema into three separate node configs: the parser, the answer generator, and, if you turn it on, the regeneration node. The schema is a property of the pipeline, not of a single call.
In Crawl4AI the schema is an argument to an extraction strategy, and the strategy is an argument to a run config. You can swap LLMExtractionStrategy for JsonCssExtractionStrategy without touching the crawler, and the second one takes a dictionary of CSS selectors rather than a Pydantic model. The schema is a property of the extraction step, which is detachable.
That sounds like a style preference. It has three consequences that matter in production.
First, ScrapeGraphAI's schema travels with the fetch. There is no configuration in which you fetch a page, keep it, and re-extract it later with a different schema, because the fetch is FetchNode inside the same graph. Crawl4AI's CrawlResult carries markdown and html independent of extraction, so re-extraction against a cached page is just another strategy call.
Second, ScrapeGraphAI has no model-free path. Every graph in the library terminates in GenerateAnswerNode, which calls an LLM. Crawl4AI ships JsonCssExtractionStrategy, JsonXPathExtractionStrategy and RegexExtractionStrategy, none of which call a model at run time, and its own docs push you towards them: "While schema generation uses LLM, it's a one-time cost. The generated schema can be reused for unlimited extractions without further LLM calls."
Third, when the page changes shape, the two fail in different places. A ScrapeGraphAI graph fails inside the model call. A Crawl4AI CSS strategy fails at the selector, with a stack trace that points at a selector string you wrote.
| ScrapeGraphAI 2.3.1 | Crawl4AI 0.9.4 | |
|---|---|---|
| Schema declared on | the graph object | the extraction strategy |
| Schema type | Pydantic v2 `BaseModel` | JSON schema dict, or a selector dict |
| Extraction without a model | not available | three LLM-free strategies |
| Fetch separable from extraction | no | yes, `CrawlResult` keeps both |
| Default model | none; you must set `llm.model` | `openai/gpt-4o` |
| Default chunk size | the model's context window | 2,048 tokens |
| Licence | MIT | Apache-2.0 |
One class, eight graphs, three booleans
This is the part of ScrapeGraphAI nobody writes about, and it changes how you read your bill.
SmartScraperGraph._create_graph does not build one pipeline. It builds a lookup table keyed on a tuple of three config booleans, (html_mode, reasoning, reattempt), with eight entries, and returns whichever graph that tuple selects. The nodes in play are FetchNode, ParseNode, GenerateAnswerNode, ReasoningNode and ConditionalNode, plus a second GenerateAnswerNode used only for regeneration.
| `html_mode` | `reasoning` | `reattempt` | Nodes in the graph | LLM calls on a one-chunk page |
|---|---|---|---|---|
| False | False | False | fetch, parse, answer | 1 |
| True | False | False | fetch, answer | 1 |
| False | True | False | fetch, parse, reasoning, answer | 2 |
| True | True | False | fetch, reasoning, answer | 2 |
| False | False | True | fetch, parse, answer, cond, regen | 1 or 2 |
| True | False | True | fetch, answer, cond, regen | 1 or 2 |
| False | True | True | fetch, parse, reasoning, answer, cond, regen | 2 or 3 |
| True | True | True | fetch, reasoning, answer, cond, regen | 2 or 3 |
Read the first column again. html_mode: True removes ParseNode, which is the node that converts HTML to text. The raw HTML goes straight to the model. On the page I measured below, that single boolean multiplies input tokens by 13.
reasoning: True inserts a whole extra model call before the answer call, and the reasoning node gets the same schema as the answer node. Two round trips per page instead of one, for a pipeline you declared with one config key.
Here is the declaration in full, with the parts that cost money commented:
from pydantic import BaseModel, Field
from scrapegraphai.graphs import SmartScraperGraph
class Attraction(BaseModel):
name: str = Field(description="the attraction's name")
kind: str = Field(description="museum, church, beach, other")
class Attractions(BaseModel):
items: list[Attraction]
graph_config = {
"llm": {
"model": "openai/gpt-4o-mini",
"api_key": "YOUR_OPENAI_KEY",
"temperature": 0, # not a library default; set it yourself
"model_tokens": 128000, # omit this and you may get the 8192 fallback
},
"html_mode": False, # True sends raw HTML to the model
"reasoning": False, # True adds a second model call per page
"reattempt": False, # True adds a conditional regeneration node
"verbose": True,
}
scraper = SmartScraperGraph(
prompt="List every attraction with its kind.",
source="https://en.wikipedia.org/wiki/Chioggia",
config=graph_config,
schema=Attractions,
)
result = scraper.run()
print(scraper.get_execution_info())
The model_tokens comment is not cosmetic. AbstractGraph looks your model up in a models_tokens table; on a miss it logs "Using default token size: 8192", sets self.model_token = 8192 and carries on. ParseNode then chunks at chunk_size - 250, so a model with a 128k window gets chunked as if it had 7,942 usable tokens. The library records that it happened, in a model_tokens_defaulted flag, but it does not raise.
Scraping at scale? Skip the blocks.
Fast, unblockable datacentre proxies with unlimited bandwidth.
Crawl4AI hands you Markdown and stops
One paragraph, because the fetch-and-convert layer is covered in the Crawl4AI vs Firecrawl vs Scrapy comparison. AsyncWebCrawler.arun() returns a CrawlResult whose markdown attribute is the converted page. Extraction is opt-in, through CrawlerRunConfig(extraction_strategy=...), and if you pass nothing you get NoExtractionStrategy, which returns the HTML as a single block. The crawler's job ends at conversion.
What matters here is the switch that controls what your schema sees. LLMExtractionStrategy takes an input_format with three options, and the default is "markdown":
import json
from pydantic import BaseModel
from crawl4ai import AsyncWebCrawler, CrawlerRunConfig, LLMConfig
from crawl4ai.extraction_strategy import LLMExtractionStrategy
class Book(BaseModel):
title: str
price: str
strategy = LLMExtractionStrategy(
llm_config=LLMConfig(provider="openai/gpt-4o-mini", api_token="YOUR_OPENAI_KEY"),
schema=Book.model_json_schema(),
extraction_type="schema",
instruction="Extract every book with its title and price.",
chunk_token_threshold=2048, # the library default
overlap_rate=0.1, # the library default
apply_chunking=True,
input_format="markdown", # "html" costs about 13x more on a real page
force_json_response=True,
verbose=True,
)
async def extract(url):
async with AsyncWebCrawler() as crawler:
res = await crawler.arun(url, config=CrawlerRunConfig(extraction_strategy=strategy))
strategy.show_usage()
return json.loads(res.extracted_content)
Two details from the source rather than the docs. force_json_response=True sets response_format to {"type": "json_object"} on the completion call, which is JSON mode, not schema-constrained decoding: the model must return valid JSON, but nothing checks that the keys are yours. And passing schema at all forces extract_type to "schema" regardless of what you set extraction_type to, because the constructor overwrites it.
What a declared schema actually enforces
Here is the finding that reframes both tools, and it took reading two repositories to confirm.
Give ScrapeGraphAI a Pydantic model on an OpenAI-backed graph and it does not use OpenAI's structured outputs. GenerateAnswerNode.execute calls get_pydantic_output_parser(schema), which returns JsonOutputParser(pydantic_object=schema) from langchain-core, and injects output_parser.get_format_instructions() into the prompt template. The schema becomes prompt text plus a JSON parser on the way out.
Now read what that parser does. In langchain-core's output_parsers/json.py, JsonOutputParser.parse_result calls parse_json_markdown(text) and raises OutputParserException only if the text is not valid JSON. The pydantic_object field is used in exactly one other place, get_format_instructions, to render the schema into the prompt. Its own docstring says "The Pydantic object to use for validation. If None, no validation is performed." The implementation never validates against it either way.
So on the OpenAI path, a declared schema in ScrapeGraphAI buys you a description of the shape you want in the prompt, and a guarantee that you get parseable JSON back. It does not buy you field-level validation. A model that returns {"attractions": [...]} where you declared items returns successfully, and result["items"] raises a KeyError in your code, not in the library.
Three provider paths behave differently, and the branch is explicit in the source:
| Model client | What the schema does | Enforcement |
|---|---|---|
| `ChatOllama` | sets `llm_model.format = schema.model_json_schema()` | grammar-constrained decoding at the provider |
| `ChatOpenAI` and the general path | renders format instructions into the prompt, parses JSON out | shape suggested, JSON validity checked, fields not checked |
| `ChatBedrock` | `output_parser = None`, `format_instructions = ""` | none; the schema is silently dropped |
That Bedrock row is worth a test in your own stack before you trust it. The same schema= argument that constrains decoding on a local Ollama model is discarded entirely on Bedrock, and the graph still runs.
Crawl4AI is not stricter, but it is more honest about it. With force_json_response=True you get provider JSON mode and a json.loads. With it off, the strategy pulls a XML section out of the completion and parses that. Either way there is no Pydantic validation step. The practical answer on both tools is the same, and both sets of docs hint at it: validate after extraction, in your own code. Crawl4AI's LLM docs say post-validation is recommended because fields can be omitted.
from pydantic import ValidationError
def validated(raw, model):
"""Do the validation neither library does. Returns (good, bad)."""
good, bad = [], []
for item in raw if isinstance(raw, list) else [raw]:
if isinstance(item, dict) and item.get("error"):
bad.append(("extraction_error", item))
continue
try:
good.append(model.model_validate(item))
except ValidationError as exc:
bad.append((exc.errors()[0]["type"], item))
return good, bad
That function is the single highest-value thing you can add to either pipeline. Both libraries will hand you a dictionary that looks fine and is wrong.
The same page twice
Run the same URL through each tool twice with no config changes. Do you get byte-identical objects?
Crawl4AI: close to it, by default. perform_completion_with_backoff in crawl4ai/utils.py builds its call with extra_args = {"temperature": 0.01, "api_key": api_token, "base_url": base_url} before merging anything you passed. Near-greedy decoding is the library default, and it also sets litellm.drop_params = True, which quietly discards temperature for model families that reject it rather than erroring.
ScrapeGraphAI: not by default. AbstractGraph._create_llm sets llm_defaults = {"streaming": False} and nothing else. temperature is forwarded only if you put it in the llm config, and the only special handling in the whole method moves it into model_kwargs for Bedrock. Leave it out, as both the README quickstart and the SmartScraperGraph docstring example do, and you inherit your provider's default sampling temperature. Two runs, two different objects, and the difference is usually in field phrasing rather than anything that trips a test.
Neither default makes extraction deterministic in the sense a parser is deterministic. temperature=0.01 is not zero, and even at zero, floating-point non-determinism in batched inference means repeat calls can diverge. What you can do is bound the damage:
# ScrapeGraphAI: pin it yourself, the library will not.
graph_config = {"llm": {"model": "openai/gpt-4o-mini", "temperature": 0, "model_tokens": 128000}}
# Crawl4AI: already 0.01; override only if you want sampling.
strategy = LLMExtractionStrategy(
llm_config=LLMConfig(provider="openai/gpt-4o-mini", api_token="KEY"),
extra_args={"temperature": 0, "seed": 7},
)
If you need the same page to yield the same object every time, the answer on both tools is to stop asking a model. Generate the selector schema once with JsonCssExtractionStrategy.generate_schema(), check it into your repository, and run it with no model in the loop. Crawl4AI supports that directly. ScrapeGraphAI has no equivalent, because every one of its graphs ends in a model call. Its ScriptCreatorGraph generates Python you could in principle freeze, but that is code generation, not a selector map, and you own whatever it writes.
Debugging a wrong field
The model returned price: "£51.77" when you wanted a float, or filled name with the page title. Where do you look?
Crawl4AI gives you per-block error flags inside the returned list. In LLMExtractionStrategy.extract, every successfully parsed block gets block["error"] = False assigned explicitly. On a parse failure the inner handler calls split_and_parse_json_objects(raw_content), keeps whatever parsed, and appends one more block:
{"index": 0, "error": True, "tags": ["error"], "content": unparsed}
An empty completion produces {"index": 0, "error": True, "tags": ["error"], "content": "LLM returned no content (finish_reason: ...)"}, with the real finish reason inlined. A thrown exception produces a one-element list carrying str(e). So Crawl4AI's failure mode is a partially populated list with the broken piece preserved next to the good ones, and the raw text is right there to read.
ScrapeGraphAI replaces the answer. GenerateAnswerNode wraps each chain invocation in except (Timeout, json.JSONDecodeError) and, on either, does this:
state.update({self.output[0]: {"error": error_msg, "raw_response": str(e)}})
Your object is gone and result is now {"error": "Invalid JSON response format", "raw_response": "..."}. There are three separate copies of that handler, one for the single-chunk path, one for chunk processing, one for the merge step, each with its own message, so the message text tells you which stage died. That is genuinely useful. What you do not get is the good half of a partially correct extraction.
Now the trap. Turn on reattempt: True and you get a ConditionalNode whose condition, hard-coded in smart_scraper_graph.py, is:
'not answer or answer=="NA"'
ConditionalNode._evaluate_condition runs that through simpleeval against the graph state. Feed it the error dictionary above and not answer is False, because a non-empty dict is truthy, and answer == "NA" is False. The regeneration node never fires. The retry you enabled catches an empty answer and the literal string "NA", and nothing else. A JSON parse failure, a schema mismatch, a plausible object with wrong field names: none of them trigger it.
There is one quiet upside on the ScrapeGraphAI side. ParseNode._warn_if_content_lacks_requested_fields runs a deterministic, model-free check on the parsed chunks: it collects your schema field names and the significant words of your prompt, and warns when none of them appear in the text being sent. The source comment explains exactly which bug it catches, a valid 200 response whose content never rendered, where "the LLM answers NA and the run looks clean". Crawl4AI has no equivalent pre-flight check. If you are chasing empty extractions on JavaScript-heavy pages, run verbose=True and read for that warning first.
For the cost side of debugging, Crawl4AI is ahead. It builds a TokenUsage object per call with prompt_tokens, completion_tokens and total_tokens, appends it to self.usages, accumulates self.total_usage, and exposes show_usage(). ScrapeGraphAI gives you get_execution_info() from the graph's LangChain callbacks, which reports per-node timing and token counts, but you read it per node rather than per chunk.
Retry, backoff and partial results
| Behaviour | ScrapeGraphAI | Crawl4AI |
|---|---|---|
| Model-call retry | none in the node; one optional regeneration via `ConditionalNode` | `base_delay=2`, `max_attempts=3`, `exponential_factor=2` on rate-limit errors |
| Retry trigger | `not answer or answer=="NA"` only | any `RateLimitError` from litellm |
| Fetch retry | `ChromiumLoader(retry_limit=1)` | browser-level, per `CrawlerRunConfig` |
| Timeout | `480` seconds per chain invocation | per-call, via litellm |
| Chunk concurrency | `RunnableParallel` over all chunk chains | `ThreadPoolExecutor` with no worker cap |
| Partial results kept | no; the answer is replaced wholesale | yes; good blocks survive alongside an error block |
Two things in that table deserve a note.
ChromiumLoader's docstring says "Maximum number of retry attempts for scraping. Defaults to 3" and the signature says retry_limit: int = 1. The signature wins. The same docstring claims a 10 second timeout against a timeout: int = 60 default. Read the signatures, not the prose.
Crawl4AI's chunk runner has a matching mismatch in the other direction. LLMExtractionStrategy.run is documented as "Process sections sequentially with a delay for rate limiting issues", and the implementation submits every section to a ThreadPoolExecutor at once with no max_workers and drains with as_completed. On a page that chunks into eleven sections you fire eleven concurrent completions. The backoff will catch the 429s, but it is paying three attempts of latency to do what a worker cap would have avoided. Set apply_chunking=False for small pages, or raise chunk_token_threshold so the page fits in one or two chunks. Our notes on retry and backoff strategies apply unchanged here, because this is the same problem one layer up.
Token cost per page, measured today
No published benchmark compares these two on cost, so I measured the inputs and applied each vendor's list prices. Method, so you can repeat it: fetch the page, strip script, style, noscript and svg with BeautifulSoup, take the visible text, and count tokens with tiktoken 0.14.0 using o200k_base, the encoding for the GPT-4o and GPT-5 families. Chunk counts replicate each library's own arithmetic. Measured 9 October 2026.
The page is en.wikipedia.org/wiki/Chioggia, which is the example in ScrapeGraphAI's own SmartScraperGraph docstring:
| Measurement | Value |
|---|---|
| HTML size | 231,648 bytes |
| HTML as tokens | 71,708 |
| Stripped text as tokens | 5,418 |
| Words of text | 2,591 |
| HTML-to-text token ratio | 13.2x |
| Crawl4AI chunks at `chunk_token_threshold=2048` | 2 |
| ScrapeGraphAI chunks with `model_tokens=128000` | 1 |
| ScrapeGraphAI chunks with the 8192 fallback | 1 |
Crawl4AI's chunk count comes from merge_chunks, and the arithmetic there is worth knowing: it splits on whitespace with str.split, multiplies the word count by WORD_TOKEN_RATE = 1.3, and divides by the target size. It is a word-based estimate, not a tokenizer. On this page 2,591 words become an estimated 3,368 tokens against a real 5,418. The estimate is 38% low, which means your real chunks run larger than the threshold you set.
Now the money, at OpenAI's published list prices read the same day: gpt-4o at $2.50 per million input tokens and $10.00 output, gpt-4o-mini at $0.15 and $0.60. Assume 400 completion tokens per call. The ScrapeGraphAI multi-chunk row adds the merge call, which is fed the chunk answers as its input.
| Configuration | Input tokens | Model calls | gpt-4o, 10,000 pages | gpt-4o-mini, 10,000 pages |
|---|---|---|---|---|
| ScrapeGraphAI, `html_mode=False`, 128k window | 5,418 | 1 | $175.45 | $10.53 |
| Crawl4AI, `input_format="markdown"` | 5,959 | 2 | $228.98 | $13.74 |
| Crawl4AI, `input_format="html"` | 78,878 | 7 | $2,251.95 | $135.12 |
| ScrapeGraphAI, `html_mode=True`, 128k window | 71,708 | 1 | $1,832.70 | $109.96 |
| ScrapeGraphAI, `html_mode=True`, 8192 fallback | 75,708 | 11 | $2,332.70 | $139.96 |
| Crawl4AI, `JsonCssExtractionStrategy` | 0 | 0 | $0.00 | $0.00 |
Read the rows, not the tools. The spread between the two libraries on comparable settings is $175 against $229, about 30%, and it comes from chunk count rather than anything architectural: Crawl4AI's 2,048-token default splits this page in two and resends 10% as overlap, where ScrapeGraphAI sends it whole. The spread inside each tool is an order of magnitude, and it is one boolean each. html_mode=True on ScrapeGraphAI and input_format="html" on Crawl4AI both cost roughly 13x more on this page than their text equivalents, for the same extraction.
The last row is the one that should shape your architecture. Generate a CSS schema once, pay for that single call, then extract forever at zero marginal model cost. Crawl4AI's LLM-free docs page puts the speed penalty of LLM extraction at 10 to 1,000 times slower for large-scale crawling, and pitches the schema generation step as a one-time cost whose output "can be reused for unlimited extractions without further LLM calls". Both are the project's own unverified claims, not measurements of mine, and I have not reproduced that range. The direction is not in doubt.
One caveat on all of it: the completion-token figure is an assumption, not a measurement, because it depends on how many items your page yields. Use Crawl4AI's show_usage() or ScrapeGraphAI's get_execution_info() on fifty of your own pages before you project a monthly bill from anything above. The input side is measured; the output side is yours.
What the hosted tiers charge
Both projects now sell a managed service, and they bill on different units. All figures read 9 October 2026, USD.
ScrapeGraphAI's published plans are Free at $0 per month with "500 API credits, one-time", Starter at $20 for 10,000 credits per month, Growth at $100 for 100,000, Pro at $500 for 750,000, and Enterprise at custom pricing. Per-endpoint credit costs, from the same page: Scrape 1 credit for Markdown, 2 for a screenshot, 25 for branding; Extract 5; Search 2 per result without a prompt or 5 with one; Crawl 2 at startup plus the per-page scrape cost; Monitor plus 5 on a detected change; PDF processing 1 credit per page. The stealth toggle adds 5 credits. Render mode adds nothing.
Crawl4AI Cloud is in soft launch and publishes a live rate table at crawl4ai.com/v1/prices, which carries its own warning: "Soft launch: the prices and the free credit can change while we learn. Credit you bought keeps its value and never expires. Read this table before you rely on a number." Treat anything I quote from it as a snapshot. It returns usd_per_credit: 0.001, a base of 0.50 credits for scrape and 0.50 for extract, 1.00 for search and answer, and a five-level multiplier that prices the difficulty of the fetch:
| Level | Name | Multiplier | The table's own description |
|---|---|---|---|
| 0 | instant | 0.5x | "already in our archive: half price" |
| 1 | light | 1.0x | "a plain fetch" |
| 2 | standard | 1.0x | "the page needed more work" |
| 3 | heavy | 2.0x | "a real browser rendered it" |
| 4 | hard | 4.0x | "the site fought back; we used our strongest road" |
That level-4 row is the most honest line in either vendor's pricing, and it tells you the thing this whole comparison keeps circling: the fetch is the expensive, unpredictable part, not the extraction.
| 10,000 pages, hosted | Published unit | Cost |
|---|---|---|
| Crawl4AI Cloud `scrape`, light | 0.5 credits x 1.0 at $0.001 | $5.00 |
| Crawl4AI Cloud `scrape`, heavy | 0.5 credits x 2.0 | $10.00 |
| Crawl4AI Cloud `scrape`, hard | 0.5 credits x 4.0 | $20.00 |
| ScrapeGraphAI `Extract`, Pro tier | 5 credits at $500/750,000 | $33.33 |
| ScrapeGraphAI `Extract`, Growth tier | 5 credits at $100/100,000 | $50.00 |
| ScrapeGraphAI `Extract` + stealth, Growth | 10 credits at $100/100,000 | $100.00 |
Those are not like-for-like. ScrapeGraphAI's Extract includes the model call; Crawl4AI's scrape is fetch and convert only. Crawl4AI's hosted extract adds its LLM pricing on top, and the price table reports block_tokens: 5000 with credits_per_block_mc: 1000, which is one credit per 5,000-token block, on a default model the table names as gemini-3.1-flash-lite. On the page I measured that is 2 blocks, so roughly 2.5 credits with the base, or $25 per 10,000 pages at the light multiplier. Close enough to ScrapeGraphAI's Pro tier that the hosted decision is not about price.
Free tiers, for evaluation: ScrapeGraphAI gives 500 credits once. Crawl4AI's table reports 20 guest credits with no signup, 2,000 on signup, and a community allowance of 2,500 credits a month at 2 concurrent requests and 10 per minute. If you are new to credit-based billing generally, we wrote up how scraping API credits work and why the per-call multipliers matter more than the headline rate.
Neither one solves the block
Both tools assume the page arrives. Neither has anything to say about the case where it does not, and that is the failure mode that actually stops projects.
ScrapeGraphAI's FetchNode has two paths. For sources that do not need rendering it calls requests.get(source, timeout=self.timeout), with no proxy, no header set, no TLS fingerprint handling. For rendered sources it uses ChromiumLoader, which takes an optional proxy dict and defaults it to None. The proxy shape is {"server": ..., "username": ..., "password": ...}, passed through loader_kwargs, and parse_or_search_proxy asserts only that server is present. Set server to the literal string "broker" and the library goes looking for free proxies through the free-proxy package. For a production job, that is not an answer. Beyond that, FetchNode carries browser_base and scrape_do config keys, which hand the fetch to a third-party service. Two commercial escape hatches wired into the fetch node is itself a statement about how far the library gets on its own. So is the README, which sells a proxy sponsor's discount codes directly under the install instructions.
Crawl4AI is further along and still short. ProxyConfig(server, username, password) goes on CrawlerRunConfig.proxy_config, ProxyConfig.from_env() reads a comma-separated PROXIES variable in ip:port:user:pass form, and RoundRobinProxyStrategy rotates a list through proxy_rotation_strategy. There is a stealth mode, enable_stealth=True on BrowserConfig, and an UndetectedAdapter for harder targets. The docs set expectations themselves: the stealth page is explicit that it is "Not 100% Guaranteed", that "Some sites can still detect headless mode", and that the undetected path is slower and heavier. Those are the project's own caveats, quoted, not measurements of mine. I have not benchmarked either tool's block rate, and neither project publishes one.
So the honest statement of the axis: ScrapeGraphAI and Crawl4AI differ on where your schema lives and what a model call costs. They do not differ on whether a protected target will serve them, because that question is settled before either library sees a byte. If your extraction is failing on 403s, empty bodies or challenge pages, changing which of these two you use changes nothing. Cloudflare and the other managed WAFs fingerprint the connection, not the parser.
A clean fetch in front of either
We sell proxies and a Scraping API, so the plain version: neither of these libraries is a competitor to that, and the useful pattern is to put a fetch layer in front and let the library do what it is good at.
Both tools accept pre-fetched content, which makes the split easy. ScrapeGraphAI's SmartScraperGraph takes a local path or raw text as source rather than a URL. Crawl4AI's LLMExtractionStrategy and JsonCssExtractionStrategy both expose run(url, sections) and can be handed strings directly, and JsonElementExtractionStrategy.generate_schema() accepts an html= argument instead of a URL.
The SparkProxy Scraping API lives at https://scrape.sparkproxy.io/api/v1 and takes an X-API-Key header. The parameter worth getting right first is render_js, which defaults to true and bills 5 credits; render_js=false is a plain fetch at 1 credit. For a text-extraction pipeline on mostly static pages, that default is a 5x bill you did not ask for. format controls content conversion only, across html, md, mdx, json, screenshot and pdf. country_code adds 5 credits and js_scenario adds 5 more and needs render_js=true.
One API detail that bites people, so it is worth stating plainly: json_response=true is the only thing that returns the envelope with job_id, status_code, duration_ms, credits_used and body, and in that envelope the body is base64. Decode before you match on anything. format=json is a content conversion, not the envelope.
import base64
import requests
API = "https://scrape.sparkproxy.io/api/v1"
def fetch_markdown(url, api_key, render=False):
"""Return (markdown, credits_used). Decoded, because the envelope body is base64."""
r = requests.get(
API,
headers={"X-API-Key": api_key},
params={
"url": url,
"render_js": "true" if render else "false", # 5 credits vs 1
"format": "md",
"proxy_type": "premium",
"json_response": "true", # the ONLY source of the envelope
},
timeout=120,
)
r.raise_for_status()
env = r.json()
if env.get("status_code") != 200:
raise RuntimeError(f"upstream {env.get('status_code')} for {url}")
return base64.b64decode(env["body"]).decode("utf-8"), env.get("credits_used")
Hand that Markdown to either library and the economics change. Crawl4AI's input_format question disappears, because you only ever had text. ScrapeGraphAI's html_mode question disappears for the same reason, and ParseNode has less to do. You also get a status_code you can branch on before you spend a token, which is the cheapest retry in the whole pipeline:
def extract_or_skip(url, api_key, extract_fn):
"""Only pay for inference on pages that actually arrived."""
try:
md, credits = fetch_markdown(url, api_key)
except RuntimeError as exc:
return {"url": url, "skipped": str(exc), "model_calls": 0}
if len(md.split()) < 50: # a challenge page or an empty render
return {"url": url, "skipped": "body too short", "model_calls": 0}
return {"url": url, "data": extract_fn(md), "fetch_credits": credits}
Pricing for the fetch side, as published:
| Item | What it is |
|---|---|
| Scraping API trial | 1,000 free credits |
| Proxy entry plan | starting from $75/month |
| Metering | packs with unlimited bandwidth, so you are billed on the plan and its concurrency, not on traffic |
| Pool | 1M+ premium IPs, 80+ countries |
| Rotation | random, or auto-rotate every 5 minutes |
| Protocols | HTTP, HTTPS, SOCKS5 |
| Auth | IP whitelist, or user:pass |
| Port speed | 1 Gbps |
| Trial | 24 hours, no credit card |
| Term discounts | 3 months -5%, 6 months -10%, 12 months -15% |
Unlimited bandwidth is the line that matters for LLM extraction work specifically. A text-extraction pipeline pulls full HTML and throws away 92% of the tokens, as the measurement above shows, so a per-GB fetch bill punishes you for bytes you never send to a model. If you are weighing an API against running your own pool, that comparison is its own post.
Where this does not fit: if your targets are unprotected and your problem is purely extraction quality, a fetch layer adds cost and no value. Use requests and keep your money.
Version dates and licences, read today
Both projects are alive. These are the dates I read on 9 October 2026, from GitHub's API and PyPI, not from anybody's roundup.
| ScrapeGraphAI | Crawl4AI | |
|---|---|---|
| Repository | `ScrapeGraphAI/Scrapegraph-ai` | `unclecode/crawl4ai` |
| Latest PyPI version | `scrapegraphai` 2.3.1 | `Crawl4AI` 0.9.4 |
| Uploaded to PyPI | 2026-10-06 | 2026-09-23 |
| Last push to `main` | 2026-10-06T08:27:54Z | 2026-10-05T11:26:42Z |
| Latest commit subject | "ci(release): 2.3.1 [skip ci]" | "The cloud launch on main: the docs banner, the docs home, the daily notice, with the soft-launch words" |
| Repository created | 2024-01-27 | 2024-05-09 |
| Stars | 31,642 | 85,048 |
| Forks | 3,227 | 8,821 |
| Open issues | 17 | 235 |
| Licence | MIT | Apache-2.0 |
| Python requirement | `<4.0,>=3.12` | `>=3.10` |
Neither repository publishes GitHub Releases, so there is no changelog to read through that API; version history lives in PyPI uploads and commit messages. ScrapeGraphAI's PyPI upload timestamp sits two seconds after its last main push, which is a release CI job doing its work, and that is the shape of an actively released project rather than a tagged-once-a-year one.
Two numbers in that table are worth not over-reading. Crawl4AI's 235 open issues against ScrapeGraphAI's 17 is mostly a function of 2.7x the stars and a far larger surface, not of quality. And the Python floor matters if you are deploying to anything older: ScrapeGraphAI 2.3.1 requires Python 3.12 or newer, which rules out a lot of Debian-stable and Amazon Linux images that Crawl4AI's 3.10 floor accommodates. Check that before you plan a migration.
Pick by where you want the schema to live
| Your situation | Pick | Why |
|---|---|---|
| The extraction logic is the product and you want it versioned as a pipeline | ScrapeGraphAI | the schema is a property of the graph, reused across every node |
| You want the fetch and the extraction to evolve separately | Crawl4AI | `CrawlResult` keeps Markdown independent of any strategy |
| You need the same page to produce the same object every time | Crawl4AI, LLM-free | generate the CSS schema once, then no model in the loop |
| You are on Ollama and want decoding actually constrained | ScrapeGraphAI | it sets `llm_model.format` to your JSON schema on that client |
| You are on Bedrock | neither, without a test | ScrapeGraphAI drops the schema on that client; verify before trusting it |
| Thousands of pages per day, same layout | Crawl4AI, LLM-free | zero marginal model cost beats both LLM paths by orders of magnitude |
| A few hundred pages, layouts all different | either LLM path | at a few hundred pages the model cost is single-digit dollars |
| Python 3.10 or 3.11 in production | Crawl4AI | ScrapeGraphAI 2.3.1 needs 3.12 |
| You need a crawler, not a page extractor | Crawl4AI | ScrapeGraphAI's `SearchGraph` searches, it does not crawl a site |
| Your pages are 403ing | neither; fix the fetch | both sit behind the same wall |
A structural way to think about it: ScrapeGraphAI is a declarative answer to "what should this page become", and Crawl4AI is an imperative answer to "get me this page, I'll decide". If your team already treats extraction schemas as code under review, the graph model fits. If your team treats a scraper as a fetch step feeding a transform step, the convert-and-stop model fits, and the LLM-free strategies give you an exit from inference costs that ScrapeGraphAI structurally cannot offer.
And before you choose either: check whether you need a model at all. If the data you want is in a JSON endpoint the page already calls, reading that endpoint directly beats both tools on cost, speed and determinism at once. If an official feed exists, the API usually wins. LLM extraction is for pages whose shape you cannot predict, and that is a smaller set than it looks.
Frequently asked questions
FAQ
On comparable settings they are within about 30% of each other. My measurement on a 5,418-token page put ScrapeGraphAI at $175.45 per 10,000 pages on gpt-4o and Crawl4AI at $228.98, the gap being Crawl4AI's 2,048-token default chunking. The real spread is inside each tool: sending raw HTML instead of text costs roughly 13x more on both.
No, on either tool. ScrapeGraphAI renders your schema into the prompt and parses the JSON out through langchain-core's JsonOutputParser, which checks JSON validity and not field names. Crawl4AI's force_json_response uses provider JSON mode, which has the same limit. Validate with model_validate() in your own code after extraction.
Yes. JsonCssExtractionStrategy, JsonXPathExtractionStrategy and RegexExtractionStrategy run with no model at run time, and generate_schema() lets you spend one LLM call to write the selector map, then reuse it indefinitely. ScrapeGraphAI has no equivalent, because every graph in the library ends in a model call.
Neither claims to reliably. Crawl4AI ships a stealth mode and an undetected adapter, and its own docs say that path is "Not 100% Guaranteed" and that "Some sites can still detect headless mode". ScrapeGraphAI's plain-HTTP path is a bare requests.get with no proxy, and its proxy helper can fall back to free public proxies. Fix the fetch before you compare extractors.
Both are. ScrapeGraphAI pushed to main on 6 October 2026 and released scrapegraphai 2.3.1 to PyPI the same day; Crawl4AI pushed on 5 October 2026 with Crawl4AI 0.9.4 on PyPI from 23 September 2026. Neither publishes GitHub Releases, so read PyPI upload dates and commit history rather than looking for a changelog.
Because model_tokens was not set and your model was not in the library's lookup table, so it fell back to 8,192 and ParseNode chunked at 7,942. The run logs "Using default token size: 8192" and continues. On a 71,708-token page that turns one call into eleven. Pass model_tokens explicitly in the llm config.
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
Related articles

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.

Loginways Alternatives: 6 Antidetect Browsers Compared
Loginways alternatives compared by price at 150, 500 and 2,000 profiles, team seats, API and engine freshness, after Loginways' download links returned 404.

Ghost Browser vs Multilogin: Which Fits Your Team?
Ghost Browser vs Multilogin (Nov 2026): session isolation vs fingerprint spoofing, per-user vs per-profile pricing, and proxy per tab vs per profile.
