GETapi.synup.com/api/v4/tags/locations
List locations by tags
This API retrieves locations associated with specified tags and supports pagination for efficient data retrieval.
Features:
- Supports cursor-based pagination for navigating large datasets.
- Allows filtering by archived/unarchived locations.
- Returns detailed location information, including business details and metadata.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Query
| Name | Type | Required | Description |
|---|---|---|---|
tags | array | required | Array of tag names to filter locations by |
archived | boolean | optional | Filter for archived status:
|
after | string | optional | Cursor for pagination - fetch records after this cursor |
before | string | optional | Cursor for pagination - fetch records before this cursor |
first | integer | optional | Number of records to fetch from the beginning |
last | integer | optional | Number of records to fetch from the end |
Request
Request
curl -X GET 'https://api.synup.com/api/v4/tags/locations?tags=&archived=&after=&before=&first=&last=' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json'const res = await fetch('https://api.synup.com/api/v4/tags/locations?tags=&archived=&after=&before=&first=&last=', {
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/tags/locations?tags=&archived=&after=&before=&first=&last=",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
)
data = res.json()req, _ := http.NewRequest("GET", "https://api.synup.com/api/v4/tags/locations?tags=&archived=&after=&before=&first=&last=", 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 | Successfully retrieved locations |
400 | Bad request - Invalid parameters |
401 | Unauthorized - Authentication required |
403 | Forbidden - Insufficient permissions |
Example response
{
"data": {
"searchLocationsByTag": {
"edges": [
{
"cursor": "TG9jYXRpb246NzMzMzA=",
"node": {
"name": "test test",
"id": "TG9jYXRpb246NzMzMzA="
}
},
{
"cursor": "TG9jYXRpb246NzMzMTI=",
"node": {
"name": "Bombay Cocktail Bar",
"id": "TG9jYXRpb246NzMzMTI="
}
}
],
"pageInfo": {
"hasNextPage": false,
"hasPreviousPage": false,
"total": 3
}
}
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.searchLocationsByTag | object | optional | |
data.searchLocationsByTag.edges | array of object | optional | Array of location edges containing cursor and node data |
data.searchLocationsByTag.edges[].cursor | string | optional | Pagination cursor for this location |
data.searchLocationsByTag.edges[].node | object | optional | |
data.searchLocationsByTag.edges[].node.id | string | optional | Unique identifier for the location |
data.searchLocationsByTag.edges[].node.name | string | optional | Name of the location |
data.searchLocationsByTag.pageInfo | object | optional | Pagination metadata |
data.searchLocationsByTag.pageInfo.hasNextPage | boolean | optional | Indicates if there are more results after this page |
data.searchLocationsByTag.pageInfo.hasPreviousPage | boolean | optional | Indicates if there are more results before this page |
data.searchLocationsByTag.pageInfo.total | integer | optional | Total number of locations matching the query |