# YouTube Playlist

Get videos from a YouTube playlist.

- **Documentation:** [https://scrappa.co/docs/youtube-api/youtube_playlist](https://scrappa.co/docs/youtube-api/youtube_playlist)
- **API group:** YouTube API
- **Endpoint:** `GET https://scrappa.co/api/youtube/playlist`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `playlist_id` | string | Yes | YouTube playlist ID |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/youtube/playlist?playlist_id=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf"
```

## Example response

```json
{
    "playlistId": "PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf",
    "title": "Playlist Title",
    "description": "Playlist description",
    "videoCount": 10,
    "videos": [
        {
            "id": "video123",
            "title": "Video Title",
            "channel": {
                "name": "Channel Name"
            }
        }
    ],
    "pagination": {
        "hasMore": true
    }
}
```

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
