Extract typed JSON
https://api.crawl4ai.com/extractPull structured, typed data out of a page with an instruction and/or a JSON schema. Give a URL (we fetch it) or your own content.
Request
curl https://api.crawl4ai.com/extract \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "url": "https://news.ycombinator.com", "instruction": "the top stories on the front page", "schema": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "points": { "type": "integer" }, "url": { "type": "string" } }, "required": ["title", "points"] } }, "example": [ { "title": "Show HN: My project", "points": 128, "url": "https://..." } ] }'
Body
urlstring | Page to read. We fetch it for you. |
contentstring | Your own text/markdown/html to extract from, instead of a URL. |
instructionstring | Plain-English description of what to pull out. |
schemaobject | JSON schema each returned record must match — gives you typed, predictable output. |
exampleobject | A sample of the shape you want (structure, not values). |
Give a URL or content (plus an instruction and/or schema). Long pages are chunked and re-assembled automatically.
Run this call in the playground and see the real answer, the time and the units.
Next
Fetch a page and return clean Markdown (and/or HTML).
Answer a questionGET /answerAsk a question, get a direct answer.
Scrape many pagesPOST /scrape/batchScrape many URLs in one call — up to 50.
Something unclear or wrong on this page? Tell us.