API reference

XML sitemap audit API API

Find and audit XML sitemaps with URL counts, lastmod freshness and protocol issues. Use this reference to pick the right endpoint and see exactly what it returns.

Operations

GET /v1/sitemaps View API reference

GET /v1/sitemaps

Operation: getSitemapAuditCredits and authentication: 2Authentication required
GET/v1/sitemapsCredits: 2

Query parameters

ParameterTyperequired
urlstringoptional
domainstringoptional
sitemapstringoptional
max_sitemapsinteger
Default 5
optional

Response fields

FieldType
classificationobject
classification.statusstring
classification.reasonstring
classification.evidenceobject
classification.evidence.sourcestring
classification.evidence.methodstring
classification.evidence.observed_atstring
classification.evidence.detailstring
classification.checked_atstring
urlstring
domainstring
originstring
statusstring
checked_atstring
fetchobject
fetch.checked_urlstring
fetch.http_statusinteger | null
fetch.final_urlstring | null
fetch.via_proxyboolean | null
robots_txtobject
robots_txt.statusstring
robots_txt.urlstring
robots_txt.http_statusinteger | null
robots_txt.declared_sitemaps[]object[]
robots_txt.declared_sitemaps[]object
robots_txt.declared_sitemaps[].urlstring
robots_txt.declared_sitemaps[].same_siteboolean
sitemaps[]object[]
sitemaps[]object
sitemaps[].urlstring
sitemaps[].sourcestring
sitemaps[].parentstring | null
sitemaps[].statusstring
sitemaps[].http_statusinteger | null
sitemaps[].final_urlstring | null
sitemaps[].via_proxyboolean | null
sitemaps[].content_typestring | null
sitemaps[].bytesinteger | null
sitemaps[].typestring | null
sitemaps[].url_countinteger
sitemaps[].child_sitemap_countinteger
sitemaps[].lastmodobject
sitemaps[].lastmod.neweststring | null
sitemaps[].lastmod.oldeststring | null
sitemaps[].lastmod.with_lastmod_rationumber | null
sitemaps[].extensionsobject
sitemaps[].extensions.imagesboolean
sitemaps[].extensions.videosboolean
sitemaps[].extensions.newsboolean
sitemaps[].extensions.hreflangboolean
sitemaps[].countsobject
sitemaps[].counts.invalid_locinteger
sitemaps[].counts.missing_locinteger
sitemaps[].counts.loc_too_longinteger
sitemaps[].counts.cross_host_urlsinteger
sitemaps[].counts.protocol_mismatch_urlsinteger
sitemaps[].counts.duplicate_urlsinteger
sitemaps[].counts.invalid_lastmodinteger
sitemaps[].counts.future_lastmodinteger
sitemaps[].counts.cross_site_child_sitemapsinteger
sitemaps[].issues[]string[]
sitemaps[].sample_urls[]string[]
totalsobject
totals.sitemaps_checkedinteger
totals.sitemaps_discoveredinteger
totals.urls_countedinteger
totals.budget_exhaustedboolean
freshnessobject
freshness.newest_lastmodstring | null
freshness.days_since_newestinteger | null
issues[]string[]
caveats[]string[]

Example request

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/sitemaps?url=https%3A%2F%2Fexample.com&domain=example.com&sitemap=https%3A%2F%2Fexample.com%2Fsitemap_index.xml&max_sitemaps=5"
const response = await fetch("https://domscan.net/v1/sitemaps?url=https%3A%2F%2Fexample.com&domain=example.com&sitemap=https%3A%2F%2Fexample.com%2Fsitemap_index.xml&max_sitemaps=5", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
import os
import requests

response = requests.get(
    "https://domscan.net/v1/sitemaps?url=https%3A%2F%2Fexample.com&domain=example.com&sitemap=https%3A%2F%2Fexample.com%2Fsitemap_index.xml&max_sitemaps=5",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/sitemaps?url=https%3A%2F%2Fexample.com&domain=example.com&sitemap=https%3A%2F%2Fexample.com%2Fsitemap_index.xml&max_sitemaps=5", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	data, err := io.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp.Status, string(data))
}
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/sitemaps?url=https%3A%2F%2Fexample.com&domain=example.com&sitemap=https%3A%2F%2Fexample.com%2Fsitemap_index.xml&max_sitemaps=5")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end
puts JSON.pretty_generate(JSON.parse(response.body))

Example response

{
  "url": "https://example.com/",
  "domain": "example.com",
  "origin": "https://example.com",
  "status": "found",
  "checked_at": "2026-10-09T12:00:00.000Z",
  "fetch": {
    "checked_url": "https://example.com/robots.txt",
    "http_status": 200,
    "final_url": "https://example.com/robots.txt",
    "via_proxy": true
  },
  "robots_txt": {
    "status": "found",
    "url": "https://example.com/robots.txt",
    "http_status": 200,
    "declared_sitemaps": [
      {
        "url": "https://example.com/sitemap_index.xml",
        "same_site": true
      },
      {
        "url": "https://sitemaps.example.net/example.xml",
        "same_site": false
      }
    ]
  },
  "sitemaps": [
    {
      "url": "https://example.com/sitemap_index.xml",
      "source": "robots",
      "parent": null,
      "status": "ok",
      "http_status": 200,
      "final_url": "https://example.com/sitemap_index.xml",
      "via_proxy": true,
      "content_type": "application/xml; charset=utf-8",
      "bytes": 412,
      "type": "sitemapindex",
      "url_count": 0,
      "child_sitemap_count": 2,
      "lastmod": {
        "newest": "2026-10-01T00:00:00.000Z",
        "oldest": "2026-10-01T00:00:00.000Z",
        "with_lastmod_ratio": 1
      },
      "extensions": {
        "images": false,
        "videos": false,
        "news": false,
        "hreflang": false
      },
      "counts": {
        "invalid_loc": 0,
        "missing_loc": 0,
        "loc_too_long": 0,
        "cross_host_urls": 0,
        "protocol_mismatch_urls": 0,
        "duplicate_urls": 0,
        "invalid_lastmod": 0,
        "future_lastmod": 0,
        "cross_site_child_sitemaps": 0
      },
      "issues": [],
      "sample_urls": [
        "https://example.com/posts.xml",
        "https://example.com/pages.xml"
      ]
    },
    {
      "url": "https://example.com/posts.xml",
      "source": "index_child",
      "parent": "https://example.com/sitemap_index.xml",
      "status": "ok",
      "http_status": 200,
      "final_url": "https://example.com/posts.xml",
      "via_proxy": true,
      "content_type": "application/xml",
      "bytes": 18234,
      "type": "urlset",
      "url_count": 120,
      "child_sitemap_count": 0,
      "lastmod": {
        "newest": "2026-10-05T00:00:00.000Z",
        "oldest": "2024-03-11T00:00:00.000Z",
        "with_lastmod_ratio": 0.975
      },
      "extensions": {
        "images": true,
        "videos": false,
        "news": false,
        "hreflang": true
      },
      "counts": {
        "invalid_loc": 0,
        "missing_loc": 0,
        "loc_too_long": 0,
        "cross_host_urls": 0,
        "protocol_mismatch_urls": 2,
        "duplicate_urls": 1,
        "invalid_lastmod": 3,
        "future_lastmod": 0,
        "cross_site_child_sitemaps": 0
      },
      "issues": [
        "protocol_mismatch",
        "duplicate_urls",
        "invalid_lastmod"
      ],
      "sample_urls": [
        "https://example.com/blog/a",
        "https://example.com/blog/b",
        "https://example.com/blog/c",
        "http://example.com/blog/d",
        "https://example.com/blog/e"
      ]
    },
    {
      "url": "https://example.com/pages.xml",
      "source": "index_child",
      "parent": "https://example.com/sitemap_index.xml",
      "status": "unknown",
      "http_status": 429,
      "final_url": "https://example.com/pages.xml",
      "via_proxy": true,
      "content_type": "text/html",
      "bytes": 162,
      "type": null,
      "url_count": 0,
      "child_sitemap_count": 0,
      "lastmod": {
        "newest": null,
        "oldest": null,
        "with_lastmod_ratio": null
      },
      "extensions": {
        "images": false,
        "videos": false,
        "news": false,
        "hreflang": false
      },
      "counts": {
        "invalid_loc": 0,
        "missing_loc": 0,
        "loc_too_long": 0,
        "cross_host_urls": 0,
        "protocol_mismatch_urls": 0,
        "duplicate_urls": 0,
        "invalid_lastmod": 0,
        "future_lastmod": 0,
        "cross_site_child_sitemaps": 0
      },
      "issues": [
        "rate_limited"
      ],
      "sample_urls": []
    }
  ],
  "totals": {
    "sitemaps_checked": 3,
    "sitemaps_discovered": 4,
    "urls_counted": 120,
    "budget_exhausted": false
  },
  "freshness": {
    "newest_lastmod": "2026-10-05T00:00:00.000Z",
    "days_since_newest": 4
  },
  "issues": [
    "cross_site_sitemap_declared",
    "protocol_mismatch",
    "duplicate_urls",
    "invalid_lastmod",
    "rate_limited"
  ],
  "caveats": [
    "counts_cover_fetched_files_only",
    "cross_site_sitemaps_not_fetched"
  ]
}

HTTP status codes

  • 200 OK
  • 400 Bad Request
  • 401 Unauthorized
  • 402 Payment Required
  • 429 Too Many Requests
  • 502 Bad Gateway

Reference resources