Search · Core
POST/v1/map
Sitemaps, robots rules, feeds and link counts for a whole site, in one call. Plan a crawl before paying for it.
- $0.002
- sitemaps
- robots
- feeds
What it does
Discover a site's crawlable surface without crawling it: parse robots.txt allow/disallow rules, collect URLs from sitemap.xml and sitemap indexes, find RSS, Atom and JSON feeds, and count internal and external links on the homepage. Use the returned URLs to plan readfetch_scrape, readfetch_batch, or readfetch_crawl — not readfetch_map again on each URL. Prefer readfetch_probe on one URL before paying for bodies.
Price
Quoted by the 402 before anything runs.
- $0.002per call
- 60 s default, 95 s maximumwhole-call budget
- billedonly when content is delivered
- no keythe payment is the credential
When to call it
Cheapest endpoint that answers the question, first.
Call it when the sentence above is the whole job. Its neighbours solve the same URL with a different trade-off — a browser instead of plain HTTP, a site instead of one page, one section instead of a document. /choose walks the decision, cheapest first, browser last.
Unsure whether another URL is worth paying for at all? /v1/probe is free: metadata plus the full extracted text on the first 3 probes per IP per day (a ~400-character preview after that) before you pay for a priced route.
Request fields
JSON body shape for POST /v1/map — use with the client snippets below, not as a bare POST.
| Field | Type | Default | What it does |
|---|---|---|---|
url required | string | — | Public http(s) URL of the site to map. |
limit | integer | 200 | Maximum number of URLs to return (1-1000). |
timeout_s | number | 60 | Total budget for the whole call in seconds; every sitemap fetch and the browser fallback share it. 95 s is the edge ceiling (Cloudflare closes at 100 s). |
max_bytes | integer | 5000000 | Abort if any single document exceeds this many bytes. |
Make the call
Unpaid REST stops at 402. Use readfetch-client, @readfetch/client, or MCP @readfetch/mcp-x402-proxy — they sign x402 and retry. The JSON below is the argument shape for call() / route helpers.
{
"url": "https://example.com"
}
readfetch-client / @readfetch/client (latest+) handle x402 on paid routes — full API on /integrations#clients.
# pip install readfetch-client
# export EVM_PRIVATE_KEY=0x…
import asyncio
from readfetch_client import readfetch_map
async def main():
data = await readfetch_map("https://example.com")
asyncio.run(main())
// npm install @readfetch/client
// export EVM_PRIVATE_KEY=0x…
import { readfetchMap } from "@readfetch/client";
const data = await readfetchMap("https://example.com");
Response
Fields shown are the ones a caller branches on.
{
"billed": true,
"feeds": [
"https://example.com/feed.xml"
],
"host": "example.com",
"links": {
"external": 6,
"internal": 34
},
"robots": {
"allow": [],
"crawl_delay": null,
"disallow": [
"/admin"
],
"sitemaps": [
"https://example.com/sitemap.xml"
]
},
"sitemaps": [
"https://example.com/sitemap.xml"
],
"status": "success",
"status_code": 200,
"total_found": 2,
"url": "https://example.com",
"url_count": 2,
"urls": [
"https://example.com/",
"https://example.com/blog/post"
]
}
Limits
Requests are JSON, 1 MiB maximum. Redirects are re-validated at every hop and capped at 5; the final URL is reported. Every call runs on one whole-call budget — DNS, connect, redirects, retries and any render share that clock, and no step starts a fresh timer. Where the endpoint publishes a timeout_s, its default and ceiling are the whole-call budget in the strip above. A budget that expires mid-walk returns status: "partial", and nothing is charged for what was not delivered.
Failures come back as {"error": "…", "hint": "…"} with a status to branch on. Shapes: /docs#errors.
Billing
$0.002 per delivered call. A response with billed: false settles nothing and names the next call to try.
billed: false on 200 usually means a map with zero URLs. 502/504 settle nothing.
RECEIPT, claims, and billing rules: /docs#billing.
Settlement, receipts and claims: /docs.