This function provides the number of ranking keywords for each Google search results page for the specified domain. For example, if the domain ranks with 600 keywords on page 1, it means 600 keywords are ranked between positions 1 and 10; for page 2, it would cover positions 11-20. Historical data can be retrieved via the date parameter, while the history parameter returns past values, with the last 10 values displayed if no limit is set. The percent parameter allows results in percentages instead of absolute numbers. By using the mobile parameter, desktop data can be accessed, and the country parameter specifies the geographic focus.
Result
The result contains an array representing the ranking distribution for the requested date(s). Each entry includes the date (date) corresponding to the distribution and the number of ranking keywords for each of the first 10 result pages (page1, page2, etc.).GET-Parameters
Parameters (Mandatory)
api_key
STRING
Your personal API key. This key is used to authenticate your requests. You can obtain it here.
address_object
STRING
Defines the domain, host, path, or URL to which the method is applied, depending on the key value provided.
Parameters (Optional)
country
STRING / countrycode
Defines the country for which the method will be executed. You can find a list of available country codes here. If no Country parameter is provided, the default country associated with the Toolbox account will be used.
history
BOOLEAN
If set to true, the function returns historical ranking distributions. If history is set to TRUE and no limit is specified, the last 10 historical values are returned.
mobile
BOOLEAN
Defines whether mobile or desktop data should be returned. By default, this parameter is set to TRUE, meaning mobile data will be returned. If set to FALSE, only desktop data will be returned.
percent
BOOLEAN
If percent is set to true, the function returns the ranking distribution as percentage values. By default, the ranking distribution is provided in absolute numbers.
date
DATE
Specifies the date for which the historical ranking distribution is to be retrieved. If a date is provided, the function returns the ranking distribution for that week. If no date is specified, the function returns current values.
format
STRING
Specifies whether the response will be returned in XML or JSON format. By default, the result will be in XML format.
To be able to use the API documentation with real data, you have to create an API key in your account.
EXAMPLE
$baseUrl = "https://api.sistrix.com/domain.ranking.distribution";
$post = [
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $baseUrl);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
curl_close($curl);
import requests
baseUrl = 'https://api.sistrix.com/domain.ranking.distribution'
post = {
}
response = requests.post(baseUrl, post)
data = response.text
curl https://api.sistrix.com/domain.ranking.distribution \
let baseUrl = 'https://api.sistrix.com/domain.ranking.distribution';
let form = new FormData();
fetch(baseUrl, {
method: 'POST',
body: form
}).then(function(response){
return response.text();
}).then(function(data){
//data contains the results of the request
})