# List locations by tags

```http
GET https://api.synup.com/api/v4/tags/locations
```

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.

Source: https://developer.synup.com/api/organizing-locations/list-locations-by-tags

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tags` | array | required | Array of tag names to filter locations by |
| `archived` | boolean | optional | Filter for archived status: * If omitted - returns all locations * If false - returns only unarchived locations * If true - returns only archived locations |
| `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 |

## Example request

```bash
curl -X GET 'https://api.synup.com/api/v4/tags/locations' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json'
```

## Responses

| Status | Description |
| --- | --- |
| `200` | Successfully retrieved locations |
| `400` | Bad request - Invalid parameters |
| `401` | Unauthorized - Authentication required |
| `403` | Forbidden - Insufficient permissions |
