Web crawling API
Web crawling API: pages, whole sites and search, with one key.
A web crawling API fetches web pages for you over HTTP, so you do not run browsers, proxies or retries. Crawl4AI Cloud answers at https://api.crawl4ai.com from three regions (EU, Singapore, US). One key covers one page (/scrape), many pages (/scrape/batch, /scrape/jobs), a whole site (/scan, /site), fields as JSON (/extract) and search (/search, /serp). A plain page costs 0.1 credit ($0.0001). A failed call costs nothing.
1How does a call work?
Every call goes to https://api.crawl4ai.com with the header Authorization: Bearer <key>. The request goes to the nearest of our three regions: the EU, Singapore or the US. Bodies and answers are JSON. Each answer carries the headers x-c4-cost (what the call cost, in credits) and x-c4-balance (what is left).
A page that needs a real browser can take up to 90 seconds. Set your HTTP client timeout to 120 seconds. If your client must stop sooner, send timeout a little below its limit, and you get a clear answer in time.
These answers are never charged:
| Status | Reason | What to do |
|---|---|---|
| 403 | blocked | Every step got the site's block page. Log the URL and skip it. |
| 403 | login-wall | The page asks for a login or a payment. Skip it. |
| 502 | no-answer | The site did not answer, or gave an empty page. A retry rarely helps. |
| 503 | busy | No browser was free for a moment. Send the same request again after a few seconds. |
| 504 | timeout | Your timeout ran out before any step served the page. |
2Fetch one page: /scrape
The service tries the cheapest engine that works for the site: our archive, a plain fetch, then a browser. Ask for md, html or both. Add country to fetch the page from one country.
curl https://api.crawl4ai.com/scrape \
-H "Authorization: Bearer $CRAWL4AI_KEY" -H "Content-Type: application/json" \
-d '{"url":"https://example.com","format":"both","country":"gb","timeout":25,
"parse":{"links":true,"metadata":true}}'
The answer carries markdown, html, a content_hash, the engine that served the page, and ladder: the steps tried, in order. See the /scrape docs.
3Fetch many pages: /scrape/batch and /scrape/jobs
/scrape/batch takes up to 50 URLs and streams the answers back as NDJSON, one line per URL as it finishes, then one summary line with the total cost.
curl -N https://api.crawl4ai.com/scrape/batch \
-H "Authorization: Bearer $CRAWL4AI_KEY" -H "Content-Type: application/json" \
-d '{"urls":["https://example.com","https://example.org"],"format":"md"}'
/scrape/jobs takes up to 10,000 URLs and runs in the background, so nothing waits on a slow page. Poll GET /scrape/jobs/{id}, then read GET /scrape/jobs/{id}/results. URLs that never got an answer are refunded at the end. Results are kept 3 days. Use a new Idempotency-Key for each new job; send the same key again only to retry the same submit, and you get the first job back, billed once.
curl https://api.crawl4ai.com/scrape/jobs \
-H "Authorization: Bearer $CRAWL4AI_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"urls":["https://example.com","https://example.org"]}'
4Crawl a whole site: /scan, then /site
/scan lists a site's URLs from the sources that already know them: its sitemaps and its home page links. Most sites answer in 1 to 3 seconds. Add "extended":true to also ask Common Crawl and the Wayback Machine.
curl https://api.crawl4ai.com/scan \
-H "Authorization: Bearer $CRAWL4AI_KEY" -H "Content-Type: application/json" \
-d '{"domain":"docs.crawl4ai.com","include":"*/blog/*"}'
/site crawls from a start URL, level by level: the start page, the pages it links to, and so on, only inside the site. Up to 5 levels and 500 pages; a job runs for at most one hour. Set content to none to get only the URL list with titles and status codes.
curl https://api.crawl4ai.com/site \
-H "Authorization: Bearer $CRAWL4AI_KEY" -H "Content-Type: application/json" \
-d '{"url":"https://docs.crawl4ai.com/","depth":3,"max_pages":200,"exclude":"/blog"}'
The answer is 202 with a job_id. Then GET /site/jobs/{id} for the status and GET /site/jobs/{id}/results for the rows. See the /scan docs and the /site docs.
5Get fields as JSON: /extract
Give a URL or your own content, and an instruction, a JSON schema, or both. A language model reads the page and returns records that match the schema.
curl https://api.crawl4ai.com/extract \
-H "Authorization: Bearer $CRAWL4AI_KEY" -H "Content-Type: application/json" \
-d '{"url":"https://crawl4ai.com/pricing/",
"instruction":"each plan with its monthly price and credits",
"schema":{"type":"array","items":{"type":"object","properties":{
"plan":{"type":"string"},"usd_month":{"type":"number"},"credits":{"type":"integer"}}}}}'
You pay for the page and the model's tokens. See the /extract docs.
6Search the web: /search, /serp and /answer
GET /search returns ranked results with title, URL and snippet, for 1 credit. GET /serp (beta) returns Google's results page as data, with true ranks, for rank tracking. GET /answer (experimental) returns a direct answer with its sources.
curl "https://api.crawl4ai.com/search?q=web+crawling+api&rich=1" \
-H "Authorization: Bearer $CRAWL4AI_KEY"
curl "https://api.crawl4ai.com/serp?q=web+crawler&country=gb&language=en" \
-H "Authorization: Bearer $CRAWL4AI_KEY"
curl "https://api.crawl4ai.com/answer?q=what+is+a+sitemap" \
-H "Authorization: Bearer $CRAWL4AI_KEY"
7Ready-made scrapers: recipes
For sites like Amazon, Zillow, Booking, Yelp, YouTube and GitHub, a recipe returns rows with fixed, named columns. It is tested for that site, so you do not write a parser.
curl https://api.crawl4ai.com/recipes/amazon-product \
-H "Authorization: Bearer $CRAWL4AI_KEY" -H "Content-Type: application/json" \
-d '{"product":"B0F5HSNDXF","country":"us"}'
The answer is {"recipe":"amazon-product","rows":[...],"usage":{...}}. GET /recipes (free) lists every recipe with its inputs and columns. See the recipes.
8Get told when a page changes: Watch
Watch (in beta) checks a page as often as it really changes, at least once a day, or at a fixed interval of 4 minutes or more. It calls your webhook when the page changes in the way you describe.
curl https://api.crawl4ai.com/monitors \
-H "Authorization: Bearer $CRAWL4AI_KEY" -H "Content-Type: application/json" \
-d '{"url":"https://example.com/changelog","watch":"a new release is listed",
"every":"1h","notify":{"webhook":"https://you.example/hook"}}'
A check costs 1 credit; with a fixed interval under 1 hour it costs 2 (the 1h above costs 1). A confirmed change that matched costs 3. Up to 100 monitors per account. See the Watch docs.
9Limits and prices
Every plan uses the same credits on every endpoint. One credit is $0.001 at list price. Extra credits on a plan never expire.
| Plan | Price a month | Credits a month | Requests a minute | At once |
|---|---|---|---|---|
| Free | $0 | 1,000 | 10 | 2 |
| Starter | $10 | 10,000 | 120 | 10 |
| Builder | $99 | 125,000 | 600 | 20 |
| Scale | $499 | 750,000 | 1,500 | 50 |
| Page or call | Credits | Per 1,000 |
|---|---|---|
| A page already in our archive | 0.05 | $0.05 |
| A plain page | 0.1 | $0.10 |
| A real browser page | 0.5 | $0.50 |
| A hard site (the site fought back) | 2 | $2.00 |
| A search | 1 | $1.00 |
| A failed call | 0 | $0 |
From GET /v1/prices (plans and by_level.scrape), read 23 November 2026. /scan and /site add 1 unit for the call, then each page they read, priced like /scrape.
Example, not a measurement: crawling 10,000 pages a month, 80% plain and 20% in a browser, is 8,000 × 0.1 + 2,000 × 0.5 = 1,800 credits, inside the Starter plan. See pricing, and build vs buy for what the same crawl costs when you run it yourself.
10Questions
What is a web crawling API?
An HTTP API that fetches web pages for you. You send a URL, or a start URL for a whole site, and get the content back. The service runs the browsers, the proxies and the retries, so you do not.
Can it crawl a whole website?
Yes. POST /scan lists a site's URLs from its sitemaps and home page links in one call. POST /site crawls a site level by level from a start URL, up to 5 levels and 500 pages, and returns each page as Markdown. For your own list of up to 10,000 URLs, use POST /scrape/jobs.
Is there a free plan?
Yes. The free plan costs $0 and needs no card. It gives 1,000 credits every month, 10 requests a minute and 2 at a time. A plain page costs 0.1 credit.
What are the rate limits?
Free: 10 requests a minute, 2 at a time. Starter: 120 a minute, 10 at a time. Builder: 600 a minute, 20 at a time. Scale: 1,500 a minute, 50 at a time. A call over the limit gets a 429 with X-RateLimit-* headers.
What happens when a site blocks the request?
You get a 403 with the reason blocked or login-wall, or a 502 when the site did not answer. None of these is charged. A 503 busy means no browser was free for a moment: send the same request again after a few seconds.
Where are my requests processed?
In three regions: the EU, Singapore and the US. https://api.crawl4ai.com routes each request to the nearest one. The pages you fetch are used only to answer your request. See the security page.
Next: AI web crawler · compare · build vs buy · API docs · llms.txt