Home / Guides / How to Check Broken Links in Bulk in n8n

Updated

How to Check Broken Links in Bulk in n8n (Status Codes and Redirects)

To check a list of links in n8n, send all the URLs in one HTTP Request node to a bulk URL status Actor on Apify. Each URL comes back in the same order with its HTTP status code, a verdict that separates real broken links (4xx) from servers that only block checkers (401, 403, 429), the full redirect chain and the final URL. Filter on the verdict with an IF node and send the dead links to Slack, e-mail or Google Sheets.

1. One HTTP Request node for the whole list

Header Auth credential: Authorization = Bearer YOUR_APIFY_TOKEN. Node: POST https://api.apify.com/v2/acts/plainprobe~bulk-url-status-checker/run-sync-get-dataset-items, body JSON:

{
  "urls": ["http://python.org", "https://www.python.org/this-page-does-not-exist"],
  "maxConcurrency": 10,
  "timeoutSecs": 15
}

One item per URL with url, status, verdict, finalUrl, redirects (each hop with its status), redirectCount, responseTimeMs, error and checkedAt. Up to 10,000 URLs per run.

Or import the free n8n workflow template.

2. Where the URLs come from

Build the urls array from the previous node with an expression such as {{ $input.all().map(i => i.json.link) }}: a Google Sheets column, an Airtable view, the links of a CMS export, or every page of a sitemap (see find all pages of a website). Duplicates are checked once per occurrence, so remove them first with a Remove Duplicates node if your list has many.

3. Route the dead links

  1. Split Out is not needed: the node already returns one item per URL.
  2. Switch node on verdict: broken and server_error to the alert branch; refused to a separate list to check by hand (the server blocks automated checkers, it is not proof that the page is gone); ok with redirectCount greater than 1 to a redirect clean-up list after a migration.
  3. Slack, e-mail or Google Sheets (append row) with url, status and finalUrl. Put the whole thing on a Schedule Trigger to watch your links every week.

4. Costs and limits

$0.0005 per URL that received an HTTP answer ($0.50 per 1,000), plus the standard Actor start fee; invalid, DNS-failed and timed-out URLs are free. In our test, 57 URLs were checked in 5.2 seconds. The checker makes plain HTTP requests: pages that only answer a real browser or need a login are reported, not rendered. To find broken links inside the pages of a site rather than in a list, see find broken links on a website; for status codes outside n8n, see check HTTP status and redirects in bulk.

FAQ

How do I check if a list of URLs is broken in n8n?

Send the whole list in one HTTP Request node to a bulk URL status Actor on Apify (run-sync-get-dataset-items endpoint, body {"urls": [...]}) and get back one item per URL, in the same order, with the HTTP status, a verdict (ok, broken, refused, server_error or error), the redirect chain and the final URL. An IF node on verdict then routes the dead links.

Why not loop an HTTP Request node over each URL?

It works for a few URLs, but each 404 or timeout stops the workflow unless you enable Continue On Fail, redirects are followed silently so you cannot audit them, and a server that answers 403 to bots looks exactly like a dead page. A dedicated checker keeps those cases apart and runs the URLs in parallel.

How much does it cost?

$0.50 per 1,000 URLs with Plainprobe Bulk URL Status Checker ($0.0005 per URL that answered). Invalid, DNS-failed and timed-out URLs are free.

Related tool