Skip to main content
POST /v1/extract fetches up to 20 URLs, passes their content to an LLM, and returns structured data matching your description. Tell the extraction model what you want in plain English via prompt, and optionally provide a schema (JSON Schema) to enforce the exact shape of the output. This eliminates the need to manually scrape pages, parse HTML, and write custom extraction logic — the LLM handles it. For large or complex extractions, the endpoint may return immediately with status: "processing" and a job_id to poll.

Endpoint

Authentication: Authorization: Bearer sk-<key>

Request Parameters

string[]
required
Array of URLs to extract data from. Maximum 20 URLs per request.
string
required
Natural-language description of what to extract. Be specific — for example: "Extract the top 5 story titles, their URLs, and point counts".
object
JSON Schema object that describes the expected structure of data in the response. When provided, the extraction LLM is instructed to conform its output to this shape. Omit for free-form extraction.
string
Custom system prompt for the extraction LLM. Use this to adjust tone, add domain context, or provide additional instructions beyond the prompt.
When true, the extraction process may follow external links found on the provided URLs to gather additional context.
integer
default:"60"
Maximum time in seconds to wait for extraction to complete synchronously. Accepted range: 10–120. Requests that exceed this may return status: "processing" — poll with job_id in that case.

Response

boolean
true if the extraction request was accepted and completed (or queued) without error.
string
Unique identifier for this extraction job. Present on all responses — use it to poll if status is "processing".
string
Extraction status. Either "completed" (data is ready in this response) or "processing" (poll job_id until complete).
object
Extracted data. Shape matches the provided schema when one is specified. null or absent when status is "processing".
string | null
Error message if extraction failed, otherwise null.

Code Example


Async Behavior

Large or multi-URL extractions may not complete within timeout_seconds. When this happens, the API returns immediately with status: "processing" and a job_id:
Poll GET /v1/extract/{job_id} (using your API key) at a reasonable interval (every 5–10 seconds) until status changes to "completed" or "failed". The completed response has the same shape as a synchronous result.
To minimize the chance of hitting async mode, keep your URL list small (3–5 URLs) and set a generous timeout_seconds (90–120). For bulk extraction workloads, batch your URLs across multiple requests rather than submitting all 20 at once.

Errors