ahrefs_rank - Ahrefs API

Ahrefs API v2 will stop working on March 1st, 2024

This documentation is for the legacy version of our API (v2), which has been discontinued. All active API v2 subscriptions will stop working on March 1st, 2024. Existing Integration apps will continue to work as before until further notice, but new submissions are no longer accepted.

To switch from API v2 to v3, please contact our Enterprise team. Read about API v3.

Documentation - ahrefs_rank

Contains the URLs and their rankings.


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

metrics

Column Type Where Having Description
url string + + Target of the request.
ahrefs_rank int + URL Rating of the target.

Examples



Request

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

Response

{
  "pages":[
    {
      "url":"https://ahrefs.com/",
      "ahrefs_rank":85
    },
    {
      "url":"http://ahrefs.com/",
      "ahrefs_rank":81
    },
    {
      "url":"http://ahrefs.com/api/toolbar_integration.php",
      "ahrefs_rank":12
    }
  ]
}