POST /v2/crawl
Crawl a whole site into Markdown, as a background job
Start from one URL, follow links and the sitemap to the depth you choose, and collect every page. Poll the job, page through results, cancel any time.
- Endpoint
POST /v2/crawl- Mode
- Background job — poll GET /v2/crawl/{id}
- Credits
- Page credits per crawled page (1 for Markdown)
- Also
POST /v1/crawl·POST /v2/batch/scrape(a list of URLs) · MCP toolengine_crawl
What it's for
Docs into a knowledge base
Crawl a documentation site with includePaths ["^/docs/"] and load the Markdown into your RAG index.
Site audits
Collect titles, status codes and links for every page; GET /v2/crawl/{id}/errors lists what failed and why.
Batch known URLs
Already have the list? POST /v2/batch/scrape runs the same job machinery over up to 500 URLs.
The same fields from every page
Put a query format in scrapeOptions and every crawled or batch-scraped page answers in one JSON shape — title, price and SKU across a catalogue.
The same fields from every page, no LLM
A {"type": "selectors", …} format in scrapeOptions reads the same CSS / XPath / JSONPath fields on every crawled page for 1 credit a page (Selectors).
Export as JSONL / CSV / XML
GET /v2/crawl/{id}/export streams every stored page — pick the columns with fields=url,metadata.title,selectors.price, add gzip=1 for a .gz file. Spreadsheet-safe: cells that could run as formulas are neutralised.
Products, not pagination
followPaths walks list and pagination pages for their links only; scrapePaths stores just the pages you want. The limit counts stored pages, and navigation pages are not charged.
How it works
- Start
POST returns a job id straight away; the crawl runs in the background on a durable Postgres job store.
- Discover
Links and the sitemap are followed within maxDiscoveryDepth, includePaths/excludePaths and the limit.
- Scrape
Every page is scraped with your scrapeOptions (Markdown by default), up to maxConcurrency pages at a time; results keep the crawl order.
- Collect
Poll the job; data is paged (skip/limit, next). Results are kept for 24 hours. A webhook can notify you per page and on completion.
- Politeness
At most 2 requests to one site at a time, at least 0.5 s apart with jitter, slower when the site answers slowly. A 429 or 503 pauses that site (Retry-After is honoured, otherwise 2 s doubling up to 60 s) — no browser or proxy is used to get around it; the page reports rate_limited.
- Retry
Network errors, timeouts, 5xx and 429 are retried up to twice at the end of the queue; 4xx answers are final.
- Export
GET /v2/crawl/{id}/export?format=jsonl|csv|xml&fields=…&gzip=1 (and /v2/batch/scrape/{id}/export) streams the pages in order — any size, no paging.
- Revalidate
Cached pages past maxAge are checked with ETag / Last-Modified; a 304 serves the stored page without downloading it.
Follow vs. store rules
Tell the crawl what to follow and what to keep separately. List and pagination pages matching followPaths are fetched only for their links — they are not stored and not charged. Only pages matching scrapePaths are stored; limit counts stored pages exactly. Once either list is given, a link is queued only if it matches followPaths, scrapePaths or includePaths. linkSelectors (CSS) restricts which parts of a page links are taken from, linkTextRegex filters by the link text, rel="nofollow" is respected by default, and allowedDomains / deniedDomains replace the same-site rule. Navigation pages are capped by maxNavigationPages (default 5 × limit).
curl -X POST "https://crawl.echolotnews.com/v2/crawl" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://books.toscrape.com/",
"limit": 60,
"maxDiscoveryDepth": 5,
"followPaths": ["^/catalogue/page-\\d+\\.html$"],
"scrapePaths": ["^/catalogue/[^/]+_\\d+/index\\.html$"],
"linkSelectors": ["article.product_pod h3", "li.next"]
}'
import os, requests
API, KEY = "https://crawl.echolotnews.com", "YOUR_API_KEY"
job = requests.post(f"{API}/v2/crawl", headers={"Authorization": f"Bearer {KEY}"}, json={
"url": "https://books.toscrape.com/",
"limit": 60,
"maxDiscoveryDepth": 5,
"followPaths": [r"^/catalogue/page-\d+\.html$"], # pagination: follow only
"scrapePaths": [r"^/catalogue/[^/]+_\d+/index\.html$"], # product pages: store
"linkSelectors": ["article.product_pod h3", "li.next"],
}, timeout=60).json()
print(job["id"])
const res = await fetch(`https://crawl.echolotnews.com/v2/crawl`, {
method: "POST",
headers: { Authorization: `Bearer YOUR_API_KEY`, "Content-Type": "application/json" },
body: JSON.stringify({
url: "https://books.toscrape.com/",
limit: 60,
maxDiscoveryDepth: 5,
followPaths: ["^/catalogue/page-\\d+\\.html$"],
scrapePaths: ["^/catalogue/[^/]+_\\d+/index\\.html$"],
linkSelectors: ["article.product_pod h3", "li.next"],
}),
});
console.log((await res.json()).id);Revalidation (ETag/304)
When a cached page is older than maxAge, the engine does not download it again blindly: it asks the site with If-None-Match / If-Modified-Since. A 304 Not Modified returns the stored page — metadata.cacheState is hit and metadata.revalidated is true — at the cache-hit price. A changed page is fetched once and stored again. Monitors revalidate on every check, so an unchanged page costs no download and reports same.
curl -X POST "https://crawl.echolotnews.com/v2/scrape" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/pricing", "formats": ["markdown"], "maxAge": 3600000}'
# -> "metadata": {"cacheState": "hit", "revalidated": true, ...}
import os, requests
API, KEY = "https://crawl.echolotnews.com", "YOUR_API_KEY"
doc = requests.post(f"{API}/v2/scrape", headers={"Authorization": f"Bearer {KEY}"},
json={"url": "https://example.com/pricing", "maxAge": 3600000},
timeout=60).json()["data"]
meta = doc["metadata"]
print(meta.get("cacheState"), meta.get("revalidated", False))
const r = await fetch(`https://crawl.echolotnews.com/v2/scrape`, {
method: "POST",
headers: { Authorization: `Bearer YOUR_API_KEY`, "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://example.com/pricing", maxAge: 3600000 }),
});
const { metadata } = (await r.json()).data;
console.log(metadata.cacheState, metadata.revalidated ?? false);Redirect chain in metadata
Every page reports how it got to its final URL: metadata.redirects lists each hop as {url, status} (the final URL is metadata.url). <meta http-equiv="refresh"> redirects with a short delay are followed too and appear with "via": "meta_refresh". Every hop passes the same private-network guard as the first request and counts toward the redirect limit; a hop to a private or internal address is refused.
curl -X POST "https://crawl.echolotnews.com/v2/scrape" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "http://github.com/", "formats": ["markdown"]}'
# -> "redirects": [{"url": "http://github.com/", "status": 301}], "url": "https://github.com/"
import os, requests
API, KEY = "https://crawl.echolotnews.com", "YOUR_API_KEY"
meta = requests.post(f"{API}/v2/scrape", headers={"Authorization": f"Bearer {KEY}"},
json={"url": "http://github.com/"}, timeout=60).json()["data"]["metadata"]
for hop in meta.get("redirects", []):
print(hop["status"], hop["url"], hop.get("via", ""))
print("final:", meta["url"])
const r = await fetch(`https://crawl.echolotnews.com/v2/scrape`, {
method: "POST",
headers: { Authorization: `Bearer YOUR_API_KEY`, "Content-Type": "application/json" },
body: JSON.stringify({ url: "http://github.com/" }),
});
const { metadata } = (await r.json()).data;
for (const hop of metadata.redirects ?? []) console.log(hop.status, hop.url, hop.via ?? "");
console.log("final:", metadata.url);Request parameters
Full docs →| Field | Type | Default | Description |
|---|---|---|---|
urlrequired | string | — | The start URL. |
limit | integer | 500 | Maximum pages (the engine's cap is 500). |
maxDiscoveryDepth | integer | 5 | Link depth from the start page, 0–5. |
includePaths / excludePaths | string[] | — | Regular expressions on the URL path. |
sitemap | string | "include" | include, skip or only. |
crawlEntireDomain | boolean | false | Also follow links outside the start path. |
allowSubdomains / allowExternalLinks | boolean | false | Widen the crawl. |
ignoreQueryParameters | boolean | false | Treat ?a=1 and ?a=2 as one page. |
delay / maxConcurrency | number | — · 3 | Seconds between page starts; parallel page fetches per crawl, 1–10 (default 3). The limit stays exact: never more pages than you asked for. |
prompt | string | — | Describe the crawl in words; an LLM derives the options (explicit fields win). |
scrapeOptions | object | {"formats": ["markdown"]} | Per-page scrape options (no screenshots in jobs). A {"type": "query", "query": "{ … }"} format returns the same fields from every page. |
webhook | string | object | — | URL or {url, headers, metadata, events}. |
ignoreRobotsTxt / robotsUserAgent | boolean · string | false · EcholotCrawl | robots.txt is respected by default (RFC 9309, Crawl-delay honoured; an unreachable robots.txt means nothing is fetched). Skipped URLs are listed in robotsBlocked at GET /v2/crawl/{id}/errors. |
deduplicateSimilarURLs | boolean | true | http/https, www, a trailing slash, index.html, tracking parameters and query order count as one page; a page with the same content as an earlier one is skipped and not charged. |
followPaths / scrapePaths | string[] | — | Regular expressions on the URL path: follow-only pages (fetched for links, not stored, not charged) and the pages to store. With either set, other links are not queued. |
linkSelectors / linkTextRegex | string[] · string | — | Take links only from these CSS regions, and only links whose text matches. |
respectNofollow | boolean | true | Skip rel="nofollow" links and pages marked robots nofollow. |
allowedDomains / deniedDomains | string[] | — | Domains (with subdomains) to crawl instead of just the start site, and domains never to enter. |
maxNavigationPages | integer | 5 × limit | Cap on follow-only pages (at most 1,000). |
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/crawl \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://books.toscrape.com/",
"limit": 10,
"maxDiscoveryDepth": 1,
"sitemap": "skip",
"scrapeOptions": {
"formats": [
"markdown"
]
}
}'
# -> {"success": true, "id": "<jobId>"}
# poll until status is completed
curl https://crawl.echolotnews.com/v2/crawl/<jobId> \
-H "Authorization: Bearer YOUR_API_KEY"
# export every page as CSV (or format=jsonl | xml; add &gzip=1 for a .gz file)
curl "https://crawl.echolotnews.com/v2/crawl/<jobId>/export?format=csv&fields=url,metadata.title,metadata.statusCode" \
-H "Authorization: Bearer YOUR_API_KEY" -o crawl.csvimport time
import requests
API = "https://crawl.echolotnews.com"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
resp = requests.post(f"{API}/v2/crawl", headers=HEADERS, json={
"url": "https://books.toscrape.com/",
"limit": 10,
"maxDiscoveryDepth": 1,
"sitemap": "skip",
"scrapeOptions": {
"formats": ["markdown"],
},
}, timeout=120)
resp.raise_for_status()
job_id = resp.json()["id"]
while requests.get(f"{API}/v2/crawl/{job_id}", headers=HEADERS, timeout=30).json()["status"] == "scraping":
time.sleep(3)
# stream the export to a file — csv, jsonl or xml (gzip=1 for a .gz)
params = {"format": "csv", "fields": "url,metadata.title,metadata.statusCode"}
with requests.get(f"{API}/v2/crawl/{job_id}/export", headers=HEADERS, params=params,
stream=True, timeout=120) as r:
r.raise_for_status()
with open("crawl.csv", "wb") as f:
for chunk in r.iter_content(65536):
f.write(chunk)
rows = open("crawl.csv", encoding="utf-8-sig").read().splitlines()
print(len(rows) - 1, "pages:", rows[0])const API = "https://crawl.echolotnews.com";
const headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" };
const res = await fetch(`${API}/v2/crawl`, {
method: "POST",
headers,
body: JSON.stringify({
"url": "https://books.toscrape.com/",
"limit": 10,
"maxDiscoveryDepth": 1,
"sitemap": "skip",
"scrapeOptions": {
"formats": [
"markdown"
]
}
}),
});
const { id } = await res.json();
let job;
do {
await new Promise((r) => setTimeout(r, 3000));
job = await (await fetch(`${API}/v2/crawl/${id}`, { headers })).json();
} while (job.status === "scraping");
// the export streams every page: jsonl, csv or xml (&gzip=1 for a .gz file)
const exp = await fetch(`${API}/v2/crawl/${id}/export?format=jsonl&fields=url,metadata.title`, { headers });
const rows = (await exp.text()).trim().split("\n").map((l) => JSON.parse(l));
console.log(rows.length, "pages:", rows[0].url);# 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_crawl, then engine_job; the export
# itself is a file download: GET https://crawl.echolotnews.com/v2/crawl/<jobId>/export?format=csv
# "Crawl books.toscrape.com, 10 pages"
# Tool call it makes:
{
"name": "engine_crawl",
"arguments": {
"url": "https://books.toscrape.com/",
"limit": 10,
"max_depth": 1
}
}Example response
{
"success": true,
"status": "completed",
"total": 42,
"completed": 42,
"creditsUsed": 42,
"expiresAt": "2026-09-27T10:15:00Z",
"data": [
{
"markdown": "# Getting started\n\n…",
"metadata": {
"title": "Getting started",
"sourceURL": "https://example.com/docs/start",
"statusCode": 200
}
}
],
"next": "https://crawl.echolotnews.com/v2/crawl/2c5e…?skip=100"
}Response fields
| Field | Type | Meaning |
|---|---|---|
stats | object | Status codes, engines, escalations, links filtered by reason (duplicates, offsite, regex, robots), retries, rate limits, average latency, pages per minute and the top error groups. |
GET …/export | file | format=jsonl | csv | xml · fields=dot.paths · gzip=1 · explode=selectors (one row per selectors item). Free: the pages are already paid for. |
metadata.revalidated | boolean | true when the source confirmed the cached page with 304 Not Modified (cacheState is hit). |
metadata.redirects | object[] | The redirect chain: {url, status} per hop, meta refresh hops with "via": "meta_refresh". |
Credits
Pricing →| What | Credits |
|---|---|
| Starting a crawl | 0 |
| Each completed page | page credits (1 for Markdown, +4 per LLM format) |
| Query format, per page (LLM · cache hit) | +4 · +1 |
| Exporting a finished job | 0 |
| Navigation page (followPaths) | 0 |
Start with 500 free credits
No card required. Every endpoint, REST and MCP.