Referring Networks
This endpoint will provide you with a detailed overview of referring IPs and subnets pointing to the target
you specify.
This endpoint will provide you with a detailed overview of referring IPs and subnets pointing to the target
you specify.
Instead of ‘login’ and ‘password’ use your credentials from https://app.dataforseo.com/api-access
<?php // You can download this file from here https://cdn.dataforseo.com/v3/examples/php/php_RestClient.zip?202197 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 get a result $post_array[] = array( "target" => "backlinko.com", "network_address_type" => "subnet", "exclude_internal_backlinks" => true, "backlinks_filters" => ["dofollow", "=", true], "filters" => ["backlinks", ">", 100], "order_by" => ["rank,desc"], "limit" => 5 ); try { // POST /v3/backlinks/referring_networks/live // the full list of possible parameters is available in documentation $result = $client->post('/v3/backlinks/referring_networks/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; ?>
The above command returns JSON structured like this:
{ "version": "0.1.20230825", "status_code": 20000, "status_message": "Ok.", "time": "0.6976 sec.", "cost": 0.02015, "tasks_count": 1, "tasks_error": 0, "tasks": [ { "id": "09291846-1535-0332-0000-28283e6d8fe5", "status_code": 20000, "status_message": "Ok.", "time": "0.6615 sec.", "cost": 0.02015, "result_count": 1, "path": [ "v3", "backlinks", "referring_networks", "live" ], "data": { "api": "backlinks", "function": "referring_networks", "target": "backlinko.com", "network_address_type": "subnet", "limit": 5, "order_by": [ "rank,desc" ], "exclude_internal_backlinks": true, "backlinks_filters": [ "dofollow", "=", true ], "filters": [ "backlinks", ">", 100 ] }, "result": [ { "target": "backlinko.com", "total_count": 303, "items_count": 5, "items": [ { "type": "backlinks_referring_network", "network_address": "172.67.162.*", "rank": 334, "backlinks": 114, "first_seen": "2019-02-19 19:57:35 +00:00", "lost_date": null, "broken_backlinks": 0, "broken_pages": 0, "referring_domains": 33, "referring_domains_nofollow": 0, "referring_main_domains": 33, "referring_main_domains_nofollow": 0, "referring_ips": 28, "referring_subnets": 1, "referring_pages": 110, "referring_links_tld": { "com": 57, "org": 19, "xyz": 17, "co.uk": 5, "pa": 3, "ro": 3, "net": 2, "agency": 1, "co.za": 1, "cz": 1 }, "referring_links_types": { "anchor": 91, "image": 19 }, "referring_links_attributes": { "noopener": 50, "noreferrer": 40, "external": 1 }, "referring_links_platform_types": { "organization": 61, "cms": 47, "blogs": 43, "unknown": 20, "ecommerce": 19, "news": 6 }, "referring_links_semantic_locations": { "": 42, "article": 39, "section": 25, "main": 3, "figure": 1 }, "referring_links_countries": { "": 84, "US": 9, "GB": 5, "PA": 3, "RO": 3, "WW": 2, "CZ": 1, "IN": 1, "UA": 1, "ZA": 1 }, "referring_pages_nofollow": 0 }, { "type": "backlinks_referring_network", "network_address": "188.114.96.*", "rank": 331, "backlinks": 122, "first_seen": "2019-02-16 12:14:28 +00:00", "lost_date": null, "broken_backlinks": 0, "broken_pages": 0, "referring_domains": 78, "referring_domains_nofollow": 0, "referring_main_domains": 78, "referring_main_domains_nofollow": 0, "referring_ips": 3, "referring_subnets": 1, "referring_pages": 117, "referring_links_tld": { "com": 74, "net": 7, "org": 6, "io": 5, "com.sg": 3, "co": 2, "com.au": 2, "com.ua": 2, "info": 2, "us": 2 }, "referring_links_types": { "anchor": 115, "image": 2 }, "referring_links_attributes": { "noopener": 73, "noreferrer": 34, "external": 3 }, "referring_links_platform_types": { "cms": 76, "blogs": 74, "organization": 74, "unknown": 8, "news": 5, "message-boards": 2 }, "referring_links_semantic_locations": { "article": 64, "section": 24, "": 21, "main": 6, "aside": 1, "figcaption": 1 }, "referring_links_countries": { "": 38, "US": 36, "WW": 12, "IO": 5, "UA": 4, "IN": 3, "PK": 3, "SG": 3, "AU": 2, "CO": 2 }, "referring_pages_nofollow": 0 }, { "type": "backlinks_referring_network", "network_address": "199.60.103.*", "rank": 321, "backlinks": 2677, "first_seen": "2019-01-16 00:26:19 +00:00", "lost_date": null, "broken_backlinks": 5, "broken_pages": 3, "referring_domains": 821, "referring_domains_nofollow": 0, "referring_main_domains": 790, "referring_main_domains_nofollow": 0, "referring_ips": 48, "referring_subnets": 1, "referring_pages": 2414, "referring_links_tld": { "com": 1748, "io": 112, "co.uk": 77, "co": 67, "net": 44, "com.au": 39, "de": 37, "agency": 23, "ca": 20, "org": 19 }, "referring_links_types": { "anchor": 2412, "image": 2 }, "referring_links_attributes": { "noopener": 1453, "noreferrer": 125 }, "referring_links_platform_types": { "organization": 1098, "unknown": 970, "blogs": 309, "news": 133, "message-boards": 11, "cms": 1 }, "referring_links_semantic_locations": { "": 976, "article": 627, "main": 544, "section": 264, "figcaption": 3 }, "referring_links_countries": { "": 798, "US": 584, "WW": 411, "IO": 112, "GB": 91, "CO": 67, "DE": 48, "AU": 40, "BR": 25, "CA": 25 }, "referring_pages_nofollow": 0 }, { "type": "backlinks_referring_network", "network_address": "184.154.120.*", "rank": 302, "backlinks": 9869, "first_seen": "2021-09-27 04:58:08 +00:00", "lost_date": null, "broken_backlinks": 0, "broken_pages": 0, "referring_domains": 4, "referring_domains_nofollow": 0, "referring_main_domains": 2, "referring_main_domains_nofollow": 0, "referring_ips": 2, "referring_subnets": 1, "referring_pages": 9869, "referring_links_tld": { "net": 9864, "com": 5 }, "referring_links_types": { "anchor": 9869 }, "referring_links_attributes": null, "referring_links_platform_types": { "cms": 9868, "blogs": 9866, "ecommerce": 9840, "organization": 4, "unknown": 1 }, "referring_links_semantic_locations": { "": 9864, "section": 3, "article": 2 }, "referring_links_countries": { "": 6397, "US": 3472 }, "referring_pages_nofollow": 0 }, { "type": "backlinks_referring_network", "network_address": "34.120.45.*", "rank": 299, "backlinks": 238, "first_seen": "2019-09-17 05:41:24 +00:00", "lost_date": null, "broken_backlinks": 0, "broken_pages": 0, "referring_domains": 7, "referring_domains_nofollow": 0, "referring_main_domains": 1, "referring_main_domains_nofollow": 0, "referring_ips": 1, "referring_subnets": 1, "referring_pages": 204, "referring_links_tld": { "com": 204 }, "referring_links_types": { "anchor": 201, "image": 3 }, "referring_links_attributes": { "noopener": 1, "noreferrer": 1 }, "referring_links_platform_types": { "organization": 204, "blogs": 1, "news": 1 }, "referring_links_semantic_locations": { "article": 197, "figcaption": 3, "figure": 3, "main": 1 }, "referring_links_countries": { "US": 62, "ES": 60, "DE": 39, "IT": 14, "FR": 13, "PT": 12, "": 4 }, "referring_pages_nofollow": 0 } ] } ] } ] }
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.
Description of the fields for setting a task:
Field name | Type | Description |
---|---|---|
target |
string | domain, subdomain or webpage to get referring networks for required field a domain or a subdomain should be specified without https:// and www. a page should be specified with absolute URL (including http:// or https:// ) |
network_address_type |
string | indicates the type of network to get data for optional field possible values: ip , subnet default value: ip |
limit |
integer | the maximum number of returned networks optional field default value: 100 maximum value: 1000 |
offset |
integer | offset in the results array of returned networks optional field default value: 0 if you specify the 10 value, the first ten domains in the results array will be omitted and the data will be provided for the successive pages |
internal_list_limit |
integer | maximum number of elements within internal arrays optional field you can use this field to limit the number of elements within the following arrays: referring_links_tld referring_links_types referring_links_attributes referring_links_platform_types referring_links_semantic_locations
default value: |
backlinks_status_type |
string | set what backlinks to return and count optional field you can use this field to choose what backlinks will be returned and used for aggregated metrics for your target ;possible values: all – all backlinks will be returned and counted;live – backlinks found during the last check will be returned and counted;lost – lost backlinks will be returned and counted;
default value: |
filters |
array | array of results filtering parameters optional field you can add several filters at once (8 filters maximum) you should set a logical operator and , or between the conditionsthe following operators are supported: regex , not_regex , = , <> , in , not_in , like , not_like , ilike , not_ilike you can use the % operator with like and not_like to match any string of zero or more charactersexample: ["referring_pages",">","1"]
The full list of possible filters is available here. |
order_by |
array | results sorting rules optional field you can use the same values as in the filters array to sort the resultspossible sorting types: asc – results will be sorted in the ascending orderdesc – results will be sorted in the descending orderyou should use a comma to set up a sorting type example: ["backlinks,desc"] note that you can set no more than three sorting rules in a single request you should use a comma to separate several sorting rules example: ["backlinks,desc","rank,asc"] |
backlinks_filters |
array | filter the backlinks of your target optional field you can use this field to filter the initial backlinks that will be included in the dataset for aggregated metrics for your target you can filter the backlinks by all fields available in the response of this endpoint using this parameter, you can include only dofollow backlinks in the response and create a flexible backlinks dataset to calculate the metrics for example: "backlinks_filters": [["dofollow", "=", true]]
|
include_subdomains |
boolean | indicates if the subdomains of the target will be included in the searchoptional field if set to false , the subdomains will be ignoreddefault value: true |
include_indirect_links |
boolean | indicates if indirect links to the target will be included in the resultsoptional field if set to true , the results will include data on indirect links pointing to a page that either redirects to the target, or points to a canonical pageif set to false , indirect links will be ignoreddefault value: true |
exclude_internal_backlinks |
boolean | indicates whether the backlinks from subdomains of the target are excludedoptional field if set to false , the backlinks from subdomains of the target will be ommited and you won’t receive the same domain in the response;default value: true |
tag |
string | 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 name | Type | Description |
---|---|---|
version |
string | the current version of the API |
status_code |
integer | 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_message |
string | general informational message you can find the full list of general informational messages here |
time |
string | execution time, seconds |
cost |
float | total tasks cost, USD |
tasks_count |
integer | the number of tasks in the tasks array |
tasks_error |
integer | the number of tasks in the tasks array returned with an error |
tasks |
array | array of tasks |
id |
string | task identifier unique task identifier in our system in the UUID format |
status_code |
integer | 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_message |
string | informational message of the task you can find the full list of general informational messages here |
time |
string | execution time, seconds |
cost |
float | cost of the task, USD |
result_count |
integer | number of elements in the result array |
path |
array | URL path |
data |
object | contains the same parameters that you specified in the POST request |
result |
array | array of results |
target |
string | target in a POST array
|
total_count |
integer | total number of relevant items in the database |
items_count |
integer | number of items in the items array
|
items |
array | items array |
type |
string | type of element = ‘backlinks_referring_network’ |
network_address |
string | address of the referring subnetwork or IP |
rank |
integer | network rank rank volume that a referring network passes to the target rank is calculated based on the method for node ranking in a linked database – a principle used in the original Google PageRank algorithmlearn more about the metric and how it is calculated in this help center article |
backlinks |
integer | indicates the number of backlinks pointing to the target
|
first_seen |
string | date and time when our crawler found the backlink for the first time in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00” example: 2019-11-15 12:57:46 +00:00 |
lost_date |
string | date and time when the last backlink from this domain was lost indicates the date and time when our crawler visited the page and it responded with 4xx or 5xx status code or the last backlink was removed in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00” example: 2017-01-24 13:20:59 +00:00 |
broken_backlinks |
integer | number of broken backlinks number of broken backlinks pointing to the domain |
broken_pages |
integer | number of broken pages number of pages that respond with 4xx or 5xx status codes where backlinks are pointing to |
referring_domains |
integer | indicates the number of referring domains referring domains include subdomains that are counted as separate domains for this metric |
referring_domains_nofollow |
integer | number of domains pointing at least one nofollow link to the target
|
referring_main_domains |
integer | indicates the number of referring main domains |
referring_main_domains_nofollow |
integer | number of main domains pointing at least one nofollow link to the target |
referring ips |
integer | number of referring IP addresses number of IP addresses pointing to this page |
referring subnets |
integer | number of referring subnetworks |
referring_pages |
integer | indicates the number of pages pointing to the target specified
|
referring_links_tld |
object | top-level domains of the referring links contains top level domains and referring link count per each |
referring_links_types |
object | 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_attributes |
object | link attributes of the referring links indicates link attributes of the referring links and link count per each attribute |
referring_links_platform_types |
object | types of referring platforms indicates referring platform types and and link count per each platform |
referring_links_semantic_locations |
object | semantic locations of the referring links indicates semantic elements in HTML where the referring links are located and the link count per each semantic location you can get the full list of semantic elements here |
referring_links_countries |
object | 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_nofollow |
integer | number of referring pages pointing at least one nofollow link to the target |