Top by keyword (deprecated)

The SerpstatKeywordProcedure.getKeywordTop method shows you Google's top-100 search results for the analyzed keyword. 

This request is deprecated. Please use a valid Top by keyword API request following this link.

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
"position_from": 2
"position_to": 10

"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

Page that ranks for the keyword

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"
        ]
},

Example
Request data:
{
 "id": "1",
 "method": "SerpstatKeywordProcedure.getKeywordTop",
 "params": {
   "keyword": "iphone",
   "se": "g_us",
   "filters": {"top_size": "10"}
 }
}
Response data:
{
    "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
        }
    }
}

Share this article with your friends

Are you sure?

Introducing Serpstat

Find out about the main features of the service in a convenient way for you!

Please send a request, and our specialist will offer you education options: a personal demonstration, a trial period, or materials for self-study and increasing expertise — everything for a comfortable start to work with Serpstat.

Name

Email

Phone

We are glad of your comment
I agree to Serpstat`s Privacy Policy.

Thank you, we have saved your new mailing settings.

Open support chat