Crawl4AI Cloud
Get a free API key
Search tools and guides/
Guides · The Toolkit

The Toolkit

Everything Crawl4AI does is a tool. You find one, read what it takes and returns, and run it. Three calls, one key, and every reply has the same shape.

Find, read, run

  1. Find a tool: GET https://api.crawl4ai.com/tools?q=video+transcript. Free, no key.
  2. Read it: GET https://api.crawl4ai.com/tools/youtube-captions. Its inputs, what comes back, its cost. Free, no key.
  3. Run it: POST https://api.crawl4ai.com/tools/youtube-captions with your key. You pay only when it returns something.

Try it here

The same search the directory uses, on this page. Type what you need.

See every match in the directory →

Find a tool

GET /tools lists the tools, ranked for your words. No key is needed and nothing is charged. HEAD works on every read address too.

curl "https://api.crawl4ai.com/tools?q=amazon+price"
curl "https://api.crawl4ai.com/tools?kind=sites&q=reviews"
curl "https://api.crawl4ai.com/tools?source=linkedin"
curl "https://api.crawl4ai.com/tools?essential=true"
inputtypedefaultwhat it means
qstring–Words or a sentence. Other names, small typos and a tool's own id are understood. The answer is the nearest tools, best first, with match: strong (the first tool holds every word and leads clearly: run it), possible (several fit, or a word is in no tool: unmatched lists it; read the lines and decide), none.
kindstring–pages (read pages), search, people (people and companies) or sites (data tools, one site each).
sourcestring–A site id, e.g. amazon, linkedin, youtube.
statusstring–verified, beta or failing.
essentialbool–true: only the 11 fundamental tools, the tools that work on any website.
limit · cursorint · string50Tools on a page, at most 200; next_cursor from the last answer gives the next page.

The answer is {tools, total, counts, next_cursor, version}. Each tool comes back as {id, name: [lead, rest], source, kind, summary, cost, typical, status, essential, beta}.

Read a tool

GET /tools/{id} gives one tool in full: its inputs (name, type, required, help, example), examples, output.fields (name and meaning), cost, status and input_schema (a JSON Schema of its inputs). Free, no key. An unknown id answers 404 tool_not_found with did_you_mean, the three closest ids. GET /tools/{id}/status answers {tool, status} alone.

curl "https://api.crawl4ai.com/tools/amazon-product"

The status: a fundamental tool is always verified. A data tool is verified while its checks pass in this region, failing after its checks fail, and beta otherwise.

Run a tool

POST /tools/{id} takes the tool's inputs as the JSON body (at most 8 MB) and runs it on your key, at the price of the tool's older address. The inputs have the same names and the same defaults as there.

curl -X POST https://api.crawl4ai.com/tools/scrape \
  -H "Authorization: Bearer $CRAWL4AI_API_KEY" -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

One reply shape

Every reply has the same shape:

json
{ "tool": "amazon-product", "request_id": "req_9f41c7d0a1b2c3d4", "took_ms": 1412,
  "usage": { "credits": 1.0 },
  "rows": [ { "asin": "B0F5HSNDXF", "title": "…", "price": 39.99 } ],
  "data": { … the rest of the tool's answer … } }

A tool that returns records puts them under rows; everything else of its answer is under data. A part that is empty is left out.

Tool Answers under
search, serp, extract, scan, price, every data tool rows
lead with find people, companies or industries rows
verify with check email rows (the one address is rows[0])
scrape data (the page is data.markdown)
answer data
site, verify with check list, a job-only data tool data (a job: data.job_id and data.poll)
watch data (the new watch)
lead with find enrich, email, phone or company data

These headers come back with every run:

Header What it holds
x-c4-cost What this call cost, in credits (the same figure as usage.credits).
x-c4-balance Your credit after this call.
x-c4-allowance-left Credits left under this month's allowance (Free, Starter).
x-c4-request-id The call's id, the same as request_id. Quote it when you write to us.
retry-after Seconds to wait, on a 429 or a 503.
x-c4-watch-changes How many changes on your watches you have not read yet.

Options

Options that apply to every tool go in headers, so the body stays the tool's inputs:

inputtypedefaultwhat it means
Crawl4AI-Freshheader–true: skip our cache and fetch live, at the live price. ?fresh=1 on the address does the same. Watch, lead and verify have no cache.
Idempotency-Keyheader–Sent with the call as it is. Scrape jobs (POST /tools/batch with scrape) honour it: a retry with the same key returns the same job. Other tools do not deduplicate yet.

There is no region option. api.crawl4ai.com picks the nearest region; to pin one, call its host: eu-gate.crawl4ai.com, sin-gate.crawl4ai.com or us-gate.crawl4ai.com. Every host serves /tools. See Regions.

Estimate

POST /tools/{id}/estimate with the same body says what a run would cost, before it runs. Free. The answer is in the same envelope, under data: for scrape, extract, search and answer a range from real traffic (min, max, text); for every other tool the tool's cost rule (data.text, data.rule).

curl -X POST https://api.crawl4ai.com/tools/scrape/estimate \
  -H "Authorization: Bearer $CRAWL4AI_API_KEY" -H "Content-Type: application/json" \
  -d '{"url":"https://news.ycombinator.com"}'

Batch

POST /tools/batch takes {tool, inputs: [...], stream?}: many inputs of one tool.

  • scrape with many inputs starts one job of up to 10,000 pages. Each input's url is fetched; the first input's other options (format, proxy, country, parse) apply to all. The answer carries data.job_id and data.poll; follow it under Jobs.
  • scrape with "stream": true takes up to 50 pages and answers them in the same call, as NDJSON: one JSON line per page as it finishes (with its cost in credits), then a last {"summary": {...}} line with the whole batch's cost.
  • A data tool that runs as a job takes one input and starts that job.

Any other tool answers 422 invalid_input. Crawl4AI-Fresh applies to a batch as to a run.

curl -X POST https://api.crawl4ai.com/tools/batch \
  -H "Authorization: Bearer $CRAWL4AI_API_KEY" -H "Content-Type: application/json" \
  -d '{"tool":"scrape","inputs":[{"url":"https://a.com","format":"md"},{"url":"https://b.com"}]}'
# → {"tool":"scrape", ..., "data":{"job_id":"j_eu-…","poll":"/tools/jobs/j_eu-…", ...}}

Jobs

A run that takes long is a job. Its answer carries data.job_id and data.poll, the address to follow it: "/tools/jobs/<job_id>". Every job kind is followed here: a scrape batch, a site crawl, a data tool's job and a verify list.

Route Does
GET /tools/jobs/{job_id} The state: pending, running, done, or paused with a paused_reason; the counts and the job's cost. A verify list holds its answers here.
GET /tools/jobs/{job_id}/results The rows, one JSON object per line (NDJSON), each with a seq number. Page with ?after=N (500 a page).
POST /tools/jobs/{job_id}/retry Run the failed pages again.
DELETE /tools/jobs/{job_id} Stop the job. It ends as paused.

Reading a job, its rows and stopping it cost nothing, so an empty balance never locks you out of a job you already paid for. Results are kept 3 days after the job ends.

Which tools answer with a job:

  • site is always a job.
  • verify with check: "list" is a job; its answers are in its state.
  • A data tool that runs only as a job (for example linkedin-company-people) answers with a job.
  • A data tool that runs both ways answers in the same call, waiting up to 300 s; send it to POST /tools/batch to run it as a job.
JOB=$(curl -s -X POST https://api.crawl4ai.com/tools/site \
  -H "Authorization: Bearer $CRAWL4AI_API_KEY" -H "Content-Type: application/json" \
  -d '{"url":"https://docs.crawl4ai.com/","max_pages":20}' | jq -r .data.job_id)

# a new job is pending, then running: wait for done or paused
while true; do
  S=$(curl -s https://api.crawl4ai.com/tools/jobs/$JOB -H "Authorization: Bearer $CRAWL4AI_API_KEY" | jq -r .status)
  case "$S" in done|paused) break;; esac; sleep 5
done

curl -s "https://api.crawl4ai.com/tools/jobs/$JOB/results?after=0" -H "Authorization: Bearer $CRAWL4AI_API_KEY"

Which tool

Scrape reads one page. Extract gives rows from a page. Crawl (site) does a whole site. For a named site, use its data tool first: it is cheaper and needs no parsing. The 11 fundamental tools work on any website; each links to its page.

id what you get a minimal body
scrape Any URL in, clean Markdown out {"url": "https://example.com"}
extract Typed rows from plain words {"url": "https://books.toscrape.com", "instruction": "title, price and availability of every book"}
site Every page of a site as Markdown, as one job {"url": "https://docs.crawl4ai.com/", "max_pages": 10}
scan Every URL of a site, without crawling {"domain": "docs.crawl4ai.com"}
price Every plan and price on a pricing page {"sites": ["hubspot.com", "canva.com"], "country": "gb"}
watch An alert when a page changes your way {"url": "https://example.com/pricing", "watch": "a plan gets more expensive", "email": "you@example.com"}
search Ranked web results, pages read on request {"q": "rust programming language"}
serp Google's results page as data {"q": "best crm software", "country": "us"}
answer A written answer with its sources {"q": "capital of france"}
lead People and companies with checked emails {"find": "people", "where": {"company": {"industry": "Dentists", "country": ["at"]}}}
verify Valid, invalid, accept_all or unknown {"check": "email", "email": "hello@crawl4ai.com"}

lead picks its search with find (people, companies, enrich, email, phone, company, industries); verify with check (email, list, domain). The 98 data tools are found with GET /tools?kind=sites.

Errors

Every error answers {error, message, tool?, request_id?}, with its own fields next to them.

statusreasonwhat it meansbilled
401unauthorizedNo key, or not a valid one, on a run: send Authorization: Bearer <your key>.free
404tool_not_foundNo tool with that id; did_you_mean lists the three closest.free
422invalid_inputThe body is not a JSON object of the tool's inputs, or a required input is missing; message and details[].problem say which.free
402no_credit · spend_cap · plan_capOut of credit, over your own cap, or over your plan's allowance, as at the older addresses; actions says what to do.free
405method_not_allowedA method the address does not take; message lists the routes.free
429public_rate_limitToo many calls without a key from one address. Only keyless calls (finding and reading tools) meet it; a keyed run meets your plan's limits.free
503tool_failingThe tool's daily check is failing; it was not run.free
503toolkit_unavailableThe tool catalog is not on this host yet; the older addresses work.free
502source_failedThe tool did not answer.free
504timeoutThe tool did not answer in time.free

Any other error is the tool's own, as its older address answers it, with tool and request_id added. A failed run costs nothing.

Older addresses (still supported)

POST /scrape, GET /serp, POST /recipes/amazon-product and every other older address work as before, at the same price. Use POST /tools/{id} for new code. Older addresses lists each one and what differs.