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 list of domains from top 20 project keywords (getTopCompetitorsDomainsHistory)

The getTopCompetitorsDomainsHistory method returns the list of domains for the required region, which were listed in the top-20 for two any project keywords. The data set is similar to the Rank tracker  Competitors report.

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.getTopCompetitorsDomainsHistory 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 search results on the page. 100  by default.
dateFrom optional date (yyyy-mm-dd)
Start date of period for which the data is required. 30 days  by default, from the last position withdrawal.
dateTo optional date (yyyy-mm-dd)
End date of the period for which the data is required
sort optional string:
* sum_traffic  traffic distribution;
* keywords_count   number of keywords;
* avg_position  average position;
* position_ranges  position distribution ranges;
ads_count  number of ads
Parameter used for sorting. Traffic distribution  by default.
sortRange optional string:
* top1\top2...  position distribution by position;
* keywords_count_bottom\keywords_count_top\  distribution by ads;
* avg_position_top\avg_position_bottom\  average position by ads)

Used for sorting *position_ranges*.

order optional string:
* desc — descending;
* asc — ascending
Sorting order. Descending  by default
domains optional array: ["domain1.com", "domain2.com"] Analyzed domains. Data is obtained by all domains in top 20 for two project keywords by default.

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
competitors Array with domains
domain Domain that is appeared in top 20 by two project keyword
dates Array with dates for the specified domain
date Date for which the data of the domain is displayed
value Parameter value
traffic_distribution Domain traffic distribution among all domains in top 20
avg_position Domain average position, among the best positions for project keywords
keywords_count Number of keywords which the domain is ranking for into search results
keywords_by_ranges Keywords distribution by domain position range
top1 Keywords for which the domain took the 1 position
top3 Keywords for which the domain took the 2-3 positions
top5 Keywords for which the domain took the 4-5 positions
top10 Keywords for which the domain took the 6-10 positions
top20 Keywords for which the domain took the 11-20 positions
top101 Keywords for which the domain took the 21-100 positions in Google and 21-50 positions in Yandex
Regions with PPC
ads_count Number of ads for which domain is appeared in PPC
keywords_count_blocks Keywords distribution by PPC blocks
avg_position_blocks Average position distribution by PPC blocks
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

This method doesn't require API credits.

Example
Request data:
{
    "id": "1",
    "method": "RtApiSerpResultsProcedure.getTopCompetitorsDomainsHistory",
   "params": {
        "projectId": 853932,
        "projectRegionId": 293402,
        "page": 1,
        "pageSize": 20,
        "dateFrom": "2021-07-26",
        "dateTo": "2021-07-27",
        "sort": "domain",
        "order": "asc",
        "domains": [
            "adidas.com",
            "nike.com"
        ]  
    }
}
Response data:
{
    "id": "1",
    "result": {
        "data": {
            "projectId": 853932,
            "projectRegionId": 293402,
            "competitors": [
                {
                    "domain": "adidas.com",
                    "dates": [
                        {
                            "date": "2021-07-26",
                            "result": {
                                "traffic_distribution": {
                                    "value": 19.390000000000001
                                },
                                "avg_position": {
                                    "value": 2.7000000000000002
                                },
                                "keywords_count": {
                                    "value": 12
                                },
                                "keywords_by_ranges": {
                                    "top1": {
                                        "value": 5
                                    },
                                    "top3": {
                                        "value": 3
                                    },
                                    "top5": {
                                        "value": 3
                                    },
                                    "top10": {
                                        "value": 1
                                    },
                                    "top20": {
                                        "value": 0
                                    },
                                    "top101": {
                                        "value": 0
                                    }
                                }
                            }
                        },
                        {
                            "date": "2021-07-27",
                            "result": {
                                "traffic_distribution": {
                                    "value": 17.25
                                },
                                "avg_position": {
                                    "value": 3.1000000000000001
                                },
                                "keywords_count": {
                                    "value": 12
                                },
                                "keywords_by_ranges": {
                                    "top1": {
                                        "value": 6
                                    },
                                    "top3": {
                                        "value": 2
                                    },
                                    "top5": {
                                        "value": 2
                                    },
                                    "top10": {
                                        "value": 2
                                    },
                                    "top20": {
                                        "value": 0
                                    },
                                    "top101": {
                                        "value": 0
                                    }
                                }
                            }
                        }
                    ]
                },
                {
                    "domain": "nike.com",
                    "dates": [
                        {
                            "date": "2021-07-26",
                            "result": {
                                "traffic_distribution": {
                                    "value": 7.6299999999999999
                                },
                                "avg_position": {
                                    "value": 15.1
                                },
                                "keywords_count": {
                                    "value": 9
                                },
                                "keywords_by_ranges": {
                                    "top1": {
                                        "value": 0
                                    },
                                    "top3": {
                                        "value": 2
                                    },
                                    "top5": {
                                        "value": 1
                                    },
                                    "top10": {
                                        "value": 3
                                    },
                                    "top20": {
                                        "value": 2
                                    },
                                    "top101": {
                                        "value": 1
                                    }
                                }
                            }
                        },
                        {
                            "date": "2021-07-27",
                            "result": {
                                "traffic_distribution": {
                                    "value": 7.6799999999999997
                                },
                                "avg_position": {
                                    "value": 14.6
                                },
                                "keywords_count": {
                                    "value": 9
                                },
                                "keywords_by_ranges": {
                                    "top1": {
                                        "value": 0
                                    },
                                    "top3": {
                                        "value": 2
                                    },
                                    "top5": {
                                        "value": 1
                                    },
                                    "top10": {
                                        "value": 3
                                    },
                                    "top20": {
                                        "value": 2
                                    },
                                    "top101": {
                                        "value": 1
                                    }
                                }
                            }
                        }
                    ]
                }
            ]
        },
        "summary_info": {
            "page": 1,
            "page_total": 1,
            "count": 20,
            "total": 2,
            "sort": "domain",
            "order": "asc"
        },
        "spent_limits": 0
    }
}