POST /v1/map
Discover a site's URLs without reading any pages. 1 credit per call.
The sitemap is always read at the root, whatever path you pass. Sitemap: lines in robots.txt are ignored. Each discovery fetch has an 8-second timeout and fails silently. Only URLs on the same host are kept; the scheme is not compared.
Endpoint
[02]POST https://api.buildonto.dev/v1/map
Authorization: Bearer onto_sk_live_YOUR_KEY
Content-Type: application/jsonRequest body
[03]URL of the site to map. The links fallback reads this page.
Max URLs to return (default 100, max 1,000).
Response
[04]Success (200): status, url, the discovery source ("sitemap" or "links"), count, a flat list of same-host urls, and cache. With the links fallback, the start URL is always the first entry.
{
"status": "success",
"url": "https://nodejs.org",
"source": "sitemap",
"count": 100,
"urls": [
"https://nodejs.org/en/download",
"https://nodejs.org/en/blog",
"https://nodejs.org/api/fs.html"
],
"cache": { "hit": false, "ttl_seconds": 3600 }
}Errors: INVALID_URL (400, also private or internal hosts), UNAUTHORIZED (401), NO_RESULTS (404 — in practice this does not happen, because you get at least the start URL), RATE_LIMITED (429), CONCURRENT_LIMIT (429), PAYMENT_REQUIRED (402). See error codes.
Examples
[05]cURL:
curl -X POST https://api.buildonto.dev/v1/map \
-H "Authorization: Bearer $ONTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://nodejs.org", "limit": 100 }'