Documentation - linked_anchors

Contains the anchor text and the number of outgoing links that have it.

Each request to linked_anchors costs 1 row.
Each result costs 1 row.
Using 'offset' costs 5 rows.
Using 'where' costs 5 rows.
Using 'having' costs 5 rows.

anchors

Column Type Where Having Description
anchor string + + Anchor text used in at least one outgoing link from the target domain.
links_internal int + + Number of internal outgoing links found that are using the anchor text.
links_external int + + Number of external outgoing links found that are using the anchor text.
url_from string + URL of the page where the outgoing link is found.
url_to string + URL of the page the outgoing link is pointing to.
ahrefs_rank int + URL Rating of the referring page.
domain_rating int + Domain Rating of the referring domain.
ip string + IP address of the page.
page_size int + Size of the referring page, in bytes.
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.
sitewide boolean + Indicates whether the backlink appears in all pages of a single website, such as in a footer or header.
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.
text_pre string + Snippet before the anchor text.
text_post string + Snippet after the anchor text.

Examples



Request

http://apiv2.ahrefs.com?from=linked_anchors&target=ahrefs.com&mode=domain&limit=4&order_by=links_external%3Adesc&output=xml

Response

<?xml version="1.0" encoding="UTF-8"?>
<AhrefsApiResponse>
  <anchors>
    <anchor>
      <anchor>
        
      </anchor>
      <links_internal>
        426907
      </links_internal>
      <links_external>
        337056
      </links_external>
    </anchor>
    <anchor>
      <anchor>
        www.robotstxt.org
      </anchor>
      <links_internal>
        0
      </links_internal>
      <links_external>
        7915
      </links_external>
    </anchor>
    <anchor>
      <anchor>
        Tweets by @ahrefs
      </anchor>
      <links_internal>
        0
      </links_internal>
      <links_external>
        424
      </links_external>
    </anchor>
    <anchor>
      <anchor>
        linkedin
      </anchor>
      <links_internal>
        0
      </links_internal>
      <links_external>
        208
      </links_external>
    </anchor>
  </anchors>
</AhrefsApiResponse>