POST /v2/scrape · query
Ask a page for exactly the fields you need
Write the shape of the answer — { products[] { name price(in EUR) url } } — and get JSON in that shape. The page is read as a compact semantic snapshot, not raw HTML, and the selectors that answered are cached: the next call on the same site needs no LLM at all, and heals itself when the page changes.
- Endpoint
POST /v2/scrape · query- Mode
- Synchronous (a scrape format)
- Credits
- 1 per page + 4 when the LLM resolves it; +1 on a cache hit
- Also
- formats: [{type: "query"}] on
POST /v1/scrape· crawl and batch scrapeOptions · interact action · MCP toolengine_scrape(query)
What it's for
Product and price lists
name, price, availability and link for every item on a listing page — the same query keeps working across the catalogue.
News and article lists
title, author, date and URL of every story on a section front, in one call.
Tables you only need part of
pick the columns you want from a statistics or registry page without parsing the HTML yourself.
How it works
- Semantic snapshot
The page becomes a numbered list of its meaningful elements — roles, names, labels and visible text — usually 10–50× fewer tokens than the HTML.
- Query to JSON
Your query becomes a JSON Schema; the fields are read from the snapshot and validated.
- Selector cache
The selectors that produced each field are stored per site. Next time the data is read with them directly — no LLM. If the page changed and a selector no longer fits, it is resolved again and the cache heals (metadata.queryCache = hit | miss | healed).
Query or Extract?
A query costs the same on a short and on a very long page (1 + 4 credits, then 1 + 1 on a cache hit). Extract bills per LLM token — about 400 credits for a 120,000-character table page — and is the right tool when the answer is spread over several pages or a whole /* section. For one page with a list or a table, use a query: the model sees the header and the first rows of the page's largest list first, and the cached selectors then read every row (a 238-row table: all rows, no LLM on the next call).
Request parameters
Full docs →| Field | Type | Default | Description |
|---|---|---|---|
urlrequired | string | — | The page to read. |
formats[].queryrequired | string | — | The answer's shape: fields, lists with [], nesting with { }, and a plain-language hint in ( ). |
formats[].cache | boolean | true | false re-reads the page and resolves the query with the LLM, without reading or storing learned selectors — to double-check a cached answer (+4, like any LLM resolution). |
onlyMainContent | boolean | true | Read the main content only. |
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/scrape \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://books.toscrape.com/",
"formats": [
{
"type": "query",
"query": "{ books[] { title price(in GBP) url } }"
}
]
}'import requests
API = "https://crawl.echolotnews.com"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
resp = requests.post(f"{API}/v2/scrape", headers=HEADERS, json={
"url": "https://books.toscrape.com/",
"formats": [
{
"type": "query",
"query": "{ books[] { title price(in GBP) url } }",
},
],
}, timeout=120)
resp.raise_for_status()
for b in resp.json()["data"]["query"]["books"]:
print(b["title"], b["price"])const API = "https://crawl.echolotnews.com";
const headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" };
const res = await fetch(`${API}/v2/scrape`, {
method: "POST",
headers,
body: JSON.stringify({
"url": "https://books.toscrape.com/",
"formats": [
{
"type": "query",
"query": "{ books[] { title price(in GBP) url } }"
}
]
}),
});
const json = await res.json();
json.data.query.books.forEach((b) => console.log(b.title, b.price));# 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_scrape, e.g.
# "List the books and prices on books.toscrape.com"
# Tool call it makes:
{
"name": "engine_scrape",
"arguments": {
"url": "https://books.toscrape.com/",
"query": "{ books[] { title price(in GBP) url } }"
}
}Example response
{
"success": true,
"data": {
"query": {
"books": [
{ "title": "A Light in the Attic", "price": "£51.77", "url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html" },
{ "title": "Tipping the Velvet", "price": "£53.74", "url": "https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html" }
]
},
"metadata": { "statusCode": 200, "queryCache": "hit" }
}
}Credits
Pricing →| What | Credits |
|---|---|
| The page | 1 |
| LLM resolution (first call, or after the page changed) | +4 |
| Cache hit (no LLM) | +1 |
Start with 500 free credits
No card required. Every endpoint, REST and MCP.