---
title: "List the caller's saved places"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# List the caller's saved places

Path: Nicer API › favorites

`GET /favorites`

URL: `https://api.nicer.travel/favorites`

Returns the places the caller saved, newest first, optionally narrowed to one kind. Always the caller's own list — there is no way to read another user's.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Query parameters

- `kind` (`favorites.list.query.kind`; string, optional)
  - one of `"HOTEL"`, `"ACTIVITY"`

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.favorites.list();
```

### Nicer CLI

```bash
nicer favorites list
```

### cURL

```bash
curl --request GET \
  --url https://api.nicer.travel/favorites \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/favorites';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/favorites"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "items": [
    {
      "activity": {
        "destinationId": "string",
        "destinationName": "string",
        "durationMinutes": 100000,
        "reviewCount": 9007199254740991
      },
      "city": "string",
      "country": "string",
      "imageUrl": "string",
      "latitude": -90,
      "longitude": -180,
      "name": "string",
      "rateCodes": [
        "string"
      ],
      "starRating": 5,
      "createdAt": "string",
      "updatedAt": "string",
      "favoriteId": "string",
      "kind": "HOTEL",
      "reference": "string",
      "type": "Favorite",
      "userId": "string"
    }
  ]
}
```

- `items` (`favorites.list.response.200.items`; array of object, required)
  - `name` (`favorites.list.response.200.items.name`; string, required)
    - maxLength: `300` · minLength: `1`
  - `createdAt` (`favorites.list.response.200.items.createdAt`; string, required)
  - `updatedAt` (`favorites.list.response.200.items.updatedAt`; string, required)
  - `favoriteId` (`favorites.list.response.200.items.favoriteId`; string, required)
  - `kind` (`favorites.list.response.200.items.kind`; string, required)
    - one of `"HOTEL"`, `"ACTIVITY"`
  - `reference` (`favorites.list.response.200.items.reference`; string, required)
    - maxLength: `512` · minLength: `1`
  - `type` (`favorites.list.response.200.items.type`; string, required)
  - `userId` (`favorites.list.response.200.items.userId`; string, required)
  - `activity` (`favorites.list.response.200.items.activity`; any of, optional)
    - any of the following:
      - `FavoriteActivity`
        - `destinationId` (`FavoriteActivity.destinationId`; string, required)
          - maxLength: `32` · minLength: `1`
        - `destinationName` (`FavoriteActivity.destinationName`; any of, required)
          - any of the following: `string`, `null`
        - `durationMinutes` (`FavoriteActivity.durationMinutes`; any of, required)
          - any of the following: `integer`, `null`
        - `reviewCount` (`FavoriteActivity.reviewCount`; any of, required)
          - any of the following: `integer`, `null`
      - `null`
  - `city` (`favorites.list.response.200.items.city`; any of, optional)
    - any of the following: `string`, `null`
  - `country` (`favorites.list.response.200.items.country`; any of, optional)
    - any of the following: `string`, `null`
  - `imageUrl` (`favorites.list.response.200.items.imageUrl`; any of, optional)
    - any of the following: `string`, `null`
  - `latitude` (`favorites.list.response.200.items.latitude`; any of, optional)
    - any of the following: `number`, `null`
  - `longitude` (`favorites.list.response.200.items.longitude`; any of, optional)
    - any of the following: `number`, `null`
  - `rateCodes` (`favorites.list.response.200.items.rateCodes`; any of, optional)
    - any of the following: `array<string>`, `null`
  - `starRating` (`favorites.list.response.200.items.starRating`; any of, optional)
    - any of the following: `number`, `null`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`favorites.list.response.400.errorCode`; string, required)
- `errorMessage` (`favorites.list.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`favorites.list.response.401.errorCode`; string, required)
- `errorMessage` (`favorites.list.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`favorites.list.response.403.errorCode`; string, required)
- `errorMessage` (`favorites.list.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/favorites/favorites.list/index.md
