Sitemap
Discover and parse a domain's sitemap. Returns URLs with lastmod, changefreq, and priority.
GET /v1/sitemap
Discovers a domain's sitemap via robots.txt, then parses and returns the URL inventory. Costs 2 credits, refunded in full when no sitemap is found (source: "none", credits_used: 0).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | The domain to query |
limit | integer | No | Max results (default 100, max 1000) |
Request
curl "https://api.rankparse.com/v1/sitemap?domain=stripe.com&limit=50" \
-H "X-API-Key: rp_your_key"Response
{
"data": [
{
"url": "https://stripe.com/about",
"lastmod": "2024-01-15",
"changefreq": "monthly",
"priority": "0.8"
},
{
"url": "https://stripe.com/blog",
"lastmod": "2024-03-20",
"changefreq": "weekly",
"priority": "0.9"
}
],
"total": 142,
"sitemap_url": "https://stripe.com/sitemap.xml",
"sitemap_type": "sitemap",
"child_sitemaps": [],
"source": "sitemap",
"credits_used": 2
}When no sitemap is found
{
"data": [],
"total": 0,
"sitemap_url": null,
"sitemap_type": "none",
"child_sitemaps": [],
"source": "none",
"credits_used": 0
}Notes
- Discovery order: every
Sitemap:directive inrobots.txt→/sitemap.xml→/sitemap_index.xml - Sitemap indexes are walked breadth-first, including indexes nested one level
below the root, and the walk stops as soon as
limitURLs are collected - The walk is bounded: at most 16 documents and a 12-second budget. When a bound
stops it early,
truncatedistrueanddata/totalunder-report the site child_sitemapslists the child sitemaps discovered (capped at 200 entries);child_sitemaps_totalis the true count andchild_sitemaps_fetchednames which of them were actually read for this responsesitemap_urlis the first sitemap that could be read, andsitemap_typedescribes that document. Whenrobots.txtlists several sitemaps rather than an index, the rest appear inchild_sitemaps- A child sitemap that fails to fetch is skipped; it does not fail the request
lastmod,changefreq, andpriorityareundefinedif not present in the sitemap- The legacy
/v1/url-indexroute redirects here (301), forwardingdomainandlimit