Broken Link Checker API
Check every link and image of a web page: broken (404, 410, 5xx, no answer), redirected and bot-blocked links, with their anchor text and a score.
The broken link checker loads a page, collects its links (<a href>), images and optionally stylesheets and scripts (include=links,images,assets), resolves relative URLs, removes duplicates and checks each one: first with a HEAD request, then with GET for servers that refuse HEAD, following redirects with the same protections as the other web APIs.
Each result has its status, response time, final URL when redirected and anchor text, so broken links are easy to find in the page. The report separates broken links (404, 410, 5xx, timeouts, DNS errors), links that redirect (update them to the final URL) and links that refuse automated checks (401, 403, 429), and gives a score. scope=internal or external restricts the check.
To be fair to the sites being checked, one call checks one page, links are checked 8 at a time with an 8-second timeout, and the number of links per call depends on your plan (20 on the free online tool, 50 Free, 100 Starter, 200 Pro).
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
url | query|body | string | yes | Page URL. | |
include | query|body | string | no | links,images | Comma list: links, images, assets. |
scope | query|body | string | no | all | all, internal or external. |
limit | query|body | number | no | Max links to check (capped by plan). | |
lang | query|body | string | no | en | Language of the messages: en or vi. |
Example
curl "https://apibox.io.vn/v1/broken-links?url=https://en.wikipedia.org/wiki/Provinces_of_Vietnam&limit=40" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/broken-links?url=https://en.wikipedia.org/wiki/Provinces_of_Vietnam&limit=40', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/broken-links?url=https://en.wikipedia.org/wiki/Provinces_of_Vietnam&limit=40",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/broken-links?url=https://en.wikipedia.org/wiki/Provinces_of_Vietnam&limit=40');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"url": "https://en.wikipedia.org/wiki/Provinces_of_Vietnam",
"score": 95,
"grade": "A",
"totals": {
"found": 589,
"checked": 40,
"ok": 40,
"broken": 0,
"redirected": 5,
"blocked": 0,
"invalid": 0,
"skipped": 549
},
"broken": [],
"redirected": [
"…"
],
"links": [
{
"url": "https://en.wikipedia.org/wiki/Vietnam",
"status": 200,
"ok": true,
"kind": "link",
"internal": true,
"ms": 85
},
"…"
],
"checks": [
"…"
]
}
Use cases
- SEO maintenance: fix 404 links in articles
- Check pages before launch or migration
- Monitor important pages for dead links and images
- Find outdated links to partners and documentation
FAQ
Does it crawl my whole site?
No, it checks the links of one page per call. Call it for each page (for example from your sitemap) to cover a site.
Why is a working link reported as blocked?
Some sites refuse automated clients (401 / 403 / 429) but open fine in a browser. They are listed separately, not as broken.
Why weren’t all links checked?
The plan limit was reached; the skipped count is in totals. Use scope=internal or a higher plan.
Related APIs
URL Metadata
Fetch any URL and get its title, description, Open Graph and Twitter Card tags, favicon, canonical, feeds and JSON-LD as JSON.
H:HTTP Headers
See the HTTP status and every response header of a URL, with a summary of security headers like HSTS, CSP and X-Frame-Options.
301Redirect Checker
Follow every 301, 302, 307 and 308 redirect of a URL and get the full chain with status codes, the final URL and the number of hops.