Crawl Sitemap
Changed onCrawl an entire website's sitemap and return all discovered page URLs. Pass search to have the crawled sitemap filtered down to the pages about a phrase (for example pricing and plans or api authentication docs), most relevant first — a searched crawl scans the whole sitemap and costs 2 credits instead of 1.
Request
- Base URLhttps://api.context.dev/v1
- URLhttps://api.context.dev/v1/web/scrape/sitemap
- AuthHTTP bearer
Query parameters
Domain to build a sitemap for
Maximum number of links to return from the sitemap crawl. Defaults to 10,000. Minimum is 1, maximum is 100,000.
Optional explicit sitemap URL. When provided, exactly this sitemap is crawled instead of discovering the domain's sitemaps.
Optional RE2-compatible regex pattern. Only URLs matching this pattern are returned and counted against maxLinks.
Optional search phrase. When provided, the crawled sitemap is filtered to the pages whose URLs are about that phrase, most relevant first, and the request costs 2 credits instead of 1.
Optional outbound HTTP headers forwarded only to the target URL, sent as deep-object query params such as headers[X-Custom]=value. When provided, caching is bypassed: the result is neither read from nor written to cache.
Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).
Set to enabled to bypass shared caches and omit request and response content from retained usage logs. Requires zero data retention to be enabled for your organization (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.
Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters.
[ "production", "team-alpha" ]
Response
Successful response
Changes
- info
added the new optional
queryrequest parametersearch
- info
- breaking
for the
queryrequest parameterdomain, the minLength was increased from0to3 - info
added the new optional
queryrequest parametersitemapUrl - info
added the new optional
queryrequest parametertags - info
added the new optional
queryrequest parameterzdr - info
for the
queryrequest parametertimeoutMS, the min was decreased from1000.00to1.00
- breaking