Full request and response reference for the asynchronous sitemap crawl endpoints.
Discovers every URL on a site from a single starting point. Crawls are asynchronous jobs: submit for a quote, approve,
poll status, then page through the results. See the Sitemap crawl guide for the walkthrough.
The job is created in awaiting_approval; nothing is crawled or charged until approved. Quotes expire after one hour —
an unapproved job is marked failed with errorMessage: "quote_expired".
POST https://request.usestring.ai/v1/sitemap/{jobId}/approve
Starts the crawl. The estimated cost is held against your balance and settled when the job finishes. Approve within an
hour of submitting — expired quotes are failed and cannot be approved.
Status
Meaning
202
Approved — { "jobId": "...", "status": "running" }. Re-approving a still-running job also returns 202.
200
Job already in a terminal state — returns its current status (e.g. failed for an expired quote).
401
Missing or invalid API key.
402
Insufficient balance for estimatedCostUsd (error: "insufficient_funds"); the job is marked failed and cannot be re-approved after a top-up.
404
Job not found.
409
Approval handoff incomplete (status: "partial_state") — retry the approve call.
429
Rate limit exceeded.
500
Approval failed — also returned when approving a canceled or token_cap_exceeded job.
HTTP status from fetching the URL; 0 when the fetch failed or the code wasn't retained.
discoveredUrls
integer
Number of new URLs found on this page. Omitted once results are served from durable storage.
depth
integer
Link depth from the starting URL (0 = seed).
isSitemap
boolean
Whether this URL is a sitemap file rather than a page.
error
string
Present when fetching this URL failed.
parentUrl
string | null
URL this one was discovered on.
sourceType
string
How it was discovered: seed, sitemap_index, sitemap_urlset, or html_link.
While the job's results are live — including mid-crawl — the endpoint returns the URLs discovered so far, each with its
discoveredUrls count, and total grows as the crawl progresses (check job status to know when the set is complete).
Once results move to durable storage they remain available indefinitely, but discoveredUrls is no longer retained and
is omitted from each entry.