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

Contains new and lost domains totals.

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

counts

Column Type Where Having Description
date date + + Date when the Ahrefs crawler was able to visit new or lost backlinks from the referring domain.
type string + − Indicates whether the backlinks from the referring domain are new or lost.
refdomain string + − Referring domain that contains at least one link to the target.
new int − + Total number of new referring domain.
lost int − + Total number of lost referring domain.
new_total int − + Total number of new referring domain when ignoring where filter.
lost_total int − + Total number of lost referring domain when ignoring where filter.

Examples



Request

https://apiv2.ahrefs.com?from=refdomains_new_lost_counters&target=ahrefs.com&mode=domain&limit=3&where=type%3A%22lost%22&having=date%3C%3D%222013-11-24%22&order_by=date%3Adesc&output=json

Response

{
  "counts":[
    {
      "date":"2013-11-24",
      "new":0,
      "lost":19,
      "new_total":28,
      "lost_total":19
    },
    {
      "date":"2013-11-23",
      "new":0,
      "lost":28,
      "new_total":28,
      "lost_total":28
    },
    {
      "date":"2013-11-22",
      "new":0,
      "lost":30,
      "new_total":36,
      "lost_total":30
    }
  ]
}