Sitemap Extractor & Broken Link Checker avatar

Sitemap Extractor & Broken Link Checker

Pricing

$0.50 / 1,000 url processeds

Go to Apify Store
Sitemap Extractor & Broken Link Checker

Sitemap Extractor & Broken Link Checker

Extract every URL from a website's XML sitemaps (robots.txt discovery, sitemap indexes, .gz) with lastmod, check HTTP status codes, and crawl pages to find broken internal and external links with source page and anchor text. Polite: respects robots.txt.

Pricing

$0.50 / 1,000 url processeds

Rating

0.0

(0)

Developer

Jean Swiegers

Jean Swiegers

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

14 hours ago

Last modified

Share

Sitemap Extractor & Broken Link Checker – All URLs, Status Codes & Dead Links

Get every URL from a website's sitemap in seconds, then find what's broken. Give it a homepage or a sitemap URL and it discovers sitemaps automatically (robots.txt, /sitemap.xml, /sitemap_index.xml), follows sitemap indexes and gzipped sitemaps, and exports every URL with lastmod, changefreq and priority. Optionally it checks the HTTP status of every URL and crawls your pages to find broken internal and external links, reporting the page each broken link is on and its anchor text.

What can I use it for?

  • 🔎 Technical SEO audits – find 404s, 5xx errors and redirects listed in your sitemap (Google wastes crawl budget on them)
  • 🔗 Broken link checking – fix dead links before users and search engines hit them, with the exact source page and anchor text
  • 🗺️ Site inventory & content audits – export all pages with last-modified dates to a spreadsheet
  • 🚚 Website migrations – collect the full URL list before a redesign and verify redirects afterwards
  • 🕵️ Competitor research – see how many pages competitors have and what they published recently
  • 🤖 Feed other scrapers / RAG crawlers – get a clean URL list to process

Features

  • Sitemap discovery via robots.txt plus common locations; XML, sitemap index, .xml.gz and plain-text sitemaps
  • De-duplicated URLs with lastmod, changefreq, priority and the sitemap they came from
  • Optional status check (HEAD with GET fallback): status code, redirect target, response time
  • Optional broken link crawl of internal pages: broken links (404/410/5xx/DNS/timeouts) with source page, anchor text and internal/external flag; links blocked by bot protection (401/403/429) are reported separately as restricted-link so they don't pollute your broken-link list
  • Polite by design: respects robots.txt, per-host rate limit, automatic back-off on 429, identifies itself with a clear user agent
  • Per-site errors with clear messages; you only pay for URLs actually delivered

Input example

{
"startUrls": [{ "url": "https://crawlee.dev" }],
"maxUrls": 5000,
"checkStatus": true,
"crawlForBrokenLinks": true,
"maxCrawlPages": 200,
"maxRequestsPerSecond": 4
}

Output example

Sitemap URL row (with checkStatus):

{
"type": "sitemap-url",
"site": "https://crawlee.dev",
"url": "https://crawlee.dev/blog",
"lastmod": null,
"changefreq": "weekly",
"priority": 0.5,
"sitemap": "https://crawlee.dev/sitemap.xml",
"statusCode": 200,
"ok": true,
"redirectedTo": null,
"responseTimeMs": 75,
"checkError": null
}

Broken link row (with crawlForBrokenLinks):

{
"type": "broken-link",
"site": "https://crawlee.dev",
"sourcePage": "https://crawlee.dev/js/api/core/changelog",
"linkUrl": "https://github.com//github.com/apify/crawlee/blob/f3eb99d9fa9a7aa0ec1dcb9773e666a9ac14fb76/packages/core/src/storages/sitemap_request_list.ts/issues/L446",
"anchorText": "/github.com/apify/crawlee/blob/f3eb99d9fa9a7aa0ec1dcb9773e666a9ac14fb76/packages/core/src/storages/sitemap_request_list.ts#L446",
"linkType": "external",
"statusCode": 404,
"error": null,
"redirectedTo": null
}

A run summary per site (URLs extracted, pages crawled, broken links, sitemap errors) is saved as SITE_SUMMARIES in the key-value store.

How much does it cost?

Pay per event: $0.0005 per URL – each sitemap URL delivered (status check included) and each page crawled for links. That's $0.50 per 1,000 URLs. Broken-link rows are included at no extra cost. No extra platform usage charges. Set a maximum cost per run and the Actor stops cleanly when it is reached.

FAQ

My site has no sitemap. Turn on crawlForBrokenLinks – the crawler discovers pages from links instead.

Why is a link marked restricted-link? The target answered 401/403/429 – usually a login wall or bot protection (LinkedIn, Stack Overflow…). It probably works in a browser, so we don't call it broken.

Will this overload my server? No. The default is 4 requests per second per host, robots.txt is respected and the crawler backs off on 429. Lower maxRequestsPerSecond for very small servers.

Does it render JavaScript? No – it reads HTML and sitemaps directly, which is fast and cheap. Links injected only by client-side JavaScript are not discovered.