MarkUDown
Extract API — MarkUDown AI data extraction API docs
POST
/api/extractExtract
Scrape a URL and use an LLM to extract structured data from it based on your schema. Define exactly which fields you need — the AI handles the parsing.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| url | string | required | — | URL of the page to extract from. Always send it — the job fails without it. |
| extract_query | string | required | — | Natural language description of what to extract, e.g. "Book title, price and availability". |
| schema | array<object> | required | — | Fields to extract: [{name, type, active}]. Only fields with active: true are used; type is a hint for the LLM (e.g. String, Number, Boolean, Array). |
| extraction_scope | string | optional | null | Optional hint passed to the LLM, e.g. "single_page" or "list_page". It does not make Extract read other pages. |
| extraction_target | string | optional | null | Optional hint passed to the LLM, e.g. a category name such as "poetry". |
| callback_url | string | optional | null | Webhook URL to POST the result to when the job completes. |
allowed_words, blocked_words, allowed_patterns and blocked_patterns (returned by Create Schema) are accepted but not applied: Extract reads only the page at url. Only the first 50,000 characters of the page's Markdown are sent to the LLM.
Request
{
"url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
"extract_query": "Book title, price and availability",
"schema": [
{ "name": "title", "type": "String", "active": true },
{ "name": "price", "type": "String", "active": true },
{ "name": "in_stock", "type": "Boolean", "active": true }
],
"extraction_scope": "single_page"
}Response
// POST returns { "success": true, "id": "abc123", "url": "/api/extract/abc123" }
// Poll GET /api/extract/{id}
{
"success": true,
"id": "abc123",
"status": "completed",
"data": {
"success": true,
"data": [
{
"title": "A Light in the Attic",
"price": "£51.77",
"in_stock": true,
"url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
}
],
"total": 1,
"url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
"processing_time_ms": 6120
}
}