YouTube Playlist API
The videos in a public playlist, in playlist order, 100 per page. Playlist metadata (title, description, owner) comes back alongside the items. Calls cost 1 credit each. A cache hit is free, and a failed or empty response is never charged.
Try it
Prefilled with the request that produced the example below. No key yet? Get a free key.
Request
GET
/v1/youtube/playlist| Parameter | Type | Required | Description |
|---|---|---|---|
| playlist_id | string | yes | Playlist id (PL…), or any URL containing list= |
| cursor | string | no | pagination.cursor from a previous response |
Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).
curl
curl "$API/v1/youtube/playlist?playlist_id=PLF98rxtslw6s&cache_max_age=7d" \
-H "x-api-key: $KEY"JavaScript
const query = new URLSearchParams({
playlist_id: 'PLF98rxtslw6s',
cache_max_age: '7d',
});
const response = await fetch(`${API}/v1/youtube/playlist?${query}`, {
headers: { 'x-api-key': KEY },
});
const body = await response.json();
if (!body.success) throw new Error(body.error.code);
// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);Python
import os, httpx
r = httpx.get(
f"{os.environ['API']}/v1/youtube/playlist",
params={
"playlist_id": "PLF98rxtslw6s",
"cache_max_age": "7d",
},
headers={"x-api-key": os.environ["KEY"]},
timeout=30,
)
body = r.json()
if not body["success"]:
raise RuntimeError(body["error"]["code"])
print(body["data"], body["meta"]["creditsCharged"])Example response
Captured on , with raw removed and lists cut to two items. A live call returns current data.
response
{
"success": true,
"data": {
"playlist": {
"platform": "youtube",
"id": "PLF98rxtslw6s",
"url": "https://www.youtube.com/playlist?list=PLF98rxtslw6s",
"title": "Nancy Grace Roman Space Telescope",
"description": null,
"thumbnailUrl": "https://i.ytimg.com/vi/9wq3VHsL_bE/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLAdDqi7d9HrLblO-QHGsiiPzKccRA",
"videoCount": 3,
"ownerId": "UCLA_DiR1FfKNvjuUpBHmylQ",
"ownerName": "NASA",
"updatedText": null,
"fetchedAt": "2026-10-21T02:03:02.035Z"
},
"items": [
{
"platform": "youtube",
"id": "9wq3VHsL_bE",
"type": "video",
"url": "https://www.youtube.com/watch?v=9wq3VHsL_bE",
"title": "Nancy Grace Roman Space Telescope Launch",
"text": null,
"authorId": "UCLA_DiR1FfKNvjuUpBHmylQ",
"authorHandle": "NASA",
"authorName": "NASA",
"thumbnailUrl": "https://i.ytimg.com/vi/9wq3VHsL_bE/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDGXd0eE7tkDgRCIuhP9_jhzdv88A",
"mediaUrls": [],
"durationSeconds": 6639,
"viewCount": 1800000,
"likeCount": null,
"commentCount": null,
"shareCount": null,
"hashtags": [],
"mentions": [],
"isSponsored": null,
"publishedAt": null,
"fetchedAt": "2026-10-21T02:03:02.036Z"
},
{
"platform": "youtube",
"id": "sZfFevvUFUk",
"type": "video",
"url": "https://www.youtube.com/watch?v=sZfFevvUFUk",
"title": "NASA's Roman Space Telescope: Go For Launch",
"text": null,
"authorId": "UCAY-SMFNfynqz1bdoaV8BeQ",
"authorHandle": "NASAGoddard",
"authorName": "NASA Goddard",
"thumbnailUrl": "https://i.ytimg.com/vi/sZfFevvUFUk/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBhfuKGIqbHEWcaqluku0A_VjNi9w",
"mediaUrls": [],
"durationSeconds": 194,
"viewCount": 208000,
"likeCount": null,
"commentCount": null,
"shareCount": null,
"hashtags": [],
"mentions": [],
"isSponsored": null,
"publishedAt": null,
"fetchedAt": "2026-10-21T02:03:02.037Z"
}
]
},
"pagination": {
"cursor": null,
"hasMore": false,
"count": 3
},
"meta": {
"platform": "youtube",
"endpoint": "youtube.playlist",
"creditsCharged": 1,
"cached": false,
"cacheAgeSeconds": null,
"durationMs": 218,
"requestId": "req_w1rogx7i2jlfw3k8f36r"
}
}Returns
Returns an object with playlist, items.
Fields
| Field | Type | Present |
|---|---|---|
| playlist | object | always |
| playlist.platform | "youtube" | always |
| playlist.id | string | always |
| playlist.url | string | always |
| playlist.title | string | null | always |
| playlist.description | string | null | always |
| playlist.thumbnailUrl | string | null | always |
| playlist.videoCount | number | null | always |
| playlist.ownerId | string | null | always |
| playlist.ownerName | string | null | always |
| playlist.updatedText | string | null | always |
| playlist.fetchedAt | string | always |
| items | Post[] | always |
Cost and behaviour
| Credits | 1 per live request, 0 on a cache hit |
| Cacheable | yes: cache_max_age accepts a cached copy |
| Batchable | yes: usable as a target in POST /v1/jobs/batch |
| Subscribable | yes: as often as every 3600 seconds, firing a webhook only on a change |
Other YouTube endpoints
- /v1/youtube/channel Channel details
- /v1/youtube/channel-videos Channel videos
- /v1/youtube/channel/community-posts Channel community posts
- /v1/youtube/channel/lives Channel live streams
- /v1/youtube/channel/playlists Channel playlists
- /v1/youtube/channel/shorts Channel shorts
- /v1/youtube/community-post Community post details
- /v1/youtube/search Search videos