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

Contains the referring domains that contain backlinks to the target.

Each request to 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
url string + − Target of the request.
ip string + − IP address of the referring domain that links to the target.
refdomain string + + The referring domain that contains at least one link to the target.
backlinks int + + Number of backlinks found in the referring domain that link to the target.
refpages int + + Number of referring pages found in the referring domain that link to the target.
first_seen date + + Least recent date when the Ahrefs crawler was able to visit the backlinks in the referring domain.
last_visited date + + Most recent date when the Ahrefs crawler was able to visit the backlinks in the referring domain.
domain_rating int − + Domain Rating of the referring domain.

stats

Column Type Where Having Description
refdomains int − − Total number of referring domains that contain at least one link to the target.
ips int − − Total number of IP addresses that link to the target.
class_c int − − Total number of referring class C networks that link to the target.

Examples



Request

https://apiv2.ahrefs.com?from=refdomains&target=ahrefs.com&mode=domain&limit=3&output=json

Response

{
  "refdomains":[
    {
      "refdomain":"001baidu.com",
      "backlinks":1,
      "refpages":1,
      "first_seen":"2013-08-08T23:04:54Z",
      "last_visited":"2013-11-07T11:10:04Z",
      "domain_rating":431
    },
    {
      "refdomain":"0411soft.net",
      "backlinks":1,
      "refpages":1,
      "first_seen":"2013-08-09T06:38:13Z",
      "last_visited":"2013-08-09T06:38:13Z",
      "domain_rating":41
    },
    {
      "refdomain":"0769pxw.com",
      "backlinks":1,
      "refpages":1,
      "first_seen":"2013-08-08T18:57:12Z",
      "last_visited":"2013-11-07T11:10:04Z",
      "domain_rating":47
    }
  ],
  "stats":{
    "refdomains":6238,
    "ips":4558,
    "class_c":3335
  }
}