Sitemap Inspect API — parse sitemap.xml and sitemap indexes

Need sitemap data in scripts or CI without writing an XML parser? Use TinyUtils Sitemap Inspect to fetch sitemap XML, follow redirects, and return structured JSON.

The problem

Sitemaps often live behind redirects, CDNs, or custom paths. Manually fetching and parsing sitemap XML means handling redirects, validating content type, detecting sitemap indexes vs urlsets, and extracting fields from XML safely.

TinyUtils handles that in one request and returns clean JSON ready for SEO checks, monitoring, and automation.

Quick solution

curl

curl "https://tinyutils.dev/api/sitemap-inspect?url=https://example.com"

Example response

{
  "ok": true,
  "input_url": "https://example.com",
  "sitemap_url": "https://example.com/sitemap.xml",
  "final_url": "https://example.com/sitemap.xml",
  "status": 200,
  "content_type": "application/xml",
  "format": "urlset",
  "sitemaps": [],
  "urls": [
    {
      "loc": "https://example.com/",
      "lastmod": "2026-01-05",
      "changefreq": "daily",
      "priority": "1.0"
    }
  ],
  "xml_truncated": false,
  "entries_truncated": false,
  "meta": {
    "responseTimeMs": 76,
    "cached": false,
    "rateLimitedScope": "global"
  },
  "error": null
}

Use cases

JavaScript example

JavaScript (fetch)

const res = await fetch(
  "https://tinyutils.dev/api/sitemap-inspect?url=https://example.com"
);
const data = await res.json();

if (data.format === "sitemap_index") {
  console.log("Child sitemaps:", data.sitemaps.map((x) => x.loc));
} else {
  console.log("URL count:", data.urls.length);
}

See also

Try the Sitemap Inspect tool

Enter any site URL or sitemap URL and inspect it instantly.

Open Sitemap Inspect →