Top by keyword
The SerpstatKeywordProcedure.getKeywordTop method shows you Google's top-100 search results for the analyzed keyword. The data set is similar to the Top by keyword report in Keyword research.
General request parameters and instructions for using Serpstat API
Search databases available
Request parameters | |||||
Parameter | Description | Type | Optional | Default value | Value Options |
id | A request id: the response contains the same id. Enter any number (number) or text (string) value | int/string | no | 1, test | |
method | API method name | string | no | SerpstatKeywordProcedure.getKeywordTop | |
params | The object with parameters {...}, it lists all the following parameters and arrays [...] | array | no |
| |
keyword | Keyword to search for | string | no | iphone | |
se | ID of the search base to be searched. | string | no | g_us | |
filters | Filter conditions | int | yes | {"top_size": 100} | "top_size": 100 "position": 1 "url": https://www.apple.com/iphone/ "exact_url": https://www.apple.com/iphone-13-pro/ "domain": www.apple.com "minus_domain": www.blackberry.com "subdomain": developer.apple.com |
Response parameters | |
Parameter | Description |
id | Response id corresponds the request id |
result | Contains the answer |
data | Array with data |
top | Contains the result |
position | Domain's position for a keyword |
url | |
domain | Domain which ranks for the keyword |
subdomain | Subdomain which ranks for the keyword |
types | List of special elements shown in SERP (for example, video, carousel or map) |
ads | Number of found Ads (if there are ads in the results) |
results | Number of results |
summary_info | Object with data |
page | Page number |
left_lines | API credits remaining |
Credits: the number of charged credits corresponds to the number of results obtained upon request. You can get no more than 60000 results per a query. Part of the API response, for which 1 credit is charged:
{
"position": 1,
"url": "https://www.apple.com/iphone/",
"domain": "apple.com",
"subdomain": "www.apple.com",
"types": [
"shopping_top",
"kn_graph_carousel_list",
"also_asks",
"snip_breadcrumbs"
]
},
{
"id": "1",
"method": "SerpstatKeywordProcedure.getKeywordTop",
"params": {
"keyword": "iphone",
"se": "g_us",
"filters": {"top_size": "10"}
}
}
{
"id": "1",
"result": {
"data": {
"top": [
{
"position": 1,
"url": "https://www.apple.com/iphone/",
"domain": "apple.com",
"subdomain": "www.apple.com",
"types": [
"shopping_top",
"kn_graph_carousel_list",
"also_asks",
"snip_breadcrumbs"
]
},
{
"position": 2,
"url": "https://www.apple.com/",
"domain": "apple.com",
"subdomain": "www.apple.com",
"types": [
"shopping_top",
"kn_graph_carousel_list",
"also_asks",
"snip_breadcrumbs"
]
}
],
"ads": [],
"types": [
"shopping_top",
"kn_graph_carousel_list",
"also_asks"
],
"results": 79
},
"summary_info": {
"page": 1,
"left_lines": 998661
}
}
}