Obtaining the list of pages and their positions by domain

The RtApiSerpResultsProcedure.getUrlsSerpResultsHistory method returns the history of the positions and urls for the keywords to the requested region.

General request parameters and instructions for using Serpstat API

Request parameters

Parameter

Description

Type

Optional

Default value

Value options

id

A request id: the response contains the same id.

int/string

no

Any text or number value.
For example: 1, test, тест

method

API method name

string

no

RtApiSerpResultsProcedure.getKeywordsSerpResultsHistory

params

The object with parameters {...}, it lists all the following parameters and arrays [...]

no

projectId Project ID int no Number value of project
projectRegionId Region ID int no Number value of region
page Page number int no 1 Number value
pageSize Number of results per page int yes 100 Number value. Possible values: 20, 50, 100, 200, 500
dateFrom Start date of the period for which the data is required date yes Number value, data format: yyyy-mm-dd
dateTo End date of the period for which the data is required date yes Number value, data format: yyyy-mm-dd
sort Sorting by parameters string yes alphabetically "date" — Sorting by date,
"keyword" — Sorting alphabetically
order Sorting order string yes desc desc — descending order,
asc — ascending order
keywords Keywords for which pages and positions are required array yes Text value.
The maximum number of keywords that can be filtered is 1000.
domain Domain or page for which the data is required string yes project domain Text value.
Data format:
domain.com — domain,
https://domain.com/ — page


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
domain Domain or page for which the search results are requested
keywords Array with keywords
keyword Keyword
frequency Search volume per month in the selected country or city
expectedUrl A landing page that is optimized for a specific keyword (if it was added in the project)
history Array with dates of search results by keyword
date Search results date
positions Array with positions of domain or page
position Position
url A page that appears in search results for a specific keyword
positionBlock (only for PPC) PPC block:
* top — top ad block;
* sidebar — side ad block;
* bottom — bottom ad block
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

Credits for this method are not deducted.

Example
Request data:
{
    "id": 1,
    "method": "RtApiSerpResultsProcedure.getUrlsSerpResultsHistory",
    "params": {
        "projectId": 853932,
        "projectRegionId": 293402,
        "page": 1,
        "pageSize": 500,
        "dateFrom": "2021-12-12",
        "dateTo": "2021-12-12",
        "sort": "date",
        "order": "desc",
        "keywords": ["adidas track", "running shoe adidas"],
        "domain": "adidas.com"
    }
}
Response data:
{
    "id": "1",
    "result": {
        "data": {
            "projectId": 853932,
            "projectRegionId": 293402,
            "domain": "adidas.com",
            "keywords": [
                {
                    "keyword": "running shoe adidas",
                    "frequency": 49500,
                    "expectedUrl": "https://www.adidas.com/us/ultraboost",
                    "history": [
                        {
                            "date": "2021-12-12",
                            "positions": [
                                {
                                    "position": 1,
                                    "url": "https://www.adidas.com/us/men-running-shoes"
                                }
                            ]
                        }
                    ]
                },
                {
                    "keyword": "adidas track",
                    "frequency": 49500,
                    "expectedUrl": "https://www.adidas.com/us/track",
                    "history": [
                        {
                            "date": "2021-12-12",
                            "positions": [
                                {
                                    "position": 1,
                                    "url": "https://www.adidas.com/us/track"
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        "summary_info": {
            "page": 1,
            "page_total": 1,
            "count": 500,
            "total": 2,
            "sort": "date",
            "order": "desc"
        },
        "spent_limits": 0
    }
}

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