Get access to 30+ marketing and SEO tools. analyze competitors, keywords, and backlinks for free..
Sign in Sign Up

We use cookies to make Serpstat better. By clicking "Accept cookies", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Learn more

Obtaining the search results history in region by keywords (getKeywordsSerpResultsHistory)

The getKeywordsSerpResultsHistory method returns Google's top-100 search results and Yandex's top-50 search results for the required region and project keywords.

General request parameters and instructions for using Serpstat API

Request parameters
Parameter Value Description
id required any number or string Request ID
method required RtApiSerpResultsProcedure.getKeywordsSerpResultsHistory API method name
params required {...} Object with parameters
projectId required number Project ID
projectRegionId required number Region ID
page required number Page number. 1  by default
pageSize optional number (20, 50, 100, 200, 500) Number of results per page. 100  by default
dateFrom optional date (yyyy-mm-dd) Start date of the period for which the data is required
dateTo optional date (yyyy-mm-dd) End date of the period for which the data is required
sort optional string:
* date — by date;
* keyword  alphabetically
Sorting by parameters. Alphabetically  by default
order optional string:
* desc  descending;
* asc  ascending

Sorting order. Descending order  by default.

keyword optional array: [“string”] Keywords for which pages and positions are required. The maximum number of keywords that can be filtered is 1000.

Response parameters
Parameter Description
id Response id corresponds the request id
result Contains the answer
data Object with data
projectId Project ID
projectRegionId Region ID
keywords Array with keywords
keyword Keywords with data
history Array of dates with search results for keyword
date Search results date
positions Array with positions of domain or page
position Position
url URL
summary info Summary data block
page Current page
page_total Number of pages with the results for the selected parameter pageSize
count Number of results per page
total Total number of results
sort  Sorting by parameters
order   Sorting order

This method doesn't require API credits.

Example
Request data:
{
    "id": 1,
    "method": "RtApiSerpResultsProcedure.getKeywordsSerpResultsHistory",
    "params": {
        "projectId": 853932,
        "projectRegionId": 293402,
        "page": 1,
        "pageSize": 500,
        "dateFrom": "2021-08-03",
        "dateTo": "2021-08-04",
        "sort": "date",
        "order": "asc",
        "keywords": ["kids soccer shirts"]
    }
}
Response data:
{
    "id": "1",
    "result": {
        "data": {
            "projectId": 853932,
            "projectRegionId": 293402,
            "keywords": [
                {
                    "keyword": "kids soccer shirts",
                    "history": [
                        {
                            "date": "2021-08-03",
                            "positions": [
                                {
                                    "position": 1,
                                    "url": "https://www.amazon.com/Best-Sellers-Sports-Outdoors-Boys-Soccer-Jerseys/zgbs/sporting-goods/2420236011"
                                },
                                {
                                    "position": 2,
                                    "url": "https://www.dickssportinggoods.com/f/youth-soccer-shirts-1"
                                },
                                {
                                    "position": 3,
                                    "url": "https://www.worldsoccershop.com/shop/products/jerseys/youth"
                                },
                                {
                                    "position": 4,
                                    "url": "https://www.etsy.com/market/kids_soccer_shirts"
                                },
                                {
                                    "position": 5,
                                    "url": "https://www.adidas.com/us/kids-soccer-jerseys"
                                },

...

                                {
                                    "position": 99,
                                    "url": "https://uniformstore.com/product-category/football-uniforms/football-uniform-sets/"
                                }
                            ]
                        },
                        {
                            "date": "2021-08-04",
                            "positions": [
                                {
                                    "position": 1,
                                    "url": "https://www.amazon.com/Best-Sellers-Sports-Outdoors-Boys-Soccer-Jerseys/zgbs/sporting-goods/2420236011"
                                },
                                {
                                    "position": 2,
                                    "url": "https://www.dickssportinggoods.com/f/youth-soccer-shirts-1"
                                },
                                {
                                    "position": 3,
                                    "url": "https://www.etsy.com/market/kids_soccer_shirts"
                                },
                                {
                                    "position": 4,
                                    "url": "https://www.worldsoccershop.com/shop/products/jerseys/youth"
                                },
                                {
                                    "position": 5,
                                    "url": "https://www.adidas.com/us/kids-soccer-jerseys"
                                },

...

                                {
                                    "position": 99,
                                    "url": "http://dcam.hansjehooghiemstra.nl/liverpool-kits.html"
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        "summary_info": {
            "page": 1,
            "page_total": 1,
            "count": 500,
            "total": 1,
            "sort": "date",
            "order": "asc"
        },
        "spent_limits": 0
    }
}