Domain Pages
This endpoint will provide you with a detailed overview of domain pages with backlink data for each page.
This endpoint will provide you with a detailed overview of domain pages with backlink data for each page.
Instead of ‘login’ and ‘password’ use your credentials from https://app.dataforseo.com/api-dashboard
<?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-dashboard $client = new RestClient($api_url, null, 'login', 'password'); $post_array = array(); // simple way to get a result $post_array[] = array( "target" => "forbes.com", "filters" => [ ["page_summary.backlinks", ">", 5], "and", ["page", "like", "%sites%"] ], "limit" => 5 ); try { // POST /v3/backlinks/domain_pages/live // the full list of possible parameters is available in documentation $result = $client->post('/v3/backlinks/domain_pages/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": "2.5415 sec.", "cost": 0.02015, "tasks_count": 1, "tasks_error": 0, "tasks": [ { "id": "09291851-1535-0270-0000-1c4a85cd651c", "status_code": 20000, "status_message": "Ok.", "time": "2.4869 sec.", "cost": 0.02015, "result_count": 1, "path": [ "v3", "backlinks", "domain_pages", "live" ], "data": { "api": "backlinks", "function": "domain_pages", "target": "forbes.com", "limit": 5, "filters": [ [ "page_summary.backlinks", ">", 5 ], "and", [ "page", "like", "%sites%" ] ] }, "result": [ { "target": "forbes.com", "total_count": 350709, "items_count": 5, "items": [ { "type": "backlinks_domain_page", "main_domain": "forbes.com", "domain": "www.forbes.com", "tld": "com", "page": "https://www.forbes.com/sites/jaysondemers/2015/02/19/the-importance-of-social-validation-in-online-marketing/", "ip": "151.101.1.55", "first_visited": "2019-01-23 03:14:43 +00:00", "prev_visited": "2023-06-16 20:18:54 +00:00", "fetch_time": "2023-08-24 17:46:19 +00:00", "status_code": 200, "location": null, "size": 454271, "encoded_size": 82297, "content_encoding": "gzip", "media_type": "text/html", "server": "rhino-core-shield", "meta": { "title": "The Importance Of Social Validation In Online Marketing", "canonical": null, "internal_links_count": 13, "external_links_count": 6, "images_count": 1, "words_count": 1239, "page_spam_score": 0, "social_media_tags": { "og:title": "The Importance Of Social Validation In Online Marketing", "og:site_name": "Forbes", "og:type": "article", "og:url": "https://www.forbes.com/sites/jaysondemers/2015/02/19/the-importance-of-social-validation-in-online-marketing/", "image": "https://imageio.forbes.com/blogs-images/jaysondemers/files/2014/10/ranch_penguins4.jpg?format=jpg&width=1200", "og:description": "Online marketing comprises many factors, strategies, and tactics, but all of them share a common end goal: to get more people to buy your products or services. To get there, you have to step past the competition, increase the traffic to your site, and build better relationships with your customers. [...]", "og:updated_time": "2015-07-01T13:13:34.591-04:00", "fb:app_id": "123694841080850", "twitter:card": "summary_large_image", "twitter:site": "@forbes", "twitter:creator": "@jaysondemers", "twitter:title": "The Importance Of Social Validation In Online Marketing", "twitter:description": "Online marketing comprises many factors, strategies, and tactics, but all of them share a common end goal: to get more people to buy your products or services. To get there, you have to step past the competition, increase the traffic to your site, and build better relationships with your customers. [...]", "twitter:image": "https://imageio.forbes.com/blogs-images/jaysondemers/files/2014/10/ranch_penguins4.jpg?format=jpg&width=1200" }, "h1": [ "The Importance Of Social Validation In Online Marketing" ], "h2": null, "h3": [ "More From Forbes" ], "images_alt": [ "Jayson DeMers" ], "powered_by": null, "language": "en", "charset": "utf-8", "platform_type": [ "news" ], "technologies": null }, "page_summary": { "first_seen": "2019-01-23 03:14:43 +00:00", "lost_date": null, "rank": 429, "backlinks": 128, "backlinks_spam_score": 10, "broken_backlinks": 0, "broken_pages": 0, "referring_domains": 11, "referring_domains_nofollow": 3, "referring_main_domains": 11, "referring_main_domains_nofollow": 3, "referring_ips": 11, "referring_subnets": 11, "referring_pages": 128, "referring_links_tld": { "com": 112, "com.ua": 16 }, "referring_links_types": { "anchor": 128 }, "referring_links_attributes": { "noopener": 64, "nofollow": 32, "noreferrer": 16 }, "referring_links_platform_types": { "cms": 96, "blogs": 80, "organization": 48, "message-boards": 16, "news": 16, "unknown": 16 }, "referring_links_semantic_locations": { "article": 80, "section": 32, "": 16 }, "referring_links_countries": { "": 80, "MM": 16, "UA": 16, "US": 16 }, "referring_pages_nofollow": 3 } }, { "type": "backlinks_domain_page", "main_domain": "forbes.com", "domain": "www.forbes.com", "tld": "com", "page": "http://www.forbes.com/sites/ryanmac/2015/10/14/buildzoom-raises-10-6-million-from-formation-8-y-combinator-to-focus-on-high-end-home-improvements/", "ip": "151.101.1.55", "first_visited": "2019-03-23 10:50:51 +00:00", "prev_visited": "2023-06-30 14:57:07 +00:00", "fetch_time": "2023-08-29 20:53:48 +00:00", "status_code": 301, "location": "https://www.forbes.com/sites/ryanmac/2015/10/14/buildzoom-raises-10-6-million-from-formation-8-y-combinator-to-focus-on-high-end-home-improvements/", "size": 0, "encoded_size": 0, "content_encoding": null, "media_type": null, "server": "Varnish", "meta": { "title": null, "canonical": null, "internal_links_count": 0, "external_links_count": 0, "images_count": 0, "words_count": 0, "page_spam_score": 0, "social_media_tags": null, "h1": null, "h2": null, "h3": null, "images_alt": null, "powered_by": null, "language": null, "charset": null, "platform_type": null, "technologies": null }, "page_summary": { "first_seen": "2019-03-23 10:50:51 +00:00", "lost_date": null, "rank": 407, "backlinks": 910240, "backlinks_spam_score": 0, "broken_backlinks": 0, "broken_pages": 0, "referring_domains": 3, "referring_domains_nofollow": 0, "referring_main_domains": 3, "referring_main_domains_nofollow": 0, "referring_ips": 4, "referring_subnets": 4, "referring_pages": 910240, "referring_links_tld": { "com": 910240 }, "referring_links_types": { "anchor": 910240 }, "referring_links_attributes": null, "referring_links_platform_types": { "unknown": 522896, "organization": 360400, "message-boards": 26944 }, "referring_links_semantic_locations": { "": 910240 }, "referring_links_countries": { "US": 910128, "": 112 }, "referring_pages_nofollow": 8 } }, { "type": "backlinks_domain_page", "main_domain": "forbes.com", "domain": "www.forbes.com", "tld": "com", "page": "https://www.forbes.com/sites/emmawoollacott/2021/12/29/cryptomining-malware-found-in-spider-man-no-way-home-torrents/amp/", "ip": "151.101.1.55", "first_visited": "2022-01-17 17:34:00 +00:00", "prev_visited": "2023-02-13 20:18:46 +00:00", "fetch_time": "2023-05-01 10:29:05 +00:00", "status_code": 200, "location": null, "size": 236313, "encoded_size": 39458, "content_encoding": "gzip", "media_type": "text/html", "server": "rhino-core-shield", "meta": { "title": "Cryptomining Malware Found In Spider-Man: No Way Home Torrents", "canonical": "https://www.forbes.com/sites/emmawoollacott/2021/12/29/cryptomining-malware-found-in-spider-man-no-way-home-torrents/", "internal_links_count": 0, "external_links_count": 0, "images_count": 0, "words_count": 0, "page_spam_score": 0, "social_media_tags": { "og:title": "Cryptomining Malware Found In Spider-Man: No Way Home Torrents", "og:site_name": "Forbes", "og:type": "article", "og:url": "https://www.forbes.com/sites/emmawoollacott/2021/12/29/cryptomining-malware-found-in-spider-man-no-way-home-torrents/", "image": "https://imageio.forbes.com/specials-images/imageserve/61cc55975f4b84c12b90a845/0x0.jpg?format=jpg&width=1200", "og:description": "Security firm ReasonLabs is warning movie fans that pirated copies of Spider-Man: No Way Home contain cryptomining malware.", "og:updated_time": "2022-04-21T08:14:07.948-04:00", "fb:app_id": "123694841080850", "twitter:card": "summary_large_image", "twitter:site": "@forbes", "twitter:creator": "@EmmaWoollacott", "twitter:title": "Cryptomining Malware Found In Spider-Man: No Way Home Torrents", "twitter:description": "Security firm ReasonLabs is warning movie fans that pirated copies of Spider-Man: No Way Home contain cryptomining malware.", "twitter:image": "https://imageio.forbes.com/specials-images/imageserve/61cc55975f4b84c12b90a845/0x0.jpg?format=jpg&width=1200" }, "h1": null, "h2": null, "h3": null, "images_alt": null, "powered_by": null, "language": "en", "charset": "utf-8", "platform_type": null, "technologies": null }, "page_summary": { "first_seen": "2022-01-17 17:34:00 +00:00", "lost_date": null, "rank": 406, "backlinks": 16, "backlinks_spam_score": 0, "broken_backlinks": 0, "broken_pages": 0, "referring_domains": 1, "referring_domains_nofollow": 0, "referring_main_domains": 1, "referring_main_domains_nofollow": 0, "referring_ips": 1, "referring_subnets": 1, "referring_pages": 16, "referring_links_tld": { "com": 16 }, "referring_links_types": { "anchor": 16 }, "referring_links_attributes": null, "referring_links_platform_types": { "unknown": 16 }, "referring_links_semantic_locations": { "main": 16 }, "referring_links_countries": { "": 16 }, "referring_pages_nofollow": 1 } }, { "type": "backlinks_domain_page", "main_domain": "forbes.com", "domain": "www.forbes.com", "tld": "com", "page": "https://www.forbes.com/sites/gregautry/2020/03/25/building-the-social-news-network-to-end-fake-news/?sh=248b16e557ae", "ip": "151.101.1.55", "first_visited": "2021-07-19 15:21:23 +00:00", "prev_visited": "2023-05-01 08:44:16 +00:00", "fetch_time": "2023-06-30 10:49:58 +00:00", "status_code": 200, "location": null, "size": 538659, "encoded_size": 89668, "content_encoding": "gzip", "media_type": "text/html", "server": "rhino-core-shield", "meta": { "title": "Building The Social News Network To End Fake News", "canonical": "https://www.forbes.com/sites/gregautry/2020/03/25/building-the-social-news-network-to-end-fake-news/", "internal_links_count": 0, "external_links_count": 0, "images_count": 0, "words_count": 0, "page_spam_score": 0, "social_media_tags": { "og:title": "Building The Social News Network To End Fake News", "og:site_name": "Forbes", "og:type": "article", "og:url": "https://www.forbes.com/sites/gregautry/2020/03/25/building-the-social-news-network-to-end-fake-news/", "image": "https://imageio.forbes.com/specials-images/imageserve/5e7acc72d8e1ae0007b7702e/0x0.jpg?format=jpg&width=1200", "og:description": "Overlooked, created by young entrepreneur George Sehremelis, brings curated news with bias detection to your web browser and phone.", "og:updated_time": "2020-03-25T00:47:57.043-04:00", "fb:app_id": "123694841080850", "twitter:card": "summary_large_image", "twitter:site": "@forbes", "twitter:creator": "@@GregWAutry", "twitter:title": "Building The Social News Network To End Fake News", "twitter:description": "Overlooked, created by young entrepreneur George Sehremelis, brings curated news with bias detection to your web browser and phone.", "twitter:image": "https://imageio.forbes.com/specials-images/imageserve/5e7acc72d8e1ae0007b7702e/0x0.jpg?format=jpg&width=1200" }, "h1": null, "h2": null, "h3": null, "images_alt": null, "powered_by": null, "language": "en", "charset": "utf-8", "platform_type": null, "technologies": null }, "page_summary": { "first_seen": "2021-07-19 15:21:23 +00:00", "lost_date": null, "rank": 390, "backlinks": 16, "backlinks_spam_score": 25, "broken_backlinks": 0, "broken_pages": 0, "referring_domains": 1, "referring_domains_nofollow": 0, "referring_main_domains": 1, "referring_main_domains_nofollow": 0, "referring_ips": 1, "referring_subnets": 1, "referring_pages": 16, "referring_links_tld": { "com": 16 }, "referring_links_types": { "image": 16 }, "referring_links_attributes": { "noopener": 16, "noreferrer": 16 }, "referring_links_platform_types": { "unknown": 16 }, "referring_links_semantic_locations": { "": 16 }, "referring_links_countries": { "": 16 }, "referring_pages_nofollow": 6 } }, { "type": "backlinks_domain_page", "main_domain": "forbes.com", "domain": "www.forbes.com", "tld": "com", "page": "http://www.forbes.com/sites/lorikozlowski/2012/07/13/a-startup-for-smarter-and-more-voters/", "ip": "151.101.1.55", "first_visited": "2021-07-19 15:32:32 +00:00", "prev_visited": "2023-06-15 13:43:10 +00:00", "fetch_time": "2023-08-23 17:53:32 +00:00", "status_code": 301, "location": "https://www.forbes.com/sites/lorikozlowski/2012/07/13/a-startup-for-smarter-and-more-voters/", "size": 0, "encoded_size": 0, "content_encoding": null, "media_type": null, "server": "Varnish", "meta": { "title": null, "canonical": null, "internal_links_count": 0, "external_links_count": 0, "images_count": 0, "words_count": 0, "page_spam_score": 0, "social_media_tags": null, "h1": null, "h2": null, "h3": null, "images_alt": null, "powered_by": null, "language": null, "charset": null, "platform_type": null, "technologies": null }, "page_summary": { "first_seen": "2021-07-19 15:32:32 +00:00", "lost_date": null, "rank": 383, "backlinks": 1392, "backlinks_spam_score": 0, "broken_backlinks": 0, "broken_pages": 0, "referring_domains": 62, "referring_domains_nofollow": 1, "referring_main_domains": 3, "referring_main_domains_nofollow": 1, "referring_ips": 8, "referring_subnets": 8, "referring_pages": 1392, "referring_links_tld": { "com": 1392 }, "referring_links_types": { "anchor": 1392 }, "referring_links_attributes": { "nofollow": 16 }, "referring_links_platform_types": { "unknown": 1392 }, "referring_links_semantic_locations": { "": 1392 }, "referring_links_countries": { "": 1296, "GB": 48, "US": 48 }, "referring_pages_nofollow": 16 } } ] } ] } ] }
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 or subdomain required field a domain or a subdomain should be specified without https:// and www. example: forbes.com
|
limit |
integer | the maximum number of returned pages optional field default value: 100 maximum value: 1000 |
offset |
integer | offset in the results array of returned pages optional field default value: 0 if you specify the 10 value, the first ten pages 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; 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: ["meta.internal_links_count",">","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: ["page_summary.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: ["page_summary.backlinks,desc","page_summary.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 |
exclude_internal_backlinks |
boolean | indicates if internal backlinks from subdomains to the target will be excluded from the resultsoptional field if set to true , the results will not include data on internal backlinks from subdomains of the same domain as target if set to false , internal links will be included in the resultsdefault 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_domain_page’ |
main_domain |
string | main website domain main website domain does not include subdomains |
domain |
string | domain domain where the page was found |
tld |
string | top-level domain top-level domain in the DNS root zone |
page |
string | page URL relevant page URL |
ip |
string | Internet Protocol address |
first_visited |
string | date and time of the first page visit date and time when our crawler visited this page for the first time in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00” example: 2017-01-24 13:20:59 +00:00 |
prev_visited |
string | previous to the most recent date when our crawler visited the page in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00” example: 2017-01-24 13:20:59 +00:00 |
fetch_time |
string | most recent date and time when our crawler visited the page in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00” example: 2017-01-24 13:20:59 +00:00 |
status code |
integer | HTTP status code of the page |
location |
string | location header indicates the URL to redirect a page to if exists |
size |
integer | indicates the page size, in bytes |
encoded_size |
integer | page size after encoding indicates the size of the encoded page, in bytes |
content_encoding |
string | type of encoding |
media_type |
string | types of media used to display a page |
server |
string | server version |
meta |
object | page meta data |
title |
string | page title |
canonical |
string | canonical page |
internal_links_count |
integer | number of internal links on the page |
external_links_count |
integer | number of external links on the page |
images_count |
integer | number of images on the page |
words_count |
integer | number of words on the page |
page_spam_score |
integer | spam score of the page learn more about how the metric is calculated on this help center page |
social_media_tags |
object | array of social media tags found on the page contains social media tags and their content supported tags include but are not limited to Open Graph and Twitter card |
h1 |
array | h1 tag content of h1 tags
|
h2 |
array | h2 tag content of h2 tags
|
h3 |
array | h3 tag content of h3 tags
|
images_alt |
array | content of alt tags
|
powered_by |
array | CMS details |
language |
string | page content language example: en
|
charset |
string | character encoding examples: utf-8
|
platform_type |
array | type of a platform |
technologies |
object | website technologies |
cms |
string | content management system |
blogs |
string | blog management system |
web-servers |
string | web server software |
page_summary |
object | contains backlink data for this page |
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 for this page 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 |
rank |
integer | page rank rank of the page 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 |
backlinks_spam_score |
integer | average spam score of the backlinks pointing to the page learn more about how the metric is calculated on this help center page |
broken_backlinks |
integer | number of broken backlinks number of broken backlinks pointing to the page
|
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_nofollow |
integer | number of domains pointing at least one nofollow link to the page
|
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 page |
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 page
|
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 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 page |