POST /v2/extract
Structured data from pages, validated against your schema
Give URLs (or a whole section with /*) plus a prompt and/or a JSON Schema. Extract reads the pages and returns one JSON object that matches your schema — with sources if you ask.
- Endpoint
POST /v2/extract- Mode
- Background job — poll GET /v2/extract/{id}
- Credits
- 1 per page · +1 per 15 LLM tokens
- Also
POST /v1/extract· MCP toolengine_extract
What it's for
Competitor pricing tables
Plans, prices and quotas from a handful of pricing pages, in one normalised JSON.
Directory and catalogue data
Names, addresses, product specs from a site section like https://example.com/team/*.
Web-backed enrichment
No URLs? With a prompt alone (or enableWebSearch) the engine searches the web for sources first.
Whole site sections
With many pages (a /* section) every page is read with your prompt and schema, each value comes with a quote that is checked against the page, and the results are merged in code — lists joined and de-duplicated, disagreeing values listed in conflicts.
How it works
- Collect pages
Listed URLs are read; a trailing /* maps that section (up to 25 pages). Invalid URLs are skipped and listed in invalidURLs.
- Read
Pages are scraped as Markdown (up to 25 per job).
- Extract
An LLM fills your schema from the pages; the result is validated and mismatches are reported in warning.
- Poll
GET /v2/extract/{id} returns status, data, creditsUsed, tokensUsed and — with showSources — the pages used.
- Page metadata first
The page's own title, byline, publication date and description (meta tags and JSON-LD) are passed to the model before the text, so "who wrote it" and "when" come from the page, not from a guess. Measured on a news article: 2 of 2 authors found, 0 of 2 before.
- Long pages
A page longer than the model's window is not cut at the start: the parts that match your prompt and schema are passed (a table keeps its header row), so data near the end of a long page is found — 3 of 3 values in the measured case, 0 of 3 before.
- Rank and merge
A /* section's URLs are ranked against your prompt before the 25-page cut; with mode map_reduce (auto picks it for more than 5 pages) each batch of pages is extracted separately and merged without another LLM call — an LLM decides only between two verified, conflicting values.
- Or without an LLM
When you know where the data sits on a page, the selectors format reads it by CSS, XPath, regex or JSONPath — 1 credit a page, the same answer every time.
Extract or a scrape format?
Extract bills 1 credit per page + 1 credit per 15 LLM tokens — the tokens are the page text the model reads, so the price grows with page length. A scrape json or query format bills a flat 1 + 4 credits per page, whatever its length.
| You have… | Use | Typical cost (measured on the same pages) |
|---|---|---|
| One known URL, one record (an article's author and date) | POST /v2/scrape with formats: [{"type": "json", "prompt": …, "schema": …}] | 5 credits |
| One known URL, a list (products, a table) | the query format — the selectors are cached, repeat calls skip the LLM | 5 credits, then 2 |
Several URLs, a /* site section, or no URL at all (web search) | Extract — one result merged from all pages, with showSources | ≈ 165 credits for a 20-item listing page, ≈ 410 for a 120,000-character table page |
Request parameters
Full docs →| Field | Type | Default | Description |
|---|---|---|---|
urls | string[] | — | Up to 100 URLs; a trailing /* includes that site section. |
prompt | string | — | What to extract (up to 10000 characters). Required without a schema or without urls. |
schema | object | — | JSON Schema for the result. |
systemPrompt | string | — | Extra instructions (up to 4000 characters). |
enableWebSearch | boolean | false | Add web search results to the sources. |
showSources | boolean | false | Return the pages that were used. |
ignoreInvalidURLs | boolean | true | Skip bad URLs instead of failing (v1: false). |
includeSubdomains | boolean | true | For /* wildcards. |
scrapeOptions | object | — | Per-page scrape options (formats is ignored). |
webhook | string | object | — | Notified on started/completed/failed. |
mode | string | auto | auto · single · map_reduce — how the pages are read: one call, or one call per batch of pages with verified merging. |
Unknown fields do not fail the request — they are listed in the response warning, as are values that were clamped to the engine's limits.
Example request
curl -X POST https://crawl.echolotnews.com/v2/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"urls": [
"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
],
"prompt": "The book title, its price and its availability",
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"price": {
"type": "number"
},
"availability": {
"type": "string"
}
},
"required": [
"title",
"price"
]
},
"showSources": true
}'
# -> {"success": true, "id": "<jobId>"}
# poll until status is completed | failed | cancelled
curl https://crawl.echolotnews.com/v2/extract/<jobId> \
-H "Authorization: Bearer YOUR_API_KEY"import requests
API = "https://crawl.echolotnews.com"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
resp = requests.post(f"{API}/v2/extract", headers=HEADERS, json={
"urls": [
"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
],
"prompt": "The book title, its price and its availability",
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
},
"price": {
"type": "number",
},
"availability": {
"type": "string",
},
},
"required": ["title", "price"],
},
"showSources": True,
}, timeout=120)
resp.raise_for_status()
job_id = resp.json()["id"]
import time
while True:
job = requests.get(f"{API}/v2/extract/{job_id}", headers=HEADERS, timeout=30).json()
if job["status"] != "processing":
break
time.sleep(3)
print(job["status"], job.get("data"))const API = "https://crawl.echolotnews.com";
const headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" };
const res = await fetch(`${API}/v2/extract`, {
method: "POST",
headers,
body: JSON.stringify({
"urls": [
"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
],
"prompt": "The book title, its price and its availability",
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"price": {
"type": "number"
},
"availability": {
"type": "string"
}
},
"required": [
"title",
"price"
]
},
"showSources": true
}),
});
const { id } = await res.json();
let job;
do {
await new Promise((r) => setTimeout(r, 3000));
job = await (await fetch(`${API}/v2/extract/${id}`, { headers })).json();
} while (job.status === "processing");
console.log(job.status, job.data);# 1. Connect once (Claude Code)
claude mcp add --transport http echolot https://crawl.echolotnews.com/mcp \
--header "Authorization: Bearer YOUR_API_KEY"
# 2. Ask in plain words — the agent calls engine_extract, e.g.
# "Get the title, price and availability of this book page as JSON"
# Tool call it makes:
{
"name": "engine_extract",
"arguments": {
"prompt": "The book title, its price and its availability",
"urls": [
"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
]
}
}Example response
{
"success": true,
"status": "completed",
"data": {
"title": "A Light in the Attic",
"price": 51.77,
"availability": "In stock (22 available)"
},
"creditsUsed": 64,
"tokensUsed": 935,
"sources": { "*": ["https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"] },
"expiresAt": "2026-09-27T10:15:00Z"
}Response fields
| Field | Type | Meaning |
|---|---|---|
extractMode · stages | string · object | single | map_reduce, and the cost of each stage (fetch, map, merge): pages, calls, credits, USD, seconds. |
conflicts · perSource | array | Values the sources disagreed on (with the chosen one and the alternatives), and per page how many values were found and verified. |
Credits
Pricing →| What | Credits |
|---|---|
| Each page read | 1 |
| Each /* wildcard map | 1 |
| Web search, per 10 results | 2 |
| LLM tokens | 1 per 15 tokens |
Start with 500 free credits
No card required. Every endpoint, REST and MCP.