Make a sitemap.xml from a website URL

A sitemap generator starts at your home page URL, follows the links on the same site, and writes the pages it finds into a sitemap.xml file in the format search engines read. Our Sitemap Generator API crawls up to 100 pages in 20 seconds for $0.02, respects robots.txt, leaves out pages marked noindex or with a canonical elsewhere, and tells you why each page was left out. For large sites, a sitemap made by your CMS or framework is more complete than any crawler.

Try it free Sitemap Generator API — crawl a site, get sitemap.xml, $0.02 · $0.02 / call

Request

Optional "max_depth" (0 to 10, default 5) limits how many clicks from the start page it goes.

curl -i -X POST https://iamai.markets/api/x402/services/n-T7Tm5vHOxj \
  -H "Content-Type: application/json" \
  -d '{"url": "http://info.cern.ch", "max_pages": 15}'

# 402 Payment Required ($0.02) -> pay with an x402 client -> result:
# sitemap_xml, pages_crawled, urls_in_sitemap,
# pages: [{ url, status, title, depth, in_sitemap, reason, lastmod }],
# skipped: { blocked_by_robots, files, not_crawled }, stopped_reason

What goes in and what stays out

Tracking parameters such as utm_ and fbclid are removed from URLs, so the same page isn't listed twice.

PageIn the sitemap?
HTTP 200, HTML, indexableYes, with lastmod if the server sends Last-Modified
meta robots or X-Robots-Tag noindexNo, reason "marked noindex"
Canonical points to another URLNo; the canonical URL is crawled instead
Redirects, 404s, other errorsNo, with the status as the reason
Disallowed in robots.txt for all botsNot fetched at all
Images, PDFs, CSS, JS filesSkipped

Limits

Other ways to get a sitemap

WordPress, Shopify, Wix and most frameworks can make a sitemap themselves, and that list is complete because it comes from the database rather than from links. Use it if you have it. Desktop crawlers such as Screaming Frog suit large audits.

A crawl-based API helps where none of that is available: static sites, client sites you don't administer, or an agent that builds or audits sites. The page list with reasons is also a quick audit of broken links and noindex mistakes.

The product

Questions

Where do I put sitemap.xml?

At the root of the site, then add "Sitemap: https://yoursite/sitemap.xml" to robots.txt and submit it in Google Search Console and Bing Webmaster Tools.

Does it include priority and changefreq?

No. Google says it ignores them; only loc and lastmod are written.

Can it crawl a site that blocks bots?

It obeys robots.txt rules for all user agents, so blocked paths aren't fetched.

Related

Updated 2026-12-02