Sitemap Generator – Crawl a Website & Create sitemap.xml avatar

Sitemap Generator – Crawl a Website & Create sitemap.xml

Pricing

from $0.50 / 1,000 page crawleds

Go to Apify Store
Sitemap Generator – Crawl a Website & Create sitemap.xml

Sitemap Generator – Crawl a Website & Create sitemap.xml

XML sitemap generator: crawls your website (robots.txt respected) and writes a ready-to-upload sitemap.xml with lastmod dates, hreflang alternates and optional image entries. Skips noindex, non-canonical, redirected and broken pages. Splits at 50,000 URLs. $0.50 per 1,000 pages.

Pricing

from $0.50 / 1,000 page crawleds

Rating

0.0

(0)

Developer

Cemal Atakli

Cemal Atakli

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

9 days ago

Last modified

Categories

Features

Limited permissions

Share

Sitemap Generator crawls your website the way a search engine does and writes a ready-to-upload XML sitemap (sitemap.xml). Only pages that search engines should index are listed: noindex pages, non-canonical duplicates, redirects, broken pages and URLs blocked by robots.txt are left out automatically. Each URL gets a <lastmod> date when the site provides a real one, hreflang alternates for multilingual sites, and optional image entries.

  • Enter your home page, press Start, then download sitemap.xml from the run's Output tab.
  • Large sites are split automatically at 50,000 URLs per file, with a sitemap_index.xml.
  • A table explains every URL: in the sitemap or not, and why.
  • $0.50 per 1,000 pages crawled. No subscription, no monthly fee.

What it does

  1. Reads your robots.txt (disallowed URLs are never fetched, Crawl-delay is honored).
  2. Crawls your site breadth-first, so the most important pages come first, staying on your host (www and non-www count as one site).
  3. For each page it checks the HTTP status, the robots meta tag, the X-Robots-Tag header, rel="canonical" (HTML tag or Link header), hreflang alternates, images and modification dates.
  4. Writes sitemap.xml (sitemaps.org protocol 0.9, valid XML, URLs percent-encoded and XML-escaped) to the run's key-value store, and lists every crawled URL in the dataset.

Which pages go into the sitemap

PageIn the sitemap?
HTML page, HTTP 200, indexable, canonical points to itself (or no canonical)✅ yes
noindex in robots meta tag or X-Robots-Tag header❌ noindex (can be turned on with Keep noindex pages)
rel="canonical" points to another URL❌ nonCanonical (the canonical URL is crawled instead)
Redirect (301, 302, 307, 308)❌ redirect (the target page is added if it is on your site)
4xx / 5xx, timeouts, DNS errors❌ httpError / fetchError
PDFs, images, other non-HTML files❌ not crawled
Disallowed by robots.txt❌ never fetched
URLs with ?query parameters❌ skipped by default (turn off Skip URLs with ?query parameters if your pages need them)

Where <lastmod> comes from

  1. JSON-LD dateModified in the page (WordPress/Yoast, Shopify, most CMSs), or the article:modified_time / og:updated_time meta tag.
  2. Otherwise the Last-Modified HTTP header (static sites, GitHub Pages, S3, Netlify).
  3. Otherwise no <lastmod>. Dynamic pages often send "now" as Last-Modified; such headers are ignored, because Google stops trusting lastmod values that are always new. Every dataset row shows lastmodSource.

Use cases

  • Create a sitemap for a site whose CMS has none (custom sites, static HTML, old PHP sites, single-page builders).
  • Rebuild a stale or broken sitemap and submit it in Google Search Console and Bing Webmaster Tools.
  • Compare what is really crawlable with the sitemap you have (the dataset shows every excluded URL and the reason).
  • Generate a sitemap for a multilingual site, including hreflang alternates.
  • Run it on a schedule and download the newest sitemap.xml through the API.

Input example

{
"startUrl": "https://www.example.com",
"maxPages": 2000,
"addLastmod": true,
"addHreflang": true,
"addImages": false,
"excludeGlobs": [{ "glob": "https://www.example.com/cart/**" }]
}

Set Max pages to crawl a bit above the number of pages on your site (default 100). The run stops at that limit and still writes a valid sitemap with what it found.

Output

Key-value store (Output tab):

  • sitemap.xml: the sitemap, ready to upload to your web root.
  • More than 50,000 URLs (or ~45 MB): sitemap-1.xml, sitemap-2.xml, … plus sitemap_index.xml pointing to them. Set Where you will upload the sitemap if the files will not live at your site root.
  • OUTPUT: download links for every file, the line to add to robots.txt (Sitemap: https://www.example.com/sitemap.xml), and counts of included and excluded URLs by reason.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2026-10-02T08:15:00+00:00</lastmod>
<xhtml:link rel="alternate" hreflang="de" href="https://www.example.com/de/"/>
<xhtml:link rel="alternate" hreflang="en" href="https://www.example.com/"/>
</url>
</urlset>

Dataset: one row per fetched URL:

{
"url": "https://crawler-test.com/canonical_tags/canonical_tag",
"inSitemap": false,
"excludedReason": "nonCanonical",
"status": 200,
"lastmod": null,
"lastmodSource": null,
"canonical": "https://crawler-test.com/",
"noindex": false,
"hreflang": [],
"title": "Canonical Tag",
"redirectedTo": null,
"depth": 1,
"foundOn": "https://crawler-test.com/"
}

Pricing

Pay per event: $0.0005 per page crawled ($0.50 per 1,000 pages) plus a tiny Actor start fee ($0.00005).

  • A page is charged when its HTML was downloaded and analysed, including pages that are then left out of the sitemap as noindex or non-canonical. The crawler has to download them to find that out, and to find the links on them.
  • Free: redirects, 4xx/5xx errors, timeouts, non-HTML files, and URLs blocked by robots.txt or your exclude globs (those are never fetched).
  • Set a maximum cost per run in the run options: the crawl stops at that amount and still writes a valid sitemap of the pages found so far (stoppedAtMaxCharge: true in OUTPUT).
Site sizeCost
100 pages$0.05
1,000 pages$0.50
10,000 pages$5.00

Compared with other sitemap tools in Apify Store (November 2026): one sitemap generator charges $0.099 per page; the popular "sitemap" Actors are extractors that read an existing sitemap rather than create one.

FAQ

How do I use the sitemap? Download sitemap.xml, upload it to your web root (https://www.example.com/sitemap.xml), add the Sitemap: line from OUTPUT to your robots.txt and submit the URL in Google Search Console.

Does it render JavaScript? No. It reads the HTML the server sends, like most crawlers. Links that only appear after JavaScript runs (some single-page apps) are not discovered. Server-rendered sites, WordPress, Shopify, Wix, Squarespace and static sites work.

Why is my sitemap smaller than my site? Check the dataset: every excluded URL has an excludedReason, and OUTPUT counts URLs that were never fetched (maxPages, maxDepth, robotsTxtDisallowed, hasQueryString, excludeGlobs). Pages that are not linked from anywhere (orphan pages) cannot be found by crawling.

Does it add <priority> and <changefreq>? No <priority>. <changefreq> is optional (one value for all URLs). Google ignores both.

Can it crawl sites behind a login or bot protection? No. It sends honest requests with the User-Agent gazidev-sitemap-generator/0.1, does not bypass bot protection and does not log in. Sites that block it give HTTP 403 rows.

Is robots.txt respected? Yes, by default: disallowed URLs are not fetched and not listed, Crawl-delay (up to 10 s) is honored, and meta nofollow pages are not followed. Turn this off only for a website you own.

Image sitemaps? Turn on Add image entries to add <image:image> entries for every <img> on each page (up to 1,000 per page).

Use with AI agents / Apify MCP

The Actor works as a tool in the Apify MCP server (Claude, Cursor, ChatGPT and other MCP clients). Example prompt: "Generate a sitemap for https://www.example.com with up to 500 pages and give me the download link." The agent calls gazidev/sitemap-generator with {"startUrl": "...", "maxPages": 500} and reads sitemapUrl from the OUTPUT record. Through the API, call the run-sync endpoint and fetch /key-value-stores/{storeId}/records/sitemap.xml.

Limits

  • One website per run (the start URL's host; www and non-www are treated as the same site).
  • Up to 100,000 pages per run. No JavaScript rendering.
  • Pages are fetched with plain HTTP from Apify's datacenter IPs; sites that block datacenter traffic return 403 and are left out.
  • Duplicate URLs without a canonical tag (e.g. / and /index.html) are both listed: add canonical tags to your pages or use exclude globs.