GETapi.synup.com/api/v4/locations/{locationId}/keywords-performance
Get keywords performance
This API retrieves the ranking performance of all keywords associated with a specific location.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Path
| Name | Type | Required | Description |
|---|---|---|---|
locationId | string | required | Location ID |
Query
| Name | Type | Required | Description |
|---|---|---|---|
fromDate | string | optional | Start date to fetch rankings from (YYYY-MM-DD) |
toDate | string | optional | End date to fetch rankings until (YYYY-MM-DD) |
Request
Request
curl -X GET 'https://api.synup.com/api/v4/locations/:locationId/keywords-performance?fromDate=&toDate=' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json'const res = await fetch('https://api.synup.com/api/v4/locations/:locationId/keywords-performance?fromDate=&toDate=', {
method: 'GET',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
});
const data = await res.json();import requests
res = requests.get(
"https://api.synup.com/api/v4/locations/:locationId/keywords-performance?fromDate=&toDate=",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
)
data = res.json()req, _ := http.NewRequest("GET", "https://api.synup.com/api/v4/locations/:locationId/keywords-performance?fromDate=&toDate=", nil)
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 |
401 | Unauthorized |
Example response (generated from the schema)
{
"data": {
"keywordsByLocationId": [
{
"id": "S2V5d29yZDoxODQ1OTY4",
"databaseId": "1845968",
"name": "local business",
"sites": [
{
"name": "Google",
"rankings": [
null
]
}
]
}
]
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.keywordsByLocationId | array of object | optional | |
data.keywordsByLocationId[].id | string | optional | |
data.keywordsByLocationId[].databaseId | string | optional | |
data.keywordsByLocationId[].name | string | optional | |
data.keywordsByLocationId[].sites | array of object | optional | |
data.keywordsByLocationId[].sites[].name | string | optional | GoogleYahooGoogle MapsBing |
data.keywordsByLocationId[].sites[].rankings | array of object | optional | |
data.keywordsByLocationId[].sites[].rankings[].rank | integer | optional | |
data.keywordsByLocationId[].sites[].rankings[].rankedAt | string | optional | |
data.keywordsByLocationId[].sites[].rankings[].matchType | string | optional | |
data.keywordsByLocationId[].sites[].rankings[].matchUrl | string | optional |