Sitemap Checker: Broken Links, 404s & Redirects for Every URL avatar

Sitemap Checker: Broken Links, 404s & Redirects for Every URL

Pricing

Pay per event

Go to Apify Store
Sitemap Checker: Broken Links, 404s & Redirects for Every URL

Sitemap Checker: Broken Links, 404s & Redirects for Every URL

Sitemap checker and sitemap URL extractor. Give it a site or sitemap URL: it discovers all sitemaps (robots.txt, indexes, .xml.gz), lists every URL, and checks each for 404s, broken links, redirect chains and slow responses. $1 per 1,000 URLs checked; network failures are free.

Pricing

Pay per event

Rating

0.0

(0)

Developer

J Latham

J Latham

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Features

Limited permissions

Share

Sitemap Checker takes a website or a sitemap URL, discovers all of its sitemaps (via robots.txt, /sitemap.xml, sitemap indexes and .xml.gz files), and checks every URL in them for broken links (404/5xx), redirect chains, slow responses and wrong content types. You get one dataset row per URL plus a SUMMARY with counts and the full list of broken and redirected URLs. Prefer to just collect the URLs? Switch off checkUrls and it works as a sitemap URL extractor, returning every URL with its lastmod for $0.0002 each.

What it costs: $0.001 per URL that returns an HTTP response ($1 per 1,000), or $0.0002 per URL in list-only mode. Network failures are free, and the run stops cleanly at your maximum-charge limit.

Polite by design: at most 2 requests per host in flight, Crawl-delay from robots.txt honoured, same-site URLs only by default, and private/internal addresses refused.

What it does

  1. Discovery – for a site URL: Sitemap: lines in robots.txt, then /sitemap.xml and /sitemap_index.xml if robots lists none. A direct sitemap URL (.xml, .xml.gz, .txt) is used as-is.
  2. Parsing – <urlset> and <sitemapindex> (recursive, depth ≤ 4, ≤ 500 sitemap files per input), gzip detected by content, plain-text sitemaps, lastmod captured. Malformed XML is tolerated: everything parseable/recoverable is kept and the sitemap is flagged malformed in SUMMARY. Entity declarations and decompression bombs are rejected.
  3. Checking (optional) – HEAD, falling back to GET (body never downloaded) when HEAD fails or answers 4xx/5xx other than 429. Records status, final URL, redirect-chain length and hops, response time, content type.

Input

FieldDescription
urlsSite URLs or sitemap URLs, one per line.
checkUrlstrue (default): check each URL. false: list sitemap URLs only.
maxUrlsMax URLs per input (default 100, up to 100 000). Large indexes are read only as far as needed.
includeExternalHostsDefault false: only URLs on the same site as the input (ignoring www.) are processed, so a sitemap can't make the Actor probe third parties.
useGetFallbackDefault true.
maxConcurrencyTotal parallel checks (default 10). At most 2 requests per host are ever in flight.
maxCrawlDelaySecsCrawl-delay from robots.txt (our user-agent group, else *) is honoured between request starts per host, capped at this value (default 10; 0 disables).
timeoutSecsPer-request timeout (default 20).

Private/loopback/link-local targets are refused (SSRF guard); redirects are guarded too.

Output

Dataset item per URL:

{"url":"https://ghost.org/contact/","lastmod":"2025-08-04T02:01:27-06:00","sitemap":"https://ghost.org/sitemap-pages.xml",
"source":"https://ghost.org","checked":true,"statusCode":200,"statusClass":"2xx","finalUrl":"https://ghost.org/contact/",
"redirectCount":0,"redirectChain":[],"responseTimeMs":43,"contentType":"text/html; charset=UTF-8","method":"HEAD",
"error":null,"errorType":null,"checkedAt":"2026-11-21T11:15:18+00:00"}

Network failures have statusCode: null, statusClass: "error" and an errorType (timeout, connection_error, tls_error, dns_error, blocked_target, …). An input with no usable sitemap yields one item with errorType: "no_sitemap".

SUMMARY (key-value store): countsByStatusClass (2xx/3xx/4xx/5xx/error), brokenCount + broken list (4xx/5xx/network errors, capped at 1000), redirectedCount + redirected, per-input sitemap report (files read, kinds, URL counts, malformed flags, errors, truncation), charged events, URLs skipped due to the max-charge limit.

Pricing (pay per event)

  • url-checked – $0.001 per URL that returned an HTTP response (any status, 404/500 included). Failed network checks are free.
  • url-listed – $0.0002 per URL when checkUrls is off (listing only).
  • Discovery (robots/sitemap fetches) and error items are free. Charges use idempotency keys per URL, and the run stops cleanly at your maximum total charge (remaining URLs listed in SUMMARY).

Develop & test

python3 -m venv .venv && .venv/bin/pip install -r requirements.txt pytest
.venv/bin/python -m pytest -q # offline suite (fixtures + mock transport, incl. end-to-end under PPE test mode)
# local run
mkdir -p storage/key_value_stores/default
echo '{"urls":["https://ghost.org"],"maxUrls":30}' > storage/key_value_stores/default/INPUT.json
ACTOR_TEST_PAY_PER_EVENT=true APIFY_LOCAL_STORAGE_DIR=$PWD/storage .venv/bin/python -m src

Local PPE test mode bills every event at $1 (including the SDK's synthetic apify-default-dataset-item); this is a local artifact only. The charging log is in storage/datasets/charging-log.

Known limitations

  • robots.txt Disallow rules are not applied to checks (only Crawl-delay); sitemap URLs are checked because the site owner published them.
  • No JavaScript rendering; bot-protected sites may answer 403/429 to HEAD/GET (reported as such, and charged as a response).
  • maxUrls is per input; cross-input duplicates are removed.