Crawl4AI Cloud
Get a free API key
Search tools and guides/
Guides · Still supported

Older addresses (still supported)

Built on /scrape, /search or /recipes/...? Nothing breaks. Each one is the same tool under /tools/{id}, at the same price. Use /tools for new code.

Each older address and its tool

Older address The tool Run it now with
POST /scrape scrape POST /tools/scrape
POST /extract extract POST /tools/extract
POST /site site POST /tools/site
POST /scan scan POST /tools/scan
GET /search search POST /tools/search
GET /serp serp POST /tools/serp
GET /answer answer POST /tools/answer
POST /price price POST /tools/price
POST /monitors watch POST /tools/watch
POST /lead/people/search and the other /lead addresses lead POST /tools/lead
GET /verify, POST /verify, GET /verify/domain verify POST /tools/verify
POST /recipes/{id} every data tool POST /tools/{id}

What differs

  • Request: search, serp and answer are GET with a query string (1/0 for booleans); through /tools they are POST with a JSON body (true/false). lead and verify have one address per kind; through /tools one tool picks with find or check.
  • Reply: an older address answers its own body with no envelope (for example markdown at the top level, not data.markdown); the cost is in the x-c4-cost header.
  • Jobs: an older job is read at its own address (/scrape/jobs/{id}, /site/jobs/{id}, /recipes/jobs/{id}, /verify/jobs/{id}); every one of them also reads at /tools/jobs/{id}.
  • Kept only at the older address: reading or changing a watch (/monitors/...), price history (/price/history), forgetting a verify answer.

Both are counted as the same tool in Usage.

Scrape many pages in one call

Request

# -N streams each result line as it lands
curl -N https://api.crawl4ai.com/scrape/batch \
  -H "Authorization: Bearer $CRAWL4AI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://a.com", "https://b.com"], "format": "md"}'

Body

inputtypedefaultwhat it means
urlsrequiredstring[]–The URLs to scrape (max 50 per call).
timeoutnumber–Seconds, 5 to 120: the limit of the WHOLE batch. Set it a little below your HTTP client timeout. Each URL gets the time left; a URL not done in time ends with {"ok":false,"error":"sync_window_exceeded"}, free.
…-–Any scrape input (format, proxy, country, parse) applies to every URL.

Try it with your key

Run it in the Toolkit and see the answer, the time and the credits.

Open scrape in the Toolkit

Bulk jobs

You can read a job from any region: api.crawl4ai.com finds it wherever it runs.

Request

# 1. submit -> job id
JOB=$(curl -s https://api.crawl4ai.com/scrape/jobs \
  -H "Authorization: Bearer $CRAWL4AI_API_KEY" -H "Content-Type: application/json" \
  -d '{"urls": ["https://a.com", "https://b.com"]}' | jq -r .job_id)

# 2. poll until the job is done, or paused (stopped, or out of credit)
while :; do
  S=$(curl -s https://api.crawl4ai.com/scrape/jobs/$JOB \
       -H "Authorization: Bearer $CRAWL4AI_API_KEY" | jq -r .status)
  case "$S" in done|paused) break;; esac; sleep 2
done

# 3. fetch results (NDJSON, one line per URL)
curl -s https://api.crawl4ai.com/scrape/jobs/$JOB/results \
  -H "Authorization: Bearer $CRAWL4AI_API_KEY"

Routes

Route Does
POST /scrape/jobs Submit urls (max 10,000) + any /scrape field. Returns a job_id. An optional Idempotency-Key header makes a retry safe (below).
GET /scrape/jobs/{id} Status + counts (pending / done / error). Add ?full=1 for per-URL detail.
GET /scrape/jobs/{id}/results Streamed results, paged with ?after=N (500 per page; add &limit=N for fewer, 1 to 500). Kept 3 days after the job ends, then the job id answers 404.
POST /scrape/jobs/{id}/retry Re-run just the failed URLs.

The same job also reads at /tools/jobs/{id}, /tools/jobs/{id}/results, POST /tools/jobs/{id}/retry and DELETE /tools/jobs/{id}.

Retry a submit safely

A job is billed when it is accepted. If the answer to your submit is lost, send the same request again with the same Idempotency-Key header: you get the first job back ("duplicate": true) and pay once.

  • The key is 1 to 128 printable ASCII characters, with no space and none of / \ ? # %. A UUID works.
  • Use one new key per job. The key belongs to your account, so any of your API keys finds the job.
  • A key outside this rule answers 400 with {"error": "bad_idempotency_key"}, and nothing is submitted.

Try it with your key

Run it in the Toolkit and see the answer, the time and the credits.

Open scrape in the Toolkit