How to find broken links and broken images on a website
Short answer
Fetch each page, collect every link and image URL, and request each unique URL once: a 404, 410, 5xx, DNS error or timeout is broken. Linkpail on Apify does this for page URLs or whole sites at $0.0006 per unique URL plus $0.002 per run, and lists the page each broken URL sits on.
- Paste your page URLs into startUrls (your own sites or pages you may check).
- Turn on crawlSite to follow internal links, and set maxPagesPerSite (default 25).
- Leave checkImages on to catch broken images; turn on checkAssets for CSS, JavaScript and icons.
- Run. Broken URLs come back with pageUrl, url, anchor text, status and error; turn off onlyBroken to see redirects and blocked URLs too.
- Fix each row at its pageUrl, then re-run to confirm.
Copy-paste code
Python (pip install apify-client)
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("cybermax/broken-link-checker").call(run_input={"startUrls": ["https://example.com/"], "crawlSite": true, "maxPagesPerSite": 50})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row)No code: n8n, Make or Zapier
n8n: HTTP Request node (or the Apify node, action "Run an Actor and get dataset")
Method: POST
URL: https://api.apify.com/v2/acts/cybermax~broken-link-checker/run-sync-get-dataset-items
Auth: Header Auth -> Authorization: Bearer <your Apify token>
Body: JSON {"startUrls": ["https://example.com/"], "crawlSite": true, "maxPagesPerSite": 50}
Make: Apify app -> "Run an Actor" (Actor: cybermax/broken-link-checker, wait for finish = yes) -> "Get Dataset Items"
Zapier: Apify app -> action "Run Actor" (cybermax/broken-link-checker) -> "Fetch Dataset Items" -> your appFrom an AI agent (MCP)
# Any MCP client: Apify's hosted MCP server
{
"mcpServers": {
"broken-link-checker": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.apify.com/?tools=cybermax/broken-link-checker",
"--header", "Authorization: Bearer ${APIFY_TOKEN}"],
"env": { "APIFY_TOKEN": "<your Apify token>" }
}
}
}| type | found on | url | status | result |
|---|---|---|---|---|
| link | https://books.toscrape.com/ | /this-page-does-not-exist.html | 404 | broken |
| link | https://quotes.toscrape.com/ | /author/Albert-Einstein | 200 | redirected |
Source: Linkpail (Apify Actor cybermax/broken-link-checker) README, real Apify runs on 18 Nov 2026
Blocked is not broken
S
o
m
e
s
i
t
e
s
a
n
s
w
e
r
a
u
t
o
m
a
t
e
d
c
h
e
c
k
s
w
i
t
h
4
0
3
o
r
4
2
9
a
l
t
h
o
u
g
h
t
h
e
p
a
g
e
w
o
r
k
s
i
n
a
b
r
o
w
s
e
r
.
L
i
n
k
p
a
i
l
r
e
p
o
r
t
s
t
h
o
s
e
a
s
b
l
o
c
k
e
d
s
o
y
o
u
c
a
n
c
h
e
c
k
t
h
e
m
b
y
h
a
n
d
.
Redirects are worth fixing too
A
r
e
d
i
r
e
c
t
e
d
l
i
n
k
s
t
i
l
l
w
o
r
k
s
b
u
t
s
l
o
w
s
r
e
a
d
e
r
s
a
n
d
c
a
n
l
o
s
e
r
a
n
k
i
n
g
s
i
g
n
a
l
s
o
v
e
r
t
i
m
e
.
T
u
r
n
o
f
f
o
n
l
y
B
r
o
k
e
n
t
o
l
i
s
t
t
h
e
m
w
i
t
h
t
h
e
i
r
f
i
n
a
l
U
R
L
.
Images count
A
b
r
o
k
e
n
i
m
a
g
e
i
s
a
b
r
o
k
e
n
l
i
n
k
r
e
a
d
e
r
s
s
e
e
.
L
i
n
k
p
a
i
l
c
h
e
c
k
s
i
m
g
s
r
c
a
n
d
s
r
c
s
e
t
b
y
d
e
f
a
u
l
t
.
Good to know
Linkpail reads the HTML a server sends; links that only appear after JavaScript runs are not seen.
It identifies itself as LinkpailBot and checks 12 URLs at a time by default; use it on sites you run or may check.
Picpail: Every image on a page, full size, one ZIP
$0.0008 per image, duplicates and skips freeNeed the images themselves? Picpail downloads every image on a page into one ZIP, and Bouncefern checks a plain list of URLs and redirect maps.
Runs on your own Apify account, pay per result; failed results are not charged.Questions
Is it free to try?
Yes. Run it with no input for a free demo on a public practice site.
Does it check images?
Yes, img src and srcset, on by default.
What does a run cost?
$0.0006 per unique URL plus $0.002 per run; pages that fail to load are free.
Can an AI agent use it?
Yes. Apify's MCP server exposes it as cybermax--broken-link-checker.
Free: the Free API Starter Kit
Copy-paste calls for 4 APIs with free daily tiers (CVE priority, VIN recalls, US duty rates, email checks), then 5 short emails on KEV/EPSS, MCP and free data.