> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.navisavitravel.com/llms.txt.

# Get a playlist by ID

GET https://api.navisavitravel.com/v1/playlists/{playlistId}

Returns a playlist with its name and full list of videos.

Reference: https://api-docs.navisavitravel.com/api-reference/playlists/get-playlist

## Authentication

- `x-api-key` header (required) — API key issued with your NaviSavi plan

## Servers

- `https://api.navisavitravel.com` (Production, default)
- `https://api-dev.navisavitravel.com` (Development)

## Request

### Path parameters

- `playlistId` (integer, optional)

### Query parameters

- `thumbnailWidth` (integer, optional, default: 1280) — Thumbnail width in pixels
- `thumbnailHeight` (integer, optional, default: 720) — Thumbnail height in pixels
- `thumbnailTime` (double, optional, default: 4) — Time offset in seconds for thumbnail frame (clamped to video duration, or 30s if unknown)
- `thumbnailType` (enum, optional, default: png) — Thumbnail image format
  - Allowed values: `png`, `jpeg`, `webp`
- `minResolution` (enum, optional) — Minimum video resolution for contentUrl. Must be provided together with maxResolution.
  - Allowed values: `270p`, `360p`, `480p`, `540p`, `720p`, `1080p`, `1440p`, `2160p`
- `maxResolution` (enum, optional) — Maximum video resolution for contentUrl. Must be provided together with minResolution.
  - Allowed values: `270p`, `360p`, `480p`, `540p`, `720p`, `1080p`, `1440p`, `2160p`

## Response

### 200

Playlist with videos

- `id` (integer, required)
- `name` (string, required, nullable)
- `slug` (string, required)
- `videos` (list of PlaylistVideosItems, required)

## Errors

### 400 Bad Request Error

Invalid request parameters

- `error` (string, required)
- `details` (map from string to any, optional)

### 403 Forbidden Error

Missing or invalid API key

- `error` (string, required)
- `details` (map from string to any, optional)

### 404 Not Found Error

Playlist not found

- `error` (string, required)
- `details` (map from string to any, optional)

### 500 Internal Server Error

Internal server error

- `error` (string, required)
- `details` (map from string to any, optional)

## Types

### PlaylistVideosItems

- `id` (string, required)
- `@context` (string, required)
- `@type` (string, required)
- `title` (string, required)
- `description` (string, required)
- `thumbnailUrl` (string, required)
- `uploadDate` (datetime, required)
- `duration` (double, required, nullable)
- `contentUrl` (string, required)
- `embedUrl` (string, required)
- `publisher` (PlaylistVideosItemsPublisher, required)
- `creator` (PlaylistVideosItemsCreator, required)
- `location` (PlaylistVideosItemsLocation, required)
- `keywords` (list of string, required, nullable)
- `tags` (list of string, required, nullable)
- `metadata` (PlaylistVideosItemsMetadata, required)
- `experienceProfile` (PlaylistVideosItemsExperienceProfile, required)
- `vibes` (list of string, required)
- `conversationalQueries` (PlaylistVideosItemsConversationalQueries, required, nullable)
- `timestampContext` (PlaylistVideosItemsTimestampContext, required)
- `nearestAirport` (PlaylistVideosItemsNearestAirport, required)
- `nearbyAccommodation` (PlaylistVideosItemsNearbyAccommodation, required)
- `nearbyExperiences` (PlaylistVideosItemsNearbyExperiences, required)
- `assetId` (string, required, nullable)
- `streamUrl` (string, required)
- `resolutions` (PlaylistVideosItemsResolutions, required)
- `playerUrl` (string, required)
- `playbackId` (string, required)
- `clipUrl` (string, required, nullable)
- `thumbnails` (PlaylistVideosItemsThumbnails, required)

### PlaylistVideosItemsPublisher

- `@type` (string, required)
- `name` (string, required)
- `url` (string, required)

### PlaylistVideosItemsCreator

- `@type` (string, required)
- `name` (string, required)

### PlaylistVideosItemsLocation

- `@type` (string, required)
- `name` (string, required)
- `address` (PlaylistVideosItemsLocationAddress, required)
- `geo` (PlaylistVideosItemsLocationGeo, required)

### PlaylistVideosItemsMetadata

- `bestTimeToVisit` (string, required, nullable)
- `experienceType` (list of string, required, nullable)
- `suitability` (list of string, required, nullable)
- `recommendedVisitDuration` (string, required, nullable)
- `accessibilityNotes` (string, required, nullable)
- `gearRecommendations` (list of string, required, nullable)
- `tone` (string, required, nullable)
- `style` (string, required, nullable)
- `sentiment` (string, required, nullable)
- `callToAction` (string, required, nullable)
- `audienceSegment` (list of string, required, nullable)
- `experienceCategory` (list of string, required, nullable)

### PlaylistVideosItemsExperienceProfile

- `relaxingToAdventurous` (double, required, nullable)
- `intimateToSocial` (double, required, nullable)
- `localToBranded` (double, required, nullable)
- `natureToUrban` (double, required, nullable)
- `quietToLively` (double, required, nullable)
- `classicToTrendy` (double, required, nullable)
- `enrichingToIndulgent` (double, required, nullable)
- `iconicToHiddenGem` (double, required, nullable)
- `photogenicToFunctional` (double, required, nullable)

### PlaylistVideosItemsConversationalQueries

- `en` (list of string, required)
- `es` (list of string, required)
- `zh` (list of string, required)

### PlaylistVideosItemsTimestampContext

- `dayOfWeek` (string, required, nullable)
- `month` (string, required, nullable)
- `season` (string, required, nullable)
- `timeOfDay` (string, required, nullable)
- `weather` (string, required, nullable)

### PlaylistVideosItemsNearestAirport

- `text` (string, required, nullable)
- `name` (string, required, nullable)
- `location` (string, required, nullable)
- `airportCode` (string, required, nullable)
- `flightsUrl` (string, required, nullable)

### PlaylistVideosItemsNearbyAccommodation

- `staysUrl` (string, required)
- `text` (string, required, nullable)

### PlaylistVideosItemsNearbyExperiences

- `experiencesUrl` (string, required)
- `text` (string, required, nullable)

### PlaylistVideosItemsResolutions

- `270p` (string, required)
- `360p` (string, required)
- `480p` (string, required)
- `540p` (string, required)
- `720p` (string, required)
- `1080p` (string, required)
- `1440p` (string, required)
- `2160p` (string, required)

### PlaylistVideosItemsThumbnails

- `jpeg` (string, required)
- `png` (string, required)
- `webp` (string, required)

### PlaylistVideosItemsLocationAddress

- `addressLocality` (string, required)
- `addressRegion` (string, required)
- `addressCountry` (string, required)
- `addressFullName` (string, required)

### PlaylistVideosItemsLocationGeo

- `@type` (string, required)
- `latitude` (double, required)
- `longitude` (double, required)

## Examples

**Response**

```json
{
  "id": 1,
  "name": "Best of Italy",
  "slug": "string",
  "videos": []
}
```

**SDK Code**

```python
import requests

url = "https://api.navisavitravel.com/v1/playlists/1"

headers = {"x-api-key": "<apiKey>"}

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

print(response.json())
```

```javascript
const url = 'https://api.navisavitravel.com/v1/playlists/1';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.navisavitravel.com/v1/playlists/1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.navisavitravel.com/v1/playlists/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.navisavitravel.com/v1/playlists/1")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.navisavitravel.com/v1/playlists/1', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.navisavitravel.com/v1/playlists/1");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.navisavitravel.com/v1/playlists/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```