# Inspect Playlist Items
URL: https://musicapi.com/docs/reference/get-public-playlist-items.md

`POST https://api.musicapi.com/public/inspect/playlistItems`

Section: Search and match the catalog.
Product: MusicAPI Core.
Auth: Basic, Token, DevToken, DocsSession (any one of them). Use Basic with your Client ID and Client Secret from your server only.

This endpoint allows you to fetch the tracks of a playlist from a music service without user authentication.
You need to provide the `playlistId` (which can be extracted from a playlist URL) and the `serviceId` of the music service.

The response includes paginated track results (up to 50 tracks per page). To fetch subsequent pages, pass the `nextParam` value from the response back in the `nextParam` field of the request body. When the response `nextParam` is `null`, there are no more pages.

Supported services: Spotify, Apple Music, Deezer, YouTube, YouTube Music, SoundCloud, Tidal, Amazon Music, Pandora, Qobuz.

## Request body

`application/json`, required.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `playlistId` | string | yes | ID of the playlist on the music service. Can be extracted from the playlist URL. |
| `serviceId` | string | yes | ID of the music service One of: spotify, youtube, appleMusic, amazonMusic, tidal, resso, boomplay, deezer, pandora, soundCloud, youtubeMusic, napster, qobuz, qqMusic, yandexMusic, vkMusic, zvuk, gaana, jiosaavn, audiomack, audius. |
| `nextParam` | string | no | Pagination cursor. Omit to fetch the first page; to fetch a subsequent page pass the `nextParam` value returned in the previous response. |

## Response 200

ok

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | yes | One of: success, not_found, error. |
| `source` | string | no | The music service that provided the data |
| `data` | object \| null | yes |  |
| `data.results` | Track[] | yes |  |
| `data.results[].id` | string | yes |  |
| `data.results[].entryId` | string \| null | yes | Identifier associated with a tracks within a specific collection. It is used to identify a particular instance of a track within a playlist or a user's library. Track entry id can be obtained during fetching playlist items or user's library. |
| `data.results[].name` | string | yes |  |
| `data.results[].isrc` | string \| null | yes |  |
| `data.results[].duration` | number \| null | yes |  |
| `data.results[].imageUrl` | string \| null | yes |  |
| `data.results[].previewUrl` | string \| null | yes |  |
| `data.results[].album` | object \| null | yes |  |
| `data.results[].album.name` | string | yes |  |
| `data.results[].album.id` | string \| null | yes |  |
| `data.results[].album.totalItems` | number \| null | yes |  |
| `data.results[].album.artists` | ArtistSimplified[] \| null | yes |  |
| `data.results[].album.artists.id` | string \| null | yes |  |
| `data.results[].album.artists.entryId` | string \| null | yes | Identifier associated with an artist within a user's library. Artist entry id can be obtained during fetching artists from user's library. |
| `data.results[].album.artists.name` | string | yes |  |
| `data.results[].album.artists.imageUrl` | string \| null | yes |  |
| `data.results[].album.artists.followers` | number \| null | yes |  |
| `data.results[].artists` | ArtistSimplified[] \| null | yes |  |
| `data.results[].artists.id` | string \| null | yes |  |
| `data.results[].artists.entryId` | string \| null | yes | Identifier associated with an artist within a user's library. Artist entry id can be obtained during fetching artists from user's library. |
| `data.results[].artists.name` | string | yes |  |
| `data.results[].artists.imageUrl` | string \| null | yes |  |
| `data.results[].artists.followers` | number \| null | yes |  |
| `data.results[].isAvailable` | boolean \| null | no | Indicates whether the track is currently available for playback on the music service. For Spotify: false for local files or greyed-out tracks (copyright lost), true for playable tracks, null when unknown. |
| `data.results[].dateAdded` | string \| null | no |  |
| `data.nextParam` | string \| null | yes |  |
| `data.totalItems` | number \| null | yes |  |

```json
{
  "status": "success",
  "source": "spotify",
  "data": {
    "results": [
      null
    ],
    "nextParam": "eyJvZmZzZXQiOjEwfQ==",
    "totalItems": 25
  }
}
```

## Example

```bash
curl -X POST "https://api.musicapi.com/public/inspect/playlistItems" \
  -u "$MUSICAPI_CLIENT_ID:$MUSICAPI_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"playlistId":"37i9dQZF1DXcBWIGoYBM5M","serviceId":"spotify","nextParam":"eyJvZmZzZXQiOjEwfQ=="}'
```
