Docs
Search docs...⌘K

Backlinks

API + MCP
GET/v3/site-explorer/all-backlinks

Query parameters

timeoutinteger

A manual timeout duration in seconds.

limitinteger

The number of results to return.

Default:1000
order_bystring

A column to order results by. See the response schema for valid column identifiers, except for link_group_count, which is not supported in order_by for this endpoint.

Example:field_a,field_b:asc,field_c:desc
wherestring

The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the select parameter).

ahrefs_rank_source: The strength of the referring domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.
type: integer

ahrefs_rank_target: The strength of the target domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.
type: integer

alt: The alt attribute of the link.
type: string nullable

anchor: The clickable words in a link that point to a URL.
type: string

broken_redirect_new_target: The new destination of a modified redirect.
type: string nullable

broken_redirect_reason: The reason the redirect was considered broken during the last crawl.
type: string nullable
enum: "droppedmanual" "droppedtooold" "dropped" "codechanged" "nxdomain" "robotsdisallowed" "curlerror" "invalidtarget" "nomorecanonical" "isnowparked" "targetchanged"

broken_redirect_source: The redirecting URL that was modified, causing the redirect to become broken.
type: string nullable

class_c (5 units): The number of unique class_c subnets linking to the referring page.
type: integer

discovered_status: The reason the link was discovered during the last crawl: the page was crawled for the first time, the link was added to the page, or the link re-appeared after being removed.
type: string nullable
enum: "pagefound" "linkfound" "linkrestored"

domain_rating_source: The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.
type: float

domain_rating_target: The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.
type: float

drop_reason: The reason we removed the link from our index.
type: string nullable
enum: "manual" "noratingunused" "notop" "tooold" "oldunavailable" "rescursive" "duplicate" "nxdomain" "malformed" "blockedport" "disallowed" "unlinked"

encoding: The character set encoding of the referring page HTML.
type: string

first_seen: The date the referring page URL was first discovered.
type: datetime

first_seen_link: The date we first found a backlink to your target on a given referring page.
type: datetime

http_code: The return code from HTTP protocol returned during the referring page crawl.
type: integer

http_crawl: The link was discovered without executing javascript and rendering the page.
type: boolean

ip_source: The referring domain IP address.
type: string nullable

is_alternate: The link with the rel=“alternate” attribute.
type: boolean

is_canonical: The link with the rel=“canonical” attribute.
type: boolean

is_content: The link was found in the biggest piece of content on the page.
type: boolean

is_dofollow: The link has no special nofollow attribute.
type: boolean

is_form: The link was found in a form HTML tag.
type: boolean

is_frame: The link was found in an iframe HTML tag.
type: boolean

is_homepage_link: The link was found on the homepage of a referring website.
type: boolean

is_image: The link is a regular link that has an image inside their href attribute.
type: boolean

is_lost: The link currently does not exist anymore.
type: boolean

is_new: The link was discovered on the last crawl.
type: boolean

is_nofollow: The link or the referring page has the nofollow attribute set.
type: boolean

is_non_html: The link points to a URL with non-HTML content.
type: boolean

is_redirect: The link pointing to your target via a redirect.
type: boolean

is_redirect_lost: The redirected link currently does not exist anymore.
type: boolean

is_root_source: The referring domain name is a root domain name.
type: boolean

is_root_target: The target domain name is a root domain name.
type: boolean

is_rss: The link was found in an RSS feed.
type: boolean

is_spam: Indicates whether the backlink comes from a known spammy domain.
type: boolean

is_sponsored: The link has the Sponsored attribute set in the referring page HTML.
type: boolean

is_text: The link is a standard href hyperlink.
type: boolean

is_ugc: The link has the User Generated Content attribute set in the referring page HTML.
type: boolean

js_crawl: The link was discovered after executing javascript and rendering the page.
type: boolean

languages: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.
type: array(string)

last_seen: The date we discovered that the link was lost.
type: datetime nullable

last_visited: The date we last verified a live link to your target page.
type: datetime

len_url_redirect: The number of redirect chain URLs.
type: integer

link_group_count: The number of backlinks that were grouped together based on the aggregation parameter. This field cannot be used with aggregation 'all'.
type: integer

link_type: The kind of the backlink.
type: string
enum: "redirect" "frame" "text" "form" "canonical" "alternate" "rss" "image"

linked_domains_source_domain: The number of unique root domains linked from the referring domain.
type: integer

linked_domains_source_page: The number of unique root domains linked from the referring page.
type: integer

linked_domains_target_domain: The number of unique root domains linked from the target domain.
type: integer

links_external: The number of external links from the referring page.
type: integer

links_internal: The number of internal links from the referring page.
type: integer

lost_reason: The reason the link was lost during the last crawl.
type: string nullable
enum: "removedfromhtml" "notcanonical" "noindex" "pageredirected" "pageerror" "lostredirect" "notfound"

name_source: The complete referring domain name, including subdomains.
type: string

name_target: The complete target domain name, including subdomains.
type: string

noindex: The referring page has the noindex meta attribute.
type: boolean

page_category_source: Comma-separated list of AI-predicted hierarchical category paths for the referring page. Each value is a slash-prefixed path (e.g. /Business_and_Industrial/Advertising_and_Marketing/Marketing).
type: string nullable

page_size: The size in bytes of the referring page content.
type: integer

page_type_source: Comma-separated list of AI-predicted hierarchical page type paths for the referring page. Each value is a slash-prefixed path (e.g. /Article/How_to).
type: string nullable

port_source: The network port of the referring page URL.
type: integer

port_target: The network port of the target page URL.
type: integer

positions: The number of keywords that the referring page ranks for in the top 100 positions.
type: integer

positions_source_domain: The number of keywords that the referring domain ranks for in the top 100 positions.
type: integer

powered_by: Web technologies used to build and serve the referring page content.
type: array(string)

redirect_code: The HTTP status code of a referring page pointing to your target via a redirect.
type: integer nullable

redirect_kind: The HTTP status codes returned by the target redirecting URL or redirect chain.
type: array(integer)

refdomains_source (5 units): The number of unique referring domains linking to the referring page.
type: integer

refdomains_source_domain (5 units): The number of unique referring domains linking to the referring domain.
type: integer

refdomains_target_domain (5 units): The number of unique referring domains linking to the target domain.
type: integer

root_name_source: The root domain name of the referring domain, not including subdomains.
type: string

root_name_target: The root domain name of the target domain, not including subdomains.
type: string

snippet_left: The snippet of text appearing just before the link.
type: string

snippet_right: The snippet of text appearing just after the link.
type: string

source_page_author: The author of the referring page.
type: string nullable

source_page_publish_date: the date we identified the page was published
type: date nullable

title: The html title of the referring page.
type: string

tld_class_source: The top level domain class of the referring domain.
type: string
enum: "gov" "edu" "normal"

tld_class_target: The top level domain class of the target domain.
type: string
enum: "gov" "edu" "normal"

traffic (10 units): The referring page's estimated monthly organic traffic from search.
type: integer

traffic_domain (10 units): The referring domain's estimated monthly organic traffic from search.
type: integer

url_from: The URL of the page containing a link to your target.
type: string

url_from_plain: The referring page URL optimized for use as a filter.
type: string

url_rating_source: The strength of the referring page's backlink profile compared to the others in our database on a 100-point scale.
type: float

url_redirect: A redirect chain the target URL of the link points to.
type: array(url)

url_redirect_with_target: The target URL of the link with its redirect chain.
type: array(string)

url_to: The URL the backlink points to.
type: string

url_to_plain: The target page URL optimized for use as a filter.
type: string

selectstringRequired

A comma-separated list of columns to return. See response schema for valid column identifiers.

protocolstring

The protocol of your target.

Allowed values:bothhttphttps
Default:both
targetstringRequired

The target of the search: a domain or a URL.

modestring

The scope of the search based on the target you entered.

Allowed values:exactprefixdomainsubdomains
Default:subdomains
aggregationstring

The backlinks grouping mode.

Allowed values:similar_links1_per_domainall
Default:similar_links
historystring

A time frame to add lost backlinks to the report. Choose between live (no history), since:<date> (history since a specified date), and all_time (full history). The date should be in YYYY-MM-DD format.

Default:all_time
outputstring

The output format.

Allowed values:jsoncsvxmlphp

Responses

backlinksarray<object>
ahrefs_rank_sourceinteger

The strength of the referring domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.

ahrefs_rank_targetinteger

The strength of the target domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.

altstring or null

The alt attribute of the link.

anchorstring

The clickable words in a link that point to a URL.

broken_redirect_new_targetstring or null

The new destination of a modified redirect.

broken_redirect_reasonstring or null

The reason the redirect was considered broken during the last crawl.

Allowed values:droppedmanualdroppedtooolddroppedcodechangednxdomainrobotsdisallowedcurlerrorinvalidtargetnomorecanonicalisnowparkedtargetchanged
broken_redirect_sourcestring or null

The redirecting URL that was modified, causing the redirect to become broken.

class_cinteger

(5 units) The number of unique class_c subnets linking to the referring page.

discovered_statusstring or null

The reason the link was discovered during the last crawl: the page was crawled for the first time, the link was added to the page, or the link re-appeared after being removed.

Allowed values:pagefoundlinkfoundlinkrestored
domain_rating_sourcenumber

The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.

domain_rating_targetnumber

The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.

drop_reasonstring or null

The reason we removed the link from our index.

Allowed values:manualnoratingunusednotoptoooldoldunavailablerescursiveduplicatenxdomainmalformedblockedportdisallowedunlinked
encodingstring

The character set encoding of the referring page HTML.

first_seenstring

The date the referring page URL was first discovered.

first_seen_linkstring

The date we first found a backlink to your target on a given referring page.

http_codeinteger

The return code from HTTP protocol returned during the referring page crawl.

http_crawlboolean

The link was discovered without executing javascript and rendering the page.

ip_sourcestring or null

The referring domain IP address.

is_alternateboolean

The link with the rel=“alternate” attribute.

is_canonicalboolean

The link with the rel=“canonical” attribute.

is_contentboolean

The link was found in the biggest piece of content on the page.

is_dofollowboolean

The link has no special nofollow attribute.

is_formboolean

The link was found in a form HTML tag.

is_frameboolean

The link was found in an iframe HTML tag.

is_imageboolean

The link is a regular link that has an image inside their href attribute.

is_lostboolean

The link currently does not exist anymore.

is_newboolean

The link was discovered on the last crawl.

is_nofollowboolean

The link or the referring page has the nofollow attribute set.

is_redirectboolean

The link pointing to your target via a redirect.

is_redirect_lostboolean

The redirected link currently does not exist anymore.

is_root_sourceboolean

The referring domain name is a root domain name.

is_root_targetboolean

The target domain name is a root domain name.

is_rssboolean

The link was found in an RSS feed.

is_spamboolean

Indicates whether the backlink comes from a known spammy domain.

is_sponsoredboolean

The link has the Sponsored attribute set in the referring page HTML.

is_textboolean

The link is a standard href hyperlink.

is_ugcboolean

The link has the User Generated Content attribute set in the referring page HTML.

js_crawlboolean

The link was discovered after executing javascript and rendering the page.

languagesarray<string>

The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.

last_seenstring or null

The date we discovered that the link was lost.

last_visitedstring

The date we last verified a live link to your target page.

link_group_countinteger

The number of backlinks that were grouped together based on the aggregation parameter. This field cannot be used with aggregation 'all'.

link_typestring

The kind of the backlink.

Allowed values:redirectframetextformcanonicalalternaterssimage
linked_domains_source_domaininteger

The number of unique root domains linked from the referring domain.

linked_domains_source_pageinteger

The number of unique root domains linked from the referring page.

linked_domains_target_domaininteger

The number of unique root domains linked from the target domain.

links_externalinteger

The number of external links from the referring page.

links_internalinteger

The number of internal links from the referring page.

lost_reasonstring or null

The reason the link was lost during the last crawl.

Allowed values:removedfromhtmlnotcanonicalnoindexpageredirectedpageerrorlostredirectnotfound
name_sourcestring

The complete referring domain name, including subdomains.

name_targetstring

The complete target domain name, including subdomains.

noindexboolean

The referring page has the noindex meta attribute.

page_category_sourcestring or null

Comma-separated list of AI-predicted hierarchical category paths for the referring page. Each value is a slash-prefixed path (e.g. /Business_and_Industrial/Advertising_and_Marketing/Marketing).

page_sizeinteger

The size in bytes of the referring page content.

page_type_sourcestring or null

Comma-separated list of AI-predicted hierarchical page type paths for the referring page. Each value is a slash-prefixed path (e.g. /Article/How_to).

port_sourceinteger

The network port of the referring page URL.

port_targetinteger

The network port of the target page URL.

positionsinteger

The number of keywords that the referring page ranks for in the top 100 positions.

powered_byarray<string>

Web technologies used to build and serve the referring page content.

redirect_codeinteger or null

The HTTP status code of a referring page pointing to your target via a redirect.

redirect_kindarray<integer>

The HTTP status codes returned by the target redirecting URL or redirect chain.

refdomains_sourceinteger

(5 units) The number of unique referring domains linking to the referring page.

refdomains_source_domaininteger

(5 units) The number of unique referring domains linking to the referring domain.

refdomains_target_domaininteger

(5 units) The number of unique referring domains linking to the target domain.

root_name_sourcestring

The root domain name of the referring domain, not including subdomains.

root_name_targetstring

The root domain name of the target domain, not including subdomains.

snippet_leftstring

The snippet of text appearing just before the link.

snippet_rightstring

The snippet of text appearing just after the link.

source_page_authorstring or null

The author of the referring page.

source_page_publish_datestring or null

the date we identified the page was published

titlestring

The html title of the referring page.

tld_class_sourcestring

The top level domain class of the referring domain.

Allowed values:govedunormal
tld_class_targetstring

The top level domain class of the target domain.

Allowed values:govedunormal
trafficinteger

(10 units) The referring page's estimated monthly organic traffic from search.

traffic_domaininteger

(10 units) The referring domain's estimated monthly organic traffic from search.

url_fromstring

The URL of the page containing a link to your target.

url_from_plainstring

The referring page URL optimized for use as a filter.

url_rating_sourcenumber

The strength of the referring page's backlink profile compared to the others in our database on a 100-point scale.

url_redirectarray<string>

A redirect chain the target URL of the link points to.

url_redirect_with_targetarray<string>

The target URL of the link with its redirect chain.

url_tostring

The URL the backlink points to.

url_to_plainstring

The target page URL optimized for use as a filter.