Document Extraction
documentsExtract structured data from URLs or content. Returns the extracted data as JSON (shaped by your schema when you pass one), with the source URL and whether long content was truncated. Use to turn a page or a text into structured fields. For a page's full text use scrape; for invoices and receipts use invoice-parse. Pass url or content; extraction_prompt says what to extract, and schema fixes the shape of the JSON you get back. Cost: 3 credits, charged only when a call succeeds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to scrape and extract from. | |
| schema | No | JSON schema for extraction. | |
| content | No | Pre-scraped text content. | |
| extraction_prompt | Yes | What to extract (required unless schema is provided). |