POSTapi.synup.com/api/v4/locations/ranking-sitewise-histogram
Get Rankings Distribution By Time
This API provides the weekly distribution of keyword rankings across four predefined rank buckets (1-3, 3-10, 10-20, 20-50) for each site. It returns the number of keywords falling within each rank range on specific dates for these sites. This helps track keyword performance trends over a time period.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Body
| Name | Type | Required | Description |
|---|---|---|---|
fromDate | string | required | Date from where data has to be fetched |
toDate | string | required | Date till where data has to be fetched |
locationIds | array of string | required | IDs to fetch data |
source | array of string | required | List of sources |
Request
Request
curl -X POST 'https://api.synup.com/api/v4/locations/ranking-sitewise-histogram' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '""'const res = await fetch('https://api.synup.com/api/v4/locations/ranking-sitewise-histogram', {
method: 'POST',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify(""),
});
const data = await res.json();import requests
res = requests.post(
"https://api.synup.com/api/v4/locations/ranking-sitewise-histogram",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
json="",
)
data = res.json()req, _ := http.NewRequest("POST", "https://api.synup.com/api/v4/locations/ranking-sitewise-histogram", bytes.NewBufferString(payload))
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 | Successful response |
400 | Bad Request |
401 | Unauthorized |
Example response (generated from the schema)
{
"data": {
"rankingsRollupByKeywordCount": [
{
"site": "Google",
"keywordCountByBucket": [
{
"rankRange": "rank_from_1_to_3",
"dailyKeywordCount": [
null
]
}
]
}
]
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.rankingsRollupByKeywordCount | array of object | optional | |
data.rankingsRollupByKeywordCount[].site | string | optional | Source name |
data.rankingsRollupByKeywordCount[].keywordCountByBucket | array of object | optional | |
data.rankingsRollupByKeywordCount[].keywordCountByBucket[].rankRange | string | optional | Rank range bucketrank_from_1_to_3rank_from_3_to_10rank_from_10_to_20rank_from_20_to_50 |
data.rankingsRollupByKeywordCount[].keywordCountByBucket[].dailyKeywordCount | array of object | optional | |
data.rankingsRollupByKeywordCount[].keywordCountByBucket[].dailyKeywordCount[].rankDate | string | optional | Specific date |
data.rankingsRollupByKeywordCount[].keywordCountByBucket[].dailyKeywordCount[].keywordCount | integer | optional | The value for the date |