anchors_refdomains - Ahrefs API

Ahrefs API v2 has been deprecated

This documentation is for the legacy version of our API (v2), which was fully discontinued on November 1, 2025. All remaining API v2 integrations and apps built on it no longer have access to Ahrefs data.

To build new integrations, please use Ahrefs API v3 and the Ahrefs Connect program.

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"
    }
  ]
}