Answer a question
https://api.crawl4ai.com/answerAsk a question, get a direct answer. Some questions won't have one yet — then answered is false (use /search for links). Ask for the shape you want in the question itself — "answer with JSON only: {…}", "as a markdown table", "quote the source and give its URL" — or pass a schema. Add deep=0 for a direct answer only when one is readily available (no page reading). Experimental: the shape may still change.
experimental
Request
curl "https://api.crawl4ai.com/answer?q=why+is+the+sky+blue" \ -H "Authorization: Bearer sk_live_..."
{ "answered": true, "answer": { "text": "The sky is blue because Earth's atmosphere scatters sunlight…", "source": "crawl4ai", "sources": [ { "title": "NASA", "url": "https://…" } ] }, "query": "why is the sky blue", "experimental": true }
Query parameters
qstring | The question, or a whole prompt (max 4,000 characters). A long prompt is turned into a search query for you. |
schemaobject | A JSON Schema the answer must match; the answer is then JSON of exactly that shape. |
deep0 | 1 | Default 1Default 1: a direct answer from the web's top results, reading a couple of pages when needed. |
Response
| Field | Description |
|---|---|
answer.text |
The answer. When the question asked for JSON, or a schema was given, it is JSON as a string: parse it. |
answer.source |
google_ai_overview or google_ai_mode: the web's own direct answer, word for word. crawl4ai: our model wrote it from the pages. |
answer.sources |
The pages it drew on, {title, url}; present when there are any. |
query |
The search query used for the question. |
Price: 1 credit for an answer found directly; 3 credits when our model writes it, whatever its length; nothing when answered is false or on a 400.
Run this call in the playground and see the real answer, the time and the units.
Next
Crawl4AI's own web search: results ranked and cleaned for reading.
Extract typed JSONPOST /extractPull structured, typed data out of a page with an instruction and/or a JSON schema.
Something unclear or wrong on this page? Tell us.