Domain Summary (domain_info)
domain_info — method provides the number of keywords for which the domain is ranked in SEO and PPC, shows its visibility, traffic and other metrics.
Metrics | Description |
result | Encapsulates the answer |
visible | Site visibility |
keywords | The number of keywords found in the chosen search engine |
traff |
Estimate traffic based on keyword positions and search volume
|
visible_dynamic | Change in visibility since the last update |
keywords_dynamic | Change in the number of keywords since the last update |
traff_dynamic | Traffic change over the last n-time (in comparison with ""prev_date"") |
date | Current visibility, keywords, and traffic verification date |
prev_date | Previous verification date |
new_keywords | The number of acquired keywords for the domain since the last update |
out_keywords | Number of keywords lost by the domain since the last update |
rised_keywords | Number of domain's keywords which positions have improved since the last update |
down_keywords | Number of domain's keywords which positions have dropped since the last update |
ad_keywords | Number of keywords in PPC |
ads | Number of the PPC ads |
ads_dynamic | History of changes in PPC Ads |
status_msg | Response "Ok" or "Error" report on a successful or unsuccessful request |
status_code | Response code "200" — successful request. Errors occur when limits are exceeded (number of simultaneous requests or account limits) |
left_lines | API limits remaining |
We charge 1 API limit per query.
{
"result": {
"domain": "example.com",
"visible": 0.08514,
"keywords": 613,
"traff": 1327,
"visible_dynamic": -0.01727,
"keywords_dynamic": -6,
"traff_dynamic": -162,
"ads_dynamic": -2,
"date": "2019-09-22",
"new_keywords": 41,
"out_keywords": 47,
"rised_keywords": 16,
"down_keywords": 13,
"ad_keywords": 78,
"ads": 50,
"prev_date": "2019-09-07"
},
"status_msg": "OK",
"status_code": 200,
"left_lines": 344932
}
<?php
// This example works on serpstat-sdk only
// https://github.com/SerpstatGlobal/serpstat-sdk
require_once __DIR__ . '/../vendor/autoload.php';
// configure your application
$config = [
'token' => '19666fc1ae1724da1d5ea2f3a99d5f5a',
];
$domain = 'example.com';
// init client with your serpstat api token
$apiClient = new \Serpstat\Sdk\Core\ApiGuzzleHttpClient($config['token']);
// create instance of any api method class
// list of methods classes in folder src\Methods
$apiMethod = new \Serpstat\Sdk\Methods\DomainInfoMethod(
$domain,
\Serpstat\Sdk\Interfaces\IApiClient::SE_GOOGLE_RU
);
try {
// try call api method
$response = $apiClient->call($apiMethod);
} catch (\Exception $e) {
// catch api error
$response = $e->getMessage();
}
import codecs
import json
import pprint
import urllib.request as urlrequest
from urllib.parse import urlencode
host = 'http://api.serpstat.com/v3'
method = 'domain_info'
params = {
'query': 'example.com', # string for get info
'se': 'g_us', # string search engine
'token': 'ijmiom4f5m34905g03um8342dm04923lre3w', # string personal token
}
api_url = "{host}/{method}?{params}".format(
host=host,
method=method,
params=urlencode(params)
)
try:
json_data = urlrequest.urlopen(api_url).read()
except Exception as e0:
print("API request error: {error}".format(error=e0))
data = json.loads(json_data)
pprint.pprint(data)