Extract
Extract structured JSON data from any URL. Provide a JSON schema for typed output, or a natural language prompt for flexible extraction. Both modes use an LLM to parse the page content.
POST
/v1/extractExtract structured data from a URL using a JSON schema or natural language prompt.
Note
This endpoint requires an LLM provider. The provider chain tries Ollama (local) first, then falls back to OpenAI, then Anthropic. At least one must be configured.
Schema mode
Provide a JSON Schema and the LLM will return data conforming to it. This gives you predictable, typed output.
Request body
Response
Prompt mode
Describe what you want in plain English. The LLM will determine the structure based on your prompt and the page content.
Request body
Response
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to extract data from. |
schema | object | No* | JSON Schema defining the desired output structure. |
prompt | string | No* | Natural language description of what to extract. |
Warning
You must provide either
schema or prompt. If both are provided, schema takes precedence.LLM provider chain
The extract endpoint tries LLM providers in this order:
- Ollama (local) -- free, no API key needed. Set
OLLAMA_HOSTif not running on localhost. - OpenAI -- requires
OPENAI_API_KEY. - Anthropic -- requires
ANTHROPIC_API_KEY.