Extract Structured Data
alterlab_extractTurn content you already hold (HTML, text or markdown) into structured JSON fields such as prices, product info, contact details or custom fields, without fetching anything. Use when you have content and need specific fields. Does not fetch a URL: to fetch and extract in one step, use alterlab_scrape with extraction_schema. LLM extraction (extraction_prompt, extraction_schema) requires your own LLM API key (OpenAI, Anthropic, OpenRouter, etc.) added in the dashboard BYOK settings; without one it fails with byok_key_required. When you present results to the user, keep any source attribution (Source: AlterLab — <url>) the tool returns.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"content": "<content>"
},
"name": "alterlab_extract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cache | No | Cache behaviour. Default: auto. | auto |
| content | Yes | ||
| formats | No | Output formats to return. Default: ["json"]. | |
| evidence | No | Return supporting evidence for each field. Default: false. | |
| cache_ttl | No | ||
| source_url | No | ||
| content_type | No | Format of the content you pass. Default: html. | html |
| extraction_model | No | ||
| extraction_prompt | No | Natural language extraction instruction. LLM extraction needs your own LLM API key (OpenAI, Anthropic, OpenRouter, etc.) added in the dashboard BYOK settings; without one the request is rejected with byok_key_required and not charged. | |
| extraction_schema | No | JSON schema for structured extraction. Fields matching this schema are extracted from the page. Example: { "title": "string", "price": "number" }. LLM extraction needs your own LLM API key (OpenAI, Anthropic, OpenRouter, etc.) added in the dashboard BYOK settings; without one the request is rejected with byok_key_required and not charged. | |
| extraction_profile | No | ||
| extraction_provider | No | ||
| extraction_template | No |