Find broken links
Broken Link Checker API · 1,000 points per successful call
Product overview and demoAll Ahrefs API endpointsError codes
Lists what is broken around a website, in both directions: inbound backlinks that land on dead pages of the target (with the linking page, its Domain Rating, anchor and surrounding text), and the target’s own pages that link out to dead URLs, grouped by page. Totals and dofollow shares accompany each list.
bearerAuthAuthorizationBearer <token>Your API key, sent as a bearer token. In the console on this page you can leave it empty: signed in, calls run on your own plan; otherwise they run on a shared demo key after a quick human check.
url*stringThe website to evaluate — a bare domain or a full URL.
^\S+\.\S+$4 <= length <= 512mode?stringexact checks only the specified URL; subdomains checks the whole domain including its subdomains.
"subdomains""exact""subdomains"Successful response
application/json- response
meta*data*curl -X GET 'https://api.endpointry.com/v1/ahrefs/broken-links?url=ahrefs.com&mode=subdomains'{
"meta": {
"request_id": "req_7729f93d3facf68ff83e5c50",
"as_of": "2026-08-03T09:00:00.000Z",
"cache": "MISS"
},
"data": {
"target": "ahrefs.com",
"mode": "subdomains",
"inbound": {
"total": 443934,
"dofollow_percent": 99,
"links": [
{
"url_from": "https://ipgeolocation.io/what-is-my-ip",
"title": "What is My IP Address? - IP Geo Location & Security Lookup",
"domain_rating": 69,
"url_to": "https://ahrefs.com/robot/)",
"http_code": 404,
"anchor": "http://ahrefs.com/robot/)",
"text_pre": "\"Mozilla/5.0 (compatible; AhrefsBot/7.0; +",
"text_post": "\""
}
]
},
"outbound": {
"total": 1448,
"dofollow_percent": 82,
"pages": [
{
"url": "https://ahrefs.com/blog/hreflang-tags/",
"title": "Hreflang: The Easy Guide for Beginners",
"internal_links": 70,
"external_links": 38,
"links": [
{
"url_to": "https://webmasters.googleblog.com/2016/08/helping-users.html",
"anchor": "interstitial",
"http_code": 404,
"text_pre": "it’s too large, the banner could be seen as an",
"text_post": "."
}
]
}
]
}
}
}