Broken Link Checker: Find 404s & Sitemap URLs avatar

Broken Link Checker: Find 404s & Sitemap URLs

Pricing

from $5.00 / 1,000 results

Go to Apify Store
Broken Link Checker: Find 404s & Sitemap URLs

Broken Link Checker: Find 404s & Sitemap URLs

Find broken links and 404 errors on any website for $5 per 1,000 checked links. Reads sitemap.xml and robots.txt, crawls internal pages, and returns each link's HTTP status code, redirect target and source page. Export to JSON, CSV or Excel.

Pricing

from $5.00 / 1,000 results

Rating

0.0

(0)

Developer

Is Koren

Is Koren

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

0

Monthly active users

4 days ago

Last modified

Features

Limited permissions

Share

Sitemap & Broken Link Checker is an Apify actor that reads a website's sitemap.xml and robots.txt, crawls its internal pages, and returns one row per checked link with the HTTP status code, redirect target and the page the link was found on, priced at $5 per 1,000 checked links.

The actor finds broken links, 404 errors, redirects and unreachable URLs on any public website. For each start URL it:

  1. Discovers URLs from sitemaps. It reads Sitemap: lines in robots.txt, fetches /sitemap.xml, and follows sitemap index files to their child sitemaps.
  2. Crawls internal pages. It visits same-domain pages breadth-first from the start URL and collects every <a href> link, recording the page where each link was found.
  3. Checks the HTTP status of each link. It sends a HEAD request first and falls back to GET when HEAD fails or returns a status of 400 or higher, following redirects to the final URL.
  4. Saves one dataset row per link with a category of ok, broken, redirect or error.
FieldTypeDescription
urlstringThe link that was checked.
statusCodeinteger or nullFinal HTTP status code after redirects; null if the request failed.
okbooleantrue when the final status code is below 400.
categorystringok, broken (status 400+ with no redirect), redirect (at least one redirect hop) or error (request failed).
redirectedTostring or nullFinal URL when the link redirected.
linkTypestringinternal (same host as the start URL, ignoring www.) or external.
foundOnstringPage where the link was first found, or <site>/sitemap.xml for sitemap URLs.
errorstring or nullError message for timeouts, DNS or TLS failures.

The dataset has an Overview table view, and you can export results as JSON, CSV, Excel, XML or HTML.

  1. Open the actor and enter one or more websites in Start URLs.
  2. Keep Use sitemap and Crawl internal links on, or turn one off (see the FAQ for when to do that).
  3. Turn Check external links off if you only want to audit your own domain.
  4. Set Max URLs to check (1-2,000). Start with 50-100 to preview results.
  5. Click Start and wait for the run to finish.
  6. Export the dataset to CSV or Excel, filter on ok = false to list every dead link, then sort by foundOn to see which pages need fixing.

Checking 1,000 links with Sitemap & Broken Link Checker costs $5, because the actor charges $0.005 per result row and each checked link is one row. Each run also has a start fee of $0.005 per GB of memory.

Links checkedResult rowsRow charges
100 (default)100$0.50
1,0001,000$5.00
2,000 (maximum)2,000$10.00

The maxUrls setting is a hard cap, so a run never produces more rows than you allow.

Input and output example

Input from a real test run (crawl only, internal and external links):

{
"startUrls": ["https://crawlee.dev"],
"useSitemap": false,
"crawlLinks": true,
"checkExternalLinks": true,
"maxUrls": 40,
"proxyConfiguration": { "useApifyProxy": true }
}

Three real output rows from test runs on crawlee.dev and apify.com:

[
{
"url": "https://crawlee.dev/js",
"statusCode": 200,
"ok": true,
"category": "ok",
"redirectedTo": null,
"linkType": "internal",
"foundOn": "https://crawlee.dev",
"error": null
},
{
"url": "https://apify.com/alternatives/gmapsextractor-alternative",
"statusCode": 200,
"ok": true,
"category": "redirect",
"redirectedTo": "https://apify.com/alternatives/outscraper-alternative",
"linkType": "internal",
"foundOn": "https://apify.com/sitemap.xml",
"error": null
},
{
"url": "https://stackoverflow.com/questions/tagged/crawlee",
"statusCode": 403,
"ok": false,
"category": "broken",
"redirectedTo": null,
"linkType": "external",
"foundOn": "https://crawlee.dev",
"error": null
}
]

The third row shows a common case: some sites return 403 to automated requests even though the page opens in a browser. Review external 403 and 429 results by hand before removing a link.

Limits and how it compares

Sitemap & Broken Link Checker is a lightweight HTTP checker, not a full site-audit suite:

  • Static HTML only. Pages are parsed without a browser, so links added by JavaScript are not discovered.
  • Anchor links only. The actor checks <a href> links. Images, scripts, stylesheets and canonical tags are not checked.
  • One row per unique URL. Each link is checked once per run; foundOn holds the first page where it was seen, not every page that links to it.
  • Budget is shared. maxUrls (maximum 2,000) covers all start URLs together. When sitemap discovery already fills the budget, the internal crawl is skipped and every foundOn points to sitemap.xml.
  • Crawl depth. The crawl visits at most 200 pages per start URL.
  • Subdomains count as external. Only a leading www. is ignored when comparing hosts.
  • Requests run one at a time with a 20-second timeout each, so large runs take longer than parallel crawlers.
  • SEO audits: find 404 pages and redirect chains listed in your sitemap before search engines crawl them.
  • Site migrations: confirm that old URLs redirect to the right new pages via redirectedTo.
  • Content QA: catch dead outbound links in blog posts and documentation.
  • Monitoring: schedule a weekly run and track the count of rows with ok = false.

Python (apify-client):

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("iskoren/sitemap-broken-link-checker").call(run_input={
"startUrls": ["https://example.com"],
"maxUrls": 100,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
if not item["ok"]:
print(item["statusCode"], item["url"], "found on", item["foundOn"])

JavaScript (apify-client):

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('iskoren/sitemap-broken-link-checker').call({
startUrls: ['https://example.com'],
maxUrls: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((item) => !item.ok));

cURL:

curl -X POST "https://api.apify.com/v2/acts/iskoren~sitemap-broken-link-checker/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"startUrls": ["https://example.com"], "maxUrls": 100}'

Filter the dataset on ok = false to list only the broken links. That filter catches broken and error rows, plus redirect rows whose final destination returned 400 or higher.

The broken link checker follows every redirect to the final URL. Any link with at least one redirect hop gets category: "redirect", the final address in redirectedTo, and the final status in statusCode.

Sitemap & Broken Link Checker can audit a site without a sitemap by crawling its internal links. Keep Crawl internal links on and the actor discovers pages starting from your start URL.

Why do my results show sitemap.xml as the source page?

The foundOn field shows sitemap.xml when a URL came from the sitemap rather than from a page. To see which page contains each link, turn off Use sitemap so the run relies on the internal crawl.

The checker tests links to other domains when Check external links is on, which is the default. Turn it off to check only links on your own domain.

Why is a working page reported as 403 or error?

A working page can be reported as 403 or error when the target server blocks automated requests, times out, or has a DNS or TLS problem. Keep Apify Proxy on and re-check those URLs by hand before treating them as dead.

One run checks up to 2,000 links, set with Max URLs to check.

Changelog

Last updated: November 2026

  • November 2026: Rewrote this README with real output samples, added a dataset schema with an Overview table view, and pinned the Apify Python SDK to 3.4.1.
  • Version 0.1: First release with sitemap discovery, internal crawling, and internal and external link checking.