anchors_refdomains - 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 - anchors_refdomains

Contains connection between anchors and domains. Can be used to get all referring domains with specified anchor.

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

refdomains

Column Type Where Having Description
anchor string + − Anchor text used in at least one backlink from the referring domain.
anchors int − + Number of different anchor texts that are used in backlinks to the target on the referring domain.
backlinks int + + Number of external backlinks found that are using the anchor text.
refdomain string + + Referring domain that contains at least one backlink using the anchor text.

Examples



Request

https://apiv2.ahrefs.com?from=anchors_refdomains&target=ahrefs.com&mode=domain&limit=3&order_by=anchors%3Adesc&output=json

Response

{
  "refdomains": [
    {
      "anchors":26676,
      "backlinks":66570,
      "refdomain":"domainoom.com"
    },
    {
      "anchors":240,
      "backlinks":450,
      "refdomain":"tntu.edu.ua"
    },
    {
      "anchors":189,
      "backlinks":298,
      "refdomain":"blackhatworld.com"
    }
  ]
}