This endpoint will provide you with the keywords for which specified pages rank within the same Bing SERP.
Find keywords several webpages rank for:
If you would like to get the keywords several pages rank for, you need to specify webpages only in the pages object. This way, you will receive intersected ranked keywords for the specified URLs.
Find keywords your competitors rank for but you do not:
If you would like to receive all keywords several pages rank for, but particular pages do not, you need to use the exclude_pages array as well. This way you will receive the keywords for which the URLs from the pages object rank for, but the URLs from the exclude_pages array do not.
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/dataforseo_labs/bing/page_intersection/live"
--header "Authorization: Basic ${cred}"
--header "Content-Type: application/json"
--data-raw "[
{
"pages": {
"1": "https://dataforseo.com",
"2": "https://ahrefs.com/*"
},
"language_name": "English",
"location_code": 2840,
"limit": 3
}
]"
<?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(
"pages" => [
"1" => "https://dataforseo.com/*",
"2" => "https://ahrefs.com/*"
],
"language_name" => "English",
"location_code" => 2840
);
try {
// POST /v3/dataforseo_labs/bing/page_intersection/live
$result = $client->post('/v3/dataforseo_labs/bing/page_intersection/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;
?>
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(
pages={
"1":"https://dataforseo.com/*",
"2":"https://ahrefs.com/*"
},
location_name="United States",
language_name="English"
)
# POST /v3/dataforseo_labs/bing/page_intersection/live
response = client.post("/v3/dataforseo_labs/bing/page_intersection/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 dataforseo_labs_bing_page_intersection_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>();
Dictionary<string, string> pagesDictionary = new Dictionary<string, string>
{
{ "1", "https://dataforseo.com/*" },
{ "2", "https://ahrefs.com/*" }
};
postData.Add(new
{
pages = pagesDictionary,
location_name = "United States",
language_name = "English"
});
// POST /v3/dataforseo_labs/bing/page_intersection/live
// the full list of possible parameters is available in documentation
Console.WriteLine(JsonConvert.SerializeObject(postData));
Console.ReadKey();
var taskPostResponse = await httpClient.PostAsync("/v3/dataforseo_labs/bing/page_intersection/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:
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. The maximum number of requests that can be sent simultaneously is limited to 30.
You can specify the number of results you want to retrieve and sort them.
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 name
Type
Description
pages
object
target URLs of pages required field
you can set up to 20 pages in this object
the pages should be specified with absolute URLs (including http:// or https://)
example: "pages": {
"1":"https://www.apple.com/mac/*",
"2":"https://dataforseo.com/*",
"3":"https://support.microsoft.com/"
}if you specify a single page here, we will return results only for this page;
you can also use a wildcard (‘*’) character to specify the search pattern
example: "example.com"
search for the exact URL "example.com/eng/*"
search for the example.com page and all its related URLs which start with ‘/eng/’, such as “example.com/eng/index.html” and “example.com/eng/help/”, etc. note: a wilcard should be placed after the slash (‘/’) character in the end of the URL, it is not possible to place it after the domain in the following way: https://dataforseo.com*
use https://dataforseo.com/* instead
Note: this endpoint will not provide results if the number of intersecting keywords exceeds 10 million
exclude_pages
array
URLs of pages you want to exclude
optional field
you can set up to 10 pages in this array
if you use this array, results will contain the keywords for which URLs from the pages object rank, but URLs from exclude_pages array do not;
note that if you specify this field, the results will be based on the keywords any URL from pages ranks for regardless of intersections between them. However, you can set intersection_mode to intersect and results will contain the keywords all URLs from pages rank for in the same SERP and URLs from exclude_pages do not.
use a wildcard (‘*’) character to specify the search pattern
example: "exclude_pages": [
"https://www.apple.com/iphone/*",
"https://dataforseo.com/apis/*",
"https://www.microsoft.com/en-us/industry/services/"
]
location_name
string
full name of the location required field if you don’t specifylocation_code Note: it is required to specify either location_name or location_code
you can receive the list of available locations with their location_name by making a separate request to https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages; Note: this endpoint currently supports the US location only;
example: United States
location_code
integer
location code required field if you don’t specifylocation_name Note: it is required to specify either location_name or location_code
you can receive the list of available locations with their location_code by making a separate request to https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages; Note: this endpoint currently supports the US location only;
example: 2840
language_name
string
full name of the language required field if you don’t specifylanguage_code Note: it is required to specify either language_name or language_code
you can receive the list of available languages with their language_name by making a separate request to the https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages
example: English
language_code
string
language code required field if you don’t specifylanguage_name Note: it is required to specify either language_name or language_code
you can receive the list of available languages with their language_code by making a separate request to the https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages
example: en
item_types
array
search results type
indicates type of search results included in the response
optional field
ignore highly similar keywords
optional field
if set to true only core keywords will be returned, all highly similar keywords will be excluded;
default value: false
limit
integer
the maximum number of returned keywords
optional field
default value: 100
maximum value: 1000
offset
integer
offset in the items array of returned keywords
optional field
default value: 0
if you specify 10 here, the first ten keywords in the results array will be omitted and the data will be provided for the successive keywords
include_subdomains
boolean
indicates if the subdomains will be included in the search
optional field
if set to false, the subdomains will be ignored
default value: true
intersection_mode
string
indicates whether to intersect keywords
optional field
use this field to intersect or merge results for the specified URLs
possible values: union, intersect
union – results are based on all keywords any URL from pages rank for;
intersect – results are based on the keywords all URLs from pages rank for in the same SERP:
by default, results are based on the intersect mode if you specify only pages array. If you specify exclude_pages as well, results are based on the union mode
include_serp_info
boolean
include data from SERP for each keyword
optional field
if set to true, we will return a serp_info array containing SERP data (number of search results, relevant URL, and SERP features) for every keyword in the response
default value: false
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 conditions
the following operators are supported: regex, not_regex, <, <=, >, >=, =, <>, in, not_in, ilike, not_ilike, like, not_like
you can use the % operator with like and not_like, as well as ilike and not_ilike to match any string of zero or more characters note that if you want to filter by any field in the intersection_result array you need to specify the number of corresponding page
for instance, if you want to filter results by the ranking of the first specified URL, you should set the following filter: [intersection_result.1.rank_absolute,"=",1]
if you want to filter results and receive only organic listings for the third specified URL, you should set the following filter: [intersection_result.3.type,"=","organic"] , etc.example: ["keyword_data.keyword_info.search_volume","in",[100,1000]] [["intersection_result.1.etv",">",0],"and",["intersection_result.1.description","like","%goat%"]][["keyword_data.keyword_info.search_volume",">",100],
"and",
[["intersection_result.2.description","like","%goat%"],
"or",
["intersection_result.2.type","=","organic"]]]
for more information about filters, please refer to Dataforseo Labs – Filters or this help center guide
order_by
array
results sorting rules
optional field
you can use the same values as in the filters array to sort the results
possible sorting types: asc – results will be sorted in the ascending order desc – results will be sorted in the descending order
you should use a comma to set up a sorting parameter
example: ["keyword_data.keyword_info.competition,desc"]
default rule: ["keyword_data.keyword_info.search_volume,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: ["intersection_result.1.rank_group,asc","intersection_result.2.rank_absolute,asc"]
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
se_type
string
search engine type
search engine type specified in a POST request;
for this endpoint, the field equals bing
pages
object
URLs you specified a POST array
exclude_pages
array
URLs you specified in a POST array that will be excluded from the results
location_code
integer
location code in a POST array
language_code
string
language code in a POST array
total_count
integer
total amount of results in our database relevant to your request
items_count
integer
the number of results returned in the items array
items
array
contains keywords, relevant SERP elements and related data
se_type
string
search engine type
search engine type specified in a POST request;
for this endpoint, the field equals bing
keyword_data
object
keyword data for the returned keyword
se_type
string
search engine type
search engine type specified in a POST request;
for this endpoint, the field equals bing
keyword
string
returned keyword
location_code
integer
location code in a POST array
language_code
string
language code in a POST array
keyword_info
object
keyword data for the returned keyword
se_type
string
search engine type
search engine type specified in a POST request;
for this endpoint, the field equals bing
last_updated_time
string
date and time when keyword data was updated
in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”
example: 2019-11-15 12:57:46 +00:00
competition
float
competition
represents the relative amount of competition associated with the given keyword
this value is based on Bing Ads data and can be between 0 and 1 (inclusive)
cpc
float
cost-per-click
represents the average cost per click (USD) historically paid for the keyword
search_volume
integer
average monthly search volume rate
represents the (approximate) number of searches for the returned keyword on bing.com
monthly_searches
array
monthly searches
represents the (approximate) number of searches for this keyword (as available for the past twelve months), targeted to the specified geographic locations
year
integer
year
month
integer
month
search_volume
integer
monthly average search volume rate
keyword_properties
object
additional information about the keyword
se_type
string
search engine type
core_keyword
string
main keyword in a group
contains the main keyword in a group determined by the synonym clustering algorithm
if the value is null, our database does not contain any keywords the corresponding algorithm could identify as synonymous with keyword
synonym_clustering_algorithm
string
the algorithm used to identify synonyms
possible values: keyword_metrics – indicates the algorithm based on keyword_info parameters text_processing – indicates the text-based algorithm
if the value is null, our database does not contain any keywords the corresponding algorithm could identify as synonymous with keyword
keyword_difficulty
integer
difficulty of ranking in the first top-10 organic results for a keyword
indicates the chance of getting in top-10 organic results for a keyword on a logarithmic scale from 0 to 100;
calculated by analysing, among other parameters, link profiles of the first 10 pages in SERP;
learn more about the metric in this help center guide
detected_language
string
detected language of the keyword
indicates the language of the keyword as identified by our system
is_another_language
boolean
detected language of the keyword is different from the set language
if true, the language set in the request does not match the language determined by our system for a given keyword
serp_info
object
SERP data
the value will be null if you didn’t set the field include_serp_info to true in the POST array or if there is no SERP data for this keyword in our database
se_type
string
search engine type
search engine type specified in a POST request;
for this endpoint, the field equals bing
check_url
string
direct URL to search engine results
you can use it to make sure that we provided accurate results
serp_item_types
array
types of search results in SERP
contains types of search results (items) found in SERP
possible item types: answer_box, carousel, events, featured_snippet, hotels_pack, images, jobs, local_pack, map, organic, paid, people_also_ask, people_also_search,questions_and_answers, recipes, related_searches, shopping, top_stories, video; note that the actual results will be returned only for organic, paid, featured_snippet, and local_pack elements
se_results_count
string
number of search results for the returned keyword
last_updated_time
string
date and time when SERP data was updated
in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”
example: 2019-11-15 12:57:46 +00:00
previous_updated_time
string
previous to the most recent date and time when SERP data was updated
in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”
example: 2019-10-15 12:57:46 +00:00
avg_backlinks_info
object
backlink data for the returned keyword
this object provides the average number of backlinks, referring pages and domains, as well as the average rank values among the top-10 websites ranking organically for the keyword
se_type
string
search engine type
backlinks
float
average number of backlinks
dofollow
float
average number of dofollow links
referring_pages
float
average number of referring pages
referring_domains
float
average number of referring domains
referring_main_domains
float
average number of referring main domains
rank
float
average rank
learn more about the metric and its calculation formula in this help center article
main_domain_rank
float
average main domain rank
learn more about the metric and its calculation formula in this help center article
last_updated_time
string
date and time when backlink data was updated
in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”
example: 2019-11-15 12:57:46 +00:00
intersection_result
object
contains data on the SERP elements found for the returned keyword
data will be provided in separate arrays for each URL you specified in the pages object when setting a task;
depending on the number of specified URLs, it can contain from 1 to 20 arrays named respectively
1
object
contains data on the SERP element for the respective URL
field name varies in the range from 1 to 20 according to the number of URLs in the pages object;
possible types of SERP elements: organic, paid, featured_snippet, local_pack
‘organic’ element in SERP’
se_type
string
search engine type
search engine type specified in a POST request;
for this endpoint, the field equals bing
type
string
type of element = ‘organic’
rank_group
integer
position within a group of elements with identical type values
positions of elements with different type values are omitted from rank_group
rank_absolute
integer
absolute rank in SERP
absolute position among all the elements in SERP
position
string
the alignment of the element in SERP
can take the following values: left, right
indicates whether the element is a featured_snippet
is_malicious
boolean
indicates whether the element is marked as malicious
description
string
description of the results element in SERP
pre_snippet
string
includes additional information appended before the result description in SERP
extended_snippet
string
includes additional information appended after the result description in SERP
amp_version
boolean
Accelerated Mobile Pages
indicates whether an item has the Accelerated Mobile Page (AMP) version
rating
object
the item’s rating
the popularity rate based on reviews and displayed in SERP
rating_type
string
the type of rating
here you can find the following elements: Max5, Percents, CustomMax
value
integer
the value of the rating
votes_count
integer
the amount of feedback
rating_max
integer
the maximum value for a rating_type
highlighted
array
words highlighted in bold within the results description
links
array
sitelinks
the links shown below some of the search results
if there are none, equals null
type
string
type of element = ‘link_element‘
title
string
title of the result in SERP
description
string
description of the results element in SERP
url
string
sitelink URL
main_domain
string
primary domain name in SERP
relative_url
string
relative URL in SERP
etv
float
estimated traffic volume
estimated organic monthly traffic to the domain;
calculated as the product of CTR (click-through-rate) and search volume values of the returned keyword
learn more about how the metric is calculated in this help center article
estimated_paid_traffic_cost
float
estimated cost of converting organic search traffic into paid
represents the estimated monthly cost of running ads (USD) for the returned keyword;
the metric is calculated as the product of organic etv and paid cpc values and indicates the cost of driving the estimated volume of monthly organic traffic through PPC advertising in Bing Search
learn more about how the metric is calculated in this help center article
rank_changes
object
changes in rankings
contains information about the ranking changes of the SERP element since the previous_updated_time
previous_rank_absolute
integer
previous absolute rank in SERP
indicates previous rank of the element in Bing SERP;
if this element is new, the value will be null
is_new
boolean
element was previously present in SERP
if the value is true, previously collected SERP didn’t contain this element
is_up
boolean
rank of this element went up
if the value is true, position of the element in SERP is higher compared to the previous check
is_down
boolean
rank of this element went down
if the value is true, position of the element in SERP is lower compared to the previous check
‘paid’ element in SERP
se_type
string
search engine type
search engine type specified in a POST request;
for this endpoint, the field equals bing
type
string
type of element = ‘paid’
rank_group
integer
position within a group of elements with identical type values
positions of elements with different type values are omitted from rank_group
rank_absolute
integer
absolute rank in SERP
absolute position among all the elements in SERP
position
string
the alignment of the element in SERP
can take the following values: left, right
words highlighted in bold within the results description
extra
array
additional information about the result
ad_aclk
string
the identifier of the ad
description_rows
array
extended description
if there is none, equals null
links
array
sitelinks
the links shown below some of the search results
if there are none, equals null
type
string
type of element = ‘ad_link_element‘
title
string
title of the link element
description
string
description of the results element in SERP
url
string
URL link
ad_aclk
string
the identifier of the ad
main_domain
string
primary domain name in SERP
relative_url
string
relative URL in SERP
etv
float
estimated traffic volume
estimated organic monthly traffic to the domain;
calculated as the product of CTR (click-through-rate) and search volume values of the returned keyword
learn more about how the metric is calculated in this help center article
estimated_paid_traffic_cost
float
estimated cost of paid monthly search traffic
represents the estimated cost of paid monthly traffic (USD) based on etv and cpc values
learn more about how the metric is calculated in this help center article
rank_changes
object
changes in rankings
contains information about the ranking changes of the SERP element since the previous_updated_time
previous_rank_absolute
integer
previous absolute rank in SERP
indicates previous rank of the element in Bing SERP;
if this element is new, the value will be null
is_new
boolean
element was previously present in SERP
if the value is true, previously collected SERP didn’t contain this element
is_up
boolean
rank of this element went up
if the value is true, position of the element in SERP is higher compared to the previous check
is_down
boolean
rank of this element went down
if the value is true, position of the element in SERP is lower compared to the previous check
‘local_pack’ element in SERP
se_type
string
search engine type
search engine type specified in a POST request;
for this endpoint, the field equals bing
type
string
type of element = ‘local_pack’
rank_group
integer
position within a group of elements with identical type values
positions of elements with different type values are omitted from rank_group
rank_absolute
integer
absolute rank in SERP
absolute position among all the elements in SERP
position
string
the alignment of the element in SERP
can take the following values: left, right
the item’s rating
the popularity rate based on reviews and displayed in SERP
rating_type
string
the type of rating
here you can find the following elements: Max5, Percents, CustomMax
value
integer
the value of the rating
votes_count
integer
the amount of feedback
rating_max
integer
the maximum value for a rating_type
main_domain
string
primary domain name in SERP
relative_url
string
relative URL in SERP
etv
float
estimated traffic volume
estimated organic monthly traffic to the domain;
calculated as the product of CTR (click-through-rate) and search volume values of the returned keyword
learn more about how the metric is calculated in this help center article
estimated_paid_traffic_cost
float
estimated cost of converting organic search traffic into paid
represents the estimated monthly cost of running ads (USD) for the returned keyword;
the metric is calculated as the product of organic etv and paid cpc values and indicates the cost of driving the estimated volume of monthly organic traffic through PPC advertising in Bing Search
learn more about how the metric is calculated in this help center article
rank_changes
object
changes in rankings
contains information about the ranking changes of the SERP element since the previous_updated_time
previous_rank_absolute
integer
previous absolute rank in SERP
indicates previous rank of the element in Bing SERP;
if this element is new, the value will be null
is_new
boolean
element was previously present in SERP
if the value is true, previously collected SERP didn’t contain this element
is_up
boolean
rank of this element went up
if the value is true, position of the element in SERP is higher compared to the previous check
is_down
boolean
rank of this element went down
if the value is true, position of the element in SERP is lower compared to the previous check
‘featured_snippet’ element in SERP
se_type
string
search engine type
search engine type specified in a POST request;
for this endpoint, the field equals bing
type
string
type of element = ‘featured_snippet’
rank_group
integer
position within a group of elements with identical type values
positions of elements with different type values are omitted from rank_group
rank_absolute
integer
absolute rank in SERP
absolute position among all the elements in SERP
position
string
the alignment of the element in SERP
can take the following values: left, right
the content of the table
one line of the table in this element of the array
about_this_result
object
contains information from the ‘About this result’ panel
type
string
type of element = ‘about_this_result_element‘
url
string
result’s URL
source
string
source of additional information about the result
source_info
string
additional information about the result
description of the website from Wikipedia or another additional context
source_url
string
URL to full information from the source
language
string
the language of the result
location
string
location for which the result is relevant
search_terms
array
matching search terms that appear in the result
related_terms
array
related search terms that appear in the result
main_domain
string
primary domain name in SERP
relative_url
string
relative URL in SERP
etv
float
estimated traffic volume
estimated organic monthly traffic to the domain;
calculated as the product of CTR (click-through-rate) and search volume values of the returned keyword
learn more about how the metric is calculated in this help center article
estimated_paid_traffic_cost
float
estimated cost of converting organic search traffic into paid
represents the estimated monthly cost of running ads (USD) for the returned keyword;
the metric is calculated as the product of organic etv and paid cpc values and indicates the cost of driving the estimated volume of monthly organic traffic through PPC advertising in Bing Search
learn more about how the metric is calculated in this help center article
rank_changes
object
changes in rankings
contains information about the ranking changes of the SERP element since the previous_updated_time
previous_rank_absolute
integer
previous absolute rank in SERP
indicates previous rank of the element in Bing SERP;
if this element is new, the value will be null
is_new
boolean
element was previously present in SERP
if the value is true, previously collected SERP didn’t contain this element
is_up
boolean
rank of this element went up
if the value is true, position of the element in SERP is higher compared to the previous check
is_down
boolean
rank of this element went down
if the value is true, position of the element in SERP is lower compared to the previous check