Phrase Match Keywords (keywords)
keywords — method uses a full-text search to find all keywords that match the queried term. For every keyword found you’ll see its volume, CPC, and level of competition.
Pagination
Following parameters can be used for pagination:
- page_size: number of results per page (default: 100, max: 1000);
page : page number (set to the 1st page by default).
You can use the following parameters to filter the results:
Parameter | Description | Possible settings |
queries_from | min number of monthly searches | 0-100,000,000 |
queries_to | max number of monthly searches | 0-100,000,000 |
cost_from | min CPC | 0-200 |
cost_to | max CPC | 0-200 |
concurrency_from | min level of competition | 1-100 |
concurrency_to | max level of competition | 1-100 |
minus_keywords | filtering by negative keywords (separated by commas) | string |
right_spelling | filtering by misspelled keywords |
not_contains - contains misspelled keywords; contains - does not contain misspelled keywords |
To sort the results apply the following parameters:
- sort: field that needs to be sorted;
- order: sorting order (
asc - ascending, desc - descending).
Metrics | Description |
result | Encapsulates the answer |
total | Number of keywords for which the domain ranks in top-100 |
keyword | Specified keyword |
cost | Cost per click, $ |
concurrency | Keyword competition in PPC (0-100) |
found_results | The number of results found for ""keyword"" |
region_queries_count | Search volume in selected search engine database |
region_queries_count_wide | Search volume (broad match) |
geo_names | List of toponyms in the array (if toponyms are present in the keywords) |
social_domains | Social domains (Facebook, Youtube,etc.) which rank for a keyword in top-10 |
right_spelling | Proposed correction for a keyword with a spelling error |
keyword_length | Number of words divided by space in a keyword |
lang | Language |
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 | Number of remaining API queries |
difficulty | Evaluation of the level of competition for a key phrase for promotion in the TOP-10. Gradation of difficulty is calculated from 0 to 100, where: 0-20 easy; 21-40 - medium; 41-60 - difficult; 61-100 - very difficult. |
Part of the API response, for which 1 credit is charged:
{
"region_queries_count": 2400,
"types": [
"related_search",
"also_asks",
"a_box_fsnippet"
],
"cost": 0.190875,
"social_domains": [],
"keyword_length": 2,
"concurrency": 26,
"geo_names": [],
"right_spelling": null,
"keyword": "example cv",
"found_results": 571000000,
"lang": "en"
}
{
"result": {
"total": 10736,
"hits": [
{
"region_queries_count": 2400,
"types": [
"related_search",
"also_asks",
"a_box_fsnippet"
],
"cost": 0.190875,
"social_domains": [],
"keyword_length": 2,
"concurrency": 26,
"geo_names": [],
"right_spelling": null,
"keyword": "example cv",
"found_results": 571000000,
"lang": "en"
},
{
"region_queries_count": 12400,
"types": [
"related_search",
"also_asks",
"a_box_fsnippet"
],
"cost": 0.32,
"social_domains": [],
"keyword_length": 2,
"concurrency": 16,
"geo_names": [],
"right_spelling": null,
"keyword": "example xls",
"found_results": 200000000,
"lang": "en"
}
]
},
"status_msg": "OK",
"status_code": 200,
"left_lines": 344488
}
<?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',
];
$keywords = 'keywords';
// 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\KeywordsMethod(
$keywords,
\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 = 'keywords'
params = {
'query': 'buy%20laptop', # 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)