Backlinks History


This endpoint will provide you with historical backlinks data back to the beginning of 2019. You can receive the number of backlinks a given domain had in a specific time period, the number of new & lost backlinks, referring domains, and more.

Historical data is available from 2019-01-01.

checked POST
Pricing

Your account will be charged for each request.
The cost can be calculated on the Pricing page.

All POST data should be sent in the JSON format (UTF-8 encoding). The task setting is done using the POST method. When setting a task, you should send all task parameters in the task array of the generic POST array. You can send up to 2000 API calls per minute, each Live API call can contain only one task. The maximum number of calls that can be sent simultaneously is limited to 30.

You can specify the time range, and we will provide historical backlink data within the set period.

Below you will find a detailed description of the fields you can use for setting a task.

Description of the fields for setting a task:

Field nameTypeDescription
targetstring

domain
required field
a domain should be specified without https:// and www.

date_fromstring

starting date of the time range
optional field
minimum value 2019-01-01
if you don't specify this field, the minimum value will be used by default
date format: "yyyy-mm-dd"
example:
"2019-01-15"

date_tostring

ending date of the time range
optional field
if you don't specify this field, the today's date will be used by default
date format: "yyyy-mm-dd"
example:
"2019-01-15"

rank_scalestring

defines the scale used for calculating and displaying the rank, domain_from_rank, and page_from_rank values
optional field

you can use this parameter to choose whether rank values are presented on a 0–100 or 0–1000 scale

possible values:
one_hundred — rank values are displayed on a 0–100 scale
one_thousand — rank values are displayed on a 0–1000 scale

default value: one_thousand

learn more about how this parameter works and how ranking metrics are calculated in this Help Center article

tagstring

user-defined task identifier
optional field
the character limit is 255
you can use this parameter to identify the task and match it with the result
you will find the specified tag value in the data object of the response

As a response of the API server, you will receive JSON-encoded data containing a tasks array with the information specific to the set tasks.

Description of the fields in the results array:

Field nameTypeDescription
versionstring

the current version of the API

status_codeinteger

general status code
you can find the full list of the response codes here
Note: we strongly recommend designing a necessary system for handling related exceptional or error conditions

status_messagestring

general informational message
you can find the full list of general informational messages here

timestring

execution time, seconds

costfloat

total tasks cost, USD

tasks_countinteger

the number of tasks in the tasks array

tasks_errorinteger

the number of tasks in the tasks array returned with an error

tasksarray

array of tasks

    idstring

task identifier
unique task identifier in our system in the UUID format

    status_codeinteger

status code of the task
generated by DataForSEO; can be within the following range: 10000-60000
you can find the full list of the response codes here

    status_messagestring

informational message of the task
you can find the full list of general informational messages here

    timestring

execution time, seconds

    costfloat

cost of the task, USD

    result_countinteger

number of elements in the result array

    patharray

URL path

    dataobject

contains the same parameters that you specified in the POST request

    resultarray

array of results

        targetstring

target from the POST array

        date_fromstring

starting date of the time range
in the UTC format: “yyyy-mm-dd”
example:
2019-01-01

        date_tostring

ending date of the time range
in the UTC format: "yyyy-mm-dd"
example:
"2019-01-15"

        items_countinteger

the number of results returned in the items array

        itemsarray

contains historical backlink data for the specified domain
the data is provided month-by-month;
the metrics are aggregated according to the backlinks the specified domain had on the first day of each given month

            typestring

type of element='backlinks_history'n

            datestring

date and time when the data for the target was stored
in the UTC format: "yyyy-mm-dd hh-mm-ss +00:00"
example:
2019-11-15 12:57:46 +00:00

            rankinteger

domain rank on the given date
learn more about the metric and how it is calculated in this help center article

            backlinksinteger

number of backlinks

            new_backlinksinteger

number of new backlinks for the target
data is provided based in a comparison with the previous period
Note: this data is available from May 2021;
if the date range specified in the POST request precedes May 2021, the field will equal 0

            lost_backlinksinteger

number of lost backlinks for the target
data is provided based in a comparison with the previous period
Note: this data is available from May 2021;
if the date range specified in the POST request precedes May 2021, the field will equal 0

            new_referring_domainsinteger

number of new referring domains for the target
data is provided based in a comparison with the previous period
Note: this data is available from May 2021;
if the date range specified in the POST request precedes May 2021, the field will equal 0

            lost_referring_domainsinteger

number of lost referring domains for the target
data is provided based in a comparison with the previous period
Note: this data is available from May 2021;
if the date range specified in the POST request precedes May 2021, the field will equal 0

            crawled_pagesinteger

number of crawled pages for the target

            infoobject

information about the target

                serverstring

server

                cmsstring

content management system

                platform_typearray

platform type

                ip_addressstring

IP address of the target

                countrystring

country code that the target domain is determined to belong to

                is_ipboolean

indicates if the target is IP
if true, the domain, subdomain or webpage functions as an IP address and does not have a domain name

                target_spam_scoreinteger

spam score of the target
if the target is a domain/subdomain, this fields indicates the average spam score of all pages of that domain/subdomain;
learn more about how the metric is calculated on this help center page

            internal_links_countinteger

number of internal links
calculated as the sum of internal links on the pages of the specified target

            external_links_countinteger

number of external links on the page
calculated as the sum of external links on the pages of the specified target

            broken_backlinksinteger

number of broken backlinks
number of broken backlinks pointing to the target

            broken_pagesinteger

number of broken pages
number of pages that receive backlinks but respond with 4xx or 5xx status codes

            referring_domainsinteger

number of referring domains
referring domains include subdomains that are counted as separate domains for this metric

            referring_domains_nofollowinteger

number of domains pointing at least one nofollow link to the target

            referring_main_domainsinteger

number of referring main domains

            referring_main_domains_nofollowinteger

number of main domains pointing at least one nofollow link to the target

            referring_ipsinteger

number of referring IP addresses
number of IP addresses pointing to this page

            referring_subnetsinteger

number of referring subnetworks

            referring_pagesinteger

number of pages pointing to the target

            referring_links_tldobject

top-level domains of the referring links
contains top-level domains and referring link count per each

            referring_links_typesobject

types of referring links
indicates the types of the referring links and link count per each type
possible values:
anchor, image, link, meta, canonical, alternate, redirect

            referring_links_attributesobject

link attributes of the referring links
indicates link attributes of the referring links and link count per each attribute

            referring_links_platform_typesobject

types of referring platforms
indicates referring platform types and and link count per each platform

possible values: cms, blogs, ecommerce, message-boards, wikis, news, organization

            referring_links_semantic_locationsobject

semantic locations of the referring links
indicates semantic elements in HTML where the referring links are located and link count per each semantic location
you can get the full list of semantic elements here
examples:
article, section, summary

            referring_links_countriesobject

ISO country codes of the referring links
indicates ISO country codes of the domains where the referring links are located and the link count per each country

            referring_pages_nofollowinteger

number of referring pages pointing at least one nofollow link to the target

‌‌

Instead of ‘login’ and ‘password’ use your credentials from https://app.dataforseo.com/api-access

# Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-access 
login="login" 
password="password" 
cred="$(printf ${login}:${password} | base64)" 
curl --location --request POST "https://api.dataforseo.com/v3/backlinks/history/live" 
--header "Authorization: Basic ${cred}"  
--header "Content-Type: application/json" 
--data-raw '[
    {
    	"target": "cnn.com",
    	"date_from": "2020-01-01",
    	"date_to": "2021-01-01"
    }
]'
<?php
// You can download this file from here https://cdn.dataforseo.com/v3/examples/php/php_RestClient.zip
require('RestClient.php');
$api_url = 'https://api.dataforseo.com/';
// Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-access
$client = new RestClient($api_url, null, 'login', 'password');
$post_array = array();
// simple way to set a task
$post_array[] = array(
   "target" => "cnn.com",
   "date_from" => "2020-01-01",
   "date_to" => "2021-01-01"
);
try {
   // POST /v3/backlinks/history/live
   $result = $client->post('/v3/backlinks/history/live', $post_array);
   print_r($result);
   // do something with post result
} catch (RestClientException $e) {
   echo "n";
   print "HTTP code: {$e->getHttpCode()}n";
   print "Error code: {$e->getCode()}n";
   print "Message: {$e->getMessage()}n";
   print  $e->getTraceAsString();
   echo "n";
}
$client = null;
?>
const post_array = [];

post_array.push({
   "target" => "cnn.com",
   "date_from" => "2020-01-01",
   "date_to" => "2021-01-01"
});

const axios = require('axios');

axios({
  method: 'post',
  url: 'https://api.dataforseo.com/v3/backlinks/history/live',
  auth: {
    username: 'login',
    password: 'password'
  },
  data: post_array,
  headers: {
    'content-type': 'application/json'
  }
}).then(function (response) {
  var result = response['data']['tasks'];
  // Result data
  console.log(result);
}).catch(function (error) {
  console.log(error);
});
from client import RestClient
# You can download this file from here https://cdn.dataforseo.com/v3/examples/python/python_Client.zip
client = RestClient("login", "password")
post_data = dict()
# simple way to set a task
post_data[len(post_data)] = dict(
    target="cnn.com",
    date_from="2020-01-01",
    date_to="2021-01-01"
)
# POST /v3/backlinks/history/live
response = client.post("/v3/backlinks/history/live", post_data)
# you can find the full list of the response codes here https://docs.dataforseo.com/v3/appendix/errors
if response["status_code"] == 20000:
    print(response)
    # do something with result
else:
    print("error. Code: %d Message: %s" % (response["status_code"], response["status_message"]))
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace DataForSeoDemos
{
    public static partial class Demos
    {
        public static async Task backlinks_history_live()
        {
            var httpClient = new HttpClient
            {
                BaseAddress = new Uri("https://api.dataforseo.com/"),
                // Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-access
                DefaultRequestHeaders = { Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes("login:password"))) }
            };
            var postData = new List<object>();
            postData.Add(new
            {
                target = "dataforseo.com",
                date_from = "2020-01-01",
                date_to = "2021-01-01"
            });
            // POST /v3/backlinks/history/live
            // the full list of possible parameters is available in documentation
            var taskPostResponse = await httpClient.PostAsync("/v3/backlinks/history/live", new StringContent(JsonConvert.SerializeObject(postData)));
            var result = JsonConvert.DeserializeObject<dynamic>(await taskPostResponse.Content.ReadAsStringAsync());
            // you can find the full list of the response codes here https://docs.dataforseo.com/v3/appendix/errors
            if (result.status_code == 20000)
            {
                // do something with result
                Console.WriteLine(result);
            }
            else
                Console.WriteLine($"error. Code: {result.status_code} Message: {result.status_message}");
        }
    }
}

The above command returns JSON structured like this:

{
  "version": "0.1.20230825",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.1571 sec.",
  "cost": 0.02012,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "09291750-1535-0266-0000-7aab5e588023",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.0662 sec.",
      "cost": 0.02012,
      "result_count": 1,
      "path": [
        "v3",
        "backlinks",
        "history",
        "live"
      ],
      "data": {
        "api": "backlinks",
        "function": "history",
        "target": "ibm.com",
        "date_from": "2020-08-01",
        "date_to": "2021-01-01"
      },
      "result": [
        {
          "target": "ibm.com",
          "date_from": "2020-08-01",
          "date_to": "2021-01-01",
          "items_count": 4,
          "items": [
            {
              "type": "backlinks_history",
              "date": "2020-08-31 00:00:00 +00:00",
              "rank": 598,
              "backlinks": 7960551,
              "new_backlinks": 528250,
              "lost_backlinks": 243962,
              "new_referring_domains": 3439,
              "lost_referring_domains": 860,
              "crawled_pages": 2317216,
              "info": {
                "server": null,
                "cms": null,
                "platform_type": null,
                "ip_address": "104.109.76.210",
                "country": null,
                "is_ip": false,
                "target_spam_score": 0
              },
              "internal_links_count": 48310894,
              "external_links_count": 7036559,
              "broken_backlinks": 0,
              "broken_pages": 150008,
              "referring_domains": 191515,
              "referring_domains_nofollow": 4489,
              "referring_main_domains": 146676,
              "referring_main_domains_nofollow": 3438,
              "referring_ips": 95885,
              "referring_subnets": 54931,
              "referring_pages": 7265491,
              "referring_links_tld": {
                "com": 3581003,
                "org": 883349,
                "tv": 868565,
                "edu": 595793,
                "net": 347933,
                "ru": 115490,
                "io": 113234,
                "de": 61048,
                "com.br": 55193,
                "fr": 34685
              },
              "referring_links_types": {
                "anchor": 7206570,
                "redirect": 57359,
                "canonical": 1545,
                "alternate": 17
              },
              "referring_links_attributes": {
                "nofollow": 973850,
                "noopener": 753384,
                "noreferrer": 144929,
                "external": 82838,
                "ugc": 6768,
                "bookmark": 1519,
                "alternate": 668,
                "author": 474,
                "tag": 350,
                "sponsored": 110
              },
              "referring_links_platform_types": {
                "unknown": 6418758,
                "cms": 696561,
                "blogs": 631531,
                "wikis": 38885,
                "ecommerce": 18248,
                "message-boards": 15656
              },
              "referring_links_semantic_locations": {
                "": 3687993,
                "footer": 1779772,
                "section": 997508,
                "article": 426672,
                "aside": 114124,
                "header": 111368,
                "nav": 103593,
                "main": 38299,
                "figure": 4910,
                "figcaption": 889
              },
              "referring_links_countries": null,
              "referring_pages_nofollow": 33339
            },
            {
              "type": "backlinks_history",
              "date": "2020-09-30 00:00:00 +00:00",
              "rank": 600,
              "backlinks": 8231030,
              "new_backlinks": 407125,
              "lost_backlinks": 155261,
              "new_referring_domains": 4555,
              "lost_referring_domains": 751,
              "crawled_pages": 2390151,
              "info": {
                "server": "ustream/web",
                "cms": null,
                "platform_type": [
                  "unknown"
                ],
                "ip_address": "104.109.76.210",
                "country": null,
                "is_ip": false,
                "target_spam_score": 0
              },
              "internal_links_count": 48306246,
              "external_links_count": 6814735,
              "broken_backlinks": 0,
              "broken_pages": 153405,
              "referring_domains": 196837,
              "referring_domains_nofollow": 4730,
              "referring_main_domains": 150753,
              "referring_main_domains_nofollow": 3635,
              "referring_ips": 98439,
              "referring_subnets": 55945,
              "referring_pages": 7523423,
              "referring_links_tld": {
                "com": 3649487,
                "org": 1011765,
                "tv": 867263,
                "edu": 597002,
                "net": 355506,
                "ru": 138864,
                "io": 115358,
                "de": 68799,
                "com.br": 57495,
                "fr": 34360
              },
              "referring_links_types": {
                "anchor": 7462829,
                "redirect": 58950,
                "canonical": 1626,
                "alternate": 18
              },
              "referring_links_attributes": {
                "nofollow": 971813,
                "noopener": 748692,
                "noreferrer": 154975,
                "external": 85418,
                "ugc": 7674,
                "bookmark": 2439,
                "alternate": 676,
                "author": 415,
                "tag": 356,
                "sponsored": 116
              },
              "referring_links_platform_types": {
                "unknown": 6630888,
                "cms": 737977,
                "blogs": 673558,
                "wikis": 39589,
                "ecommerce": 19351,
                "message-boards": 16027
              },
              "referring_links_semantic_locations": {
                "": 3761537,
                "footer": 1935941,
                "section": 986991,
                "article": 445547,
                "header": 120263,
                "aside": 116787,
                "nav": 108846,
                "main": 40953,
                "figure": 5269,
                "figcaption": 929
              },
              "referring_links_countries": null,
              "referring_pages_nofollow": 36250
            },
            {
              "type": "backlinks_history",
              "date": "2020-10-31 00:00:00 +00:00",
              "rank": 602,
              "backlinks": 8561190,
              "new_backlinks": 455524,
              "lost_backlinks": 156158,
              "new_referring_domains": 4580,
              "lost_referring_domains": 388,
              "crawled_pages": 2485792,
              "info": {
                "server": null,
                "cms": null,
                "platform_type": [
                  "unknown"
                ],
                "ip_address": "104.109.76.210",
                "country": null,
                "is_ip": false,
                "target_spam_score": 0
              },
              "internal_links_count": 49573669,
              "external_links_count": 6900594,
              "broken_backlinks": 0,
              "broken_pages": 157439,
              "referring_domains": 203646,
              "referring_domains_nofollow": 4969,
              "referring_main_domains": 155524,
              "referring_main_domains_nofollow": 3812,
              "referring_ips": 101117,
              "referring_subnets": 57034,
              "referring_pages": 7831950,
              "referring_links_tld": {
                "com": 3718284,
                "org": 1170115,
                "tv": 867765,
                "edu": 598029,
                "net": 366456,
                "ru": 167229,
                "io": 118880,
                "de": 72381,
                "com.br": 65144,
                "it": 35100
              },
              "referring_links_types": {
                "anchor": 7770042,
                "redirect": 60217,
                "canonical": 1672,
                "alternate": 19
              },
              "referring_links_attributes": {
                "nofollow": 970935,
                "noopener": 745230,
                "noreferrer": 167836,
                "external": 88874,
                "ugc": 8085,
                "bookmark": 2462,
                "alternate": 687,
                "author": 398,
                "tag": 362,
                "sponsored": 124
              },
              "referring_links_platform_types": {
                "unknown": 6897418,
                "cms": 776539,
                "blogs": 710442,
                "wikis": 40448,
                "ecommerce": 22248,
                "message-boards": 16470
              },
              "referring_links_semantic_locations": {
                "": 3845675,
                "footer": 2146663,
                "section": 974315,
                "article": 463646,
                "header": 124594,
                "aside": 118868,
                "nav": 107545,
                "main": 43866,
                "figure": 5432,
                "figcaption": 988
              },
              "referring_links_countries": null,
              "referring_pages_nofollow": 46312
            },
            {
              "type": "backlinks_history",
              "date": "2020-12-31 00:00:00 +00:00",
              "rank": 603,
              "backlinks": 8900727,
              "new_backlinks": 185603,
              "lost_backlinks": 68434,
              "new_referring_domains": 1466,
              "lost_referring_domains": 153,
              "crawled_pages": 2610252,
              "info": {
                "server": null,
                "cms": null,
                "platform_type": [
                  "unknown"
                ],
                "ip_address": "104.109.76.210",
                "country": null,
                "is_ip": false,
                "target_spam_score": 0
              },
              "internal_links_count": 52322051,
              "external_links_count": 7251238,
              "broken_backlinks": 0,
              "broken_pages": 162728,
              "referring_domains": 209218,
              "referring_domains_nofollow": 5153,
              "referring_main_domains": 159477,
              "referring_main_domains_nofollow": 3954,
              "referring_ips": 103145,
              "referring_subnets": 57852,
              "referring_pages": 8156763,
              "referring_links_tld": {
                "com": 3766489,
                "org": 1352682,
                "tv": 868091,
                "edu": 598769,
                "net": 376591,
                "ru": 206205,
                "io": 127906,
                "de": 76675,
                "com.br": 71597,
                "it": 37572
              },
              "referring_links_types": {
                "anchor": 8093750,
                "redirect": 61248,
                "canonical": 1745,
                "alternate": 20
              },
              "referring_links_attributes": {
                "nofollow": 970410,
                "noopener": 736981,
                "noreferrer": 175502,
                "external": 91788,
                "ugc": 8854,
                "bookmark": 2472,
                "alternate": 659,
                "author": 401,
                "tag": 366,
                "sponsored": 133
              },
              "referring_links_platform_types": {
                "unknown": 7201817,
                "cms": 793888,
                "blogs": 726552,
                "wikis": 41098,
                "ecommerce": 24428,
                "message-boards": 16765
              },
              "referring_links_semantic_locations": {
                "": 3939792,
                "footer": 2366930,
                "section": 963461,
                "article": 477386,
                "header": 131548,
                "aside": 121288,
                "nav": 102878,
                "main": 46563,
                "figure": 5535,
                "figcaption": 1020
              },
              "referring_links_countries": null,
              "referring_pages_nofollow": 13800
            }
          ]
        }
      ]
    }
  ]
}