Map
POST /map
Traverse a site from a root URL and return the links it discovers — a fast way to understand a site’s structure before deciding what to crawl or extract. No page content is extracted, so it’s cheap.
Request
Section titled “Request”curl -X POST https://api.crisps.ai/map \ -H "Authorization: Bearer $CRISPS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://docs.crisps.ai", "max_depth": 2, "limit": 100, "select_paths": ["/api/.*"] }'import os, httpx
r = httpx.post( "https://api.crisps.ai/map", headers={"Authorization": f"Bearer {os.environ['CRISPS_API_KEY']}"}, json={"url": "https://docs.crisps.ai", "max_depth": 2, "limit": 100}, timeout=120,)print(r.json()["results"])const res = await fetch("https://api.crisps.ai/map", { method: "POST", headers: { Authorization: `Bearer ${process.env.CRISPS_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ url: "https://docs.crisps.ai", max_depth: 2, limit: 100 }),});console.log((await res.json()).results);Try it
Section titled “Try it”Body parameters
Section titled “Body parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
url required | string | — | Root URL to start from. |
instructions | string | — | Natural-language guidance; discovery is reranked toward it. |
max_depth | integer | 1 | Hops from the root, 1–5. |
max_breadth | integer | 20 | Links followed per page, 1–500. |
limit | integer | 50 | Total links processed. |
select_paths / exclude_paths | string[] | — | Regex filters on the URL path. |
select_domains / exclude_domains | string[] | — | Domain allow/deny lists. |
allow_external | bool | false | Follow links off the root domain. |
Response
Section titled “Response”{ "base_url": "https://docs.crisps.ai", "results": [ "https://docs.crisps.ai/api/search/", "https://docs.crisps.ai/api/extract/" ]}results is a flat list of discovered URLs. Billed at 1 credit per 10 mapped
pages (2 per 10 when instructions is set), reported in the X-Credits-* headers.