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.
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=example.com&limit=50" \
-H "X-API-Key: rp_your_key"Response
{
"data": [
{
"url": "https://example.com/about",
"lastmod": "2024-01-15",
"changefreq": "monthly",
"priority": "0.8"
},
{
"url": "https://example.com/blog",
"lastmod": "2024-03-20",
"changefreq": "weekly",
"priority": "0.9"
}
],
"total": 142,
"sitemap_url": "https://example.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": 2
}Notes
- Discovery order:
robots.txtSitemap directive →/sitemap.xml→/sitemap_index.xml - For sitemap indexes, up to 5 child sitemaps are fetched in parallel
lastmod,changefreq, andpriorityareundefinedif not present in the sitemap- The legacy
/v1/url-indexroute redirects here (301)