Sitemap Checker API
Find and validate a website’s sitemaps (index, gzip): URL count, lastmod format, duplicates, other hosts, limits, and the HTTP status of a sample of URLs.
The sitemap checker reads a sitemap URL, or finds the sitemaps of a site from the Sitemap: lines of its robots.txt (falling back to /sitemap.xml). It follows sitemap indexes (up to 10 files), decompresses .xml.gz files and counts the URLs.
It reports what makes search engines ignore sitemaps: files over 50,000 URLs or 50 MB, <loc> values that are not absolute or point to another host, duplicate URLs, <lastmod> values that are not W3C dates and files that cannot be read. It then requests a sample of URLs spread over the sitemap (sample, default 10, max 20) and flags errors, redirects (list the final URLs) and pages that refuse crawlers.
The response contains every sitemap file read with its type and size, the total number of URLs, the most recent lastmod, the sampled statuses and the first 100 URLs, plus scored checks in English or Vietnamese (lang=vi).
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
url | body|query | string | yes | Sitemap URL or website URL. | |
sample | body|query | number | no | 10 | URLs to request (0–20). |
lang | body|query | string | no | en | en or vi. |
fresh | body|query | boolean | no | false | Bypass the 10-minute cache. |
Example
curl "https://apibox.io.vn/v1/sitemap-check?url=https://www.cloudflare.com/sitemap.xml&sample=5" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/sitemap-check?url=https://www.cloudflare.com/sitemap.xml&sample=5', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/sitemap-check?url=https://www.cloudflare.com/sitemap.xml&sample=5",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/sitemap-check?url=https://www.cloudflare.com/sitemap.xml&sample=5');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"url": "https://www.cloudflare.com/sitemap.xml",
"score": 85,
"grade": "B",
"summary": {
"passed": 2,
"info": 0,
"warnings": 2,
"errors": 0
},
"sitemaps": [
{
"url": "https://www.cloudflare.com/sitemap.xml",
"status": 200,
"type": "urlset",
"urls": 1017,
"bytes": 1639563,
"gzip": false
}
],
"url_count": 1017,
"with_lastmod": 1017,
"latest_lastmod": "2026-11-10",
"sample": [
{
"url": "https://www.cloudflare.com/",
"status": 200,
"redirected": false,
"final_url": "https://www.cloudflare.com/"
},
"…"
],
"checks": [
{
"id": "found",
"status": "pass",
"message": "1 sitemap file(s), 1017 URLs"
},
{
"id": "sample_blocked",
"status": "warn",
"message": "3 sampled URLs refused our crawler (HTTP 403): bot protection may also slow search engines"
},
"…"
]
}
Use cases
- SEO audits and pre-launch checks
- Monitor that sitemaps keep up with new content
- Find broken or redirected URLs listed in sitemaps
- CMS plugins that validate generated sitemaps
FAQ
Does it check every URL?
No, a spread sample of up to 20 URLs per call, to stay fast and polite. The structure checks (duplicates, hosts, lastmod) cover up to 50,000 URLs.
Why are some URLs “refused”?
They answered 401, 403, 429 or 503 to our crawler, usually bot protection. Make sure search engine crawlers are allowed.
Are image and news sitemaps supported?
Their <url> and <loc> entries are counted like any sitemap; the extra image / news tags are not validated.
Related APIs
URL Metadata
Fetch any URL and get its title, description, Open Graph and Twitter Card tags, favicon, canonical, feeds and JSON-LD as JSON.
H:HTTP Headers
See the HTTP status and every response header of a URL, with a summary of security headers like HSTS, CSP and X-Frame-Options.
301Redirect Checker
Follow every 301, 302, 307 and 308 redirect of a URL and get the full chain with status codes, the final URL and the number of hops.