broken_backlinks - Ahrefs API

Ahrefs API v2 has been deprecated

This documentation is for the legacy version of our API (v2), which was discontinued on March 1st, 2024. Existing API v2 integration apps are not affected and continue to work as before, but new submissions are no longer accepted.

To switch to API v3, please contact our Enterprise team. Read about API v3.

Documentation - broken_backlinks

Contains the broken backlinks and details of the referring pages, such as anchor and page title.

Each request to broken_backlinks costs 1 row.
Each result in the response costs 5 rows.
Using 'where' costs 5 rows.
Using 'having' costs 5 rows.

refpages

Column Type Where Having Description
url_from string + + URL of the page where the backlink is found.
url_to string + + URL of the page the backlink is pointing to.
ahrefs_rank int + + URL Rating of the referring page.
domain_rating int − + Domain Rating of the referring domain.
ahrefs_top int − + Ahrefs Rank of the target domain.
ip_from string + + IP address of the referring page.
links_internal int + + Number of internal links found in the referring page.
links_external int + + Number of external links found in the referring page.
page_size int + + Size of the referring page, in bytes.
language string + + Language of the referring page (ISO 639-1).
encoding string + + Character encoding of the referring page, for example "utf8" or "iso-8859-1" (Latin-1).
title string + + Title of the referring page.
first_seen date + + Least recent date when the Ahrefs crawler was able to visit the backlink.
last_visited date + + Most recent date when the Ahrefs crawler was able to visit the backlink.
prev_visited date + + Second to the most recent date when the Ahrefs crawler was able to visit the backlink.
original boolean + + Indicates whether the backlink was present on the referring page when the Ahrefs crawler first visited it.
link_type string + + Either "href", "redirect", "frame", "form", "canonical", "rss", or "alternate".
redirect int + + For redirected links, the Redirect Code (3XX), zero otherwise.
nofollow boolean + + Indicates whether the backlink is NoFollow.
alt string + + Alternative text of the image backlink, if exists.
anchor string + + Anchor text of the backlink.
text_pre string + + Snippet before the anchor text.
text_post string + + Snippet after the anchor text.
broken_at date + + The date when the Ahrefs crawler thinks the link became broken.
url_from_first_seen date + + Least recent date when the Ahrefs crawler was able to visit the referring page with backlink.
http_code int + + The HTTP code for the Link URL.
error string + + The string indicating the nature of error (currently only "dns").

Examples