RankParse

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

ParameterTypeRequiredDescription
domainstringYesThe domain to query
limitintegerNoMax 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.txt Sitemap directive → /sitemap.xml/sitemap_index.xml
  • For sitemap indexes, up to 5 child sitemaps are fetched in parallel
  • lastmod, changefreq, and priority are undefined if not present in the sitemap
  • The legacy /v1/url-index route redirects here (301)

On this page