# YouTube Channel playlists API (youtube.channel_playlists)

- Canonical page: [https://everyinfra.com/en/youtube-api/channel_playlists](https://everyinfra.com/en/youtube-api/channel_playlists?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "youtube", "action": "channel_playlists", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, one page of up to 30 per call; the number of rows varies from page to page and a short page is not the end (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page; no next_page_token means the end)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=youtube&action=channel_playlists

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| channel_id | not declared | yes | not declared | The channel for `channel_lives` and `channel_playlists`: a channel ID starting with UC, a channel link (`https://www.youtube.com/@NASA`) or an @handle. A value that is not recognized returns 422 and is not charged. |
| page_token | not declared | no | not declared | Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. About 30 playlists per page, and the count varies; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| type | Record type; values depend on the capability (for example video / image / text). |
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| url | Link to the record on the platform. |
| title | Title. null when the platform has no titles (for example text-only posts). |
| author_name | Author's display name. |
| author_id | Author's unique ID on the platform. |
| author_url | Link to the author's profile on the platform. |
| thumbnail_url | Thumbnail link, lower resolution than image_url. |
| playlist_id | ID of the playlist or mix when the row is one; otherwise null. |
| video_count | Number of videos. |
| video_count_estimated | true means video_count (videos) is an estimate converted from the rounded figure YouTube displays (such as 1.2M), not an exact count. The field does not appear when the count is exact. |
| is_course | Whether the playlist is a course (`channel_playlists`). |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "youtube",
  "action": "channel_playlists",
  "params": {
    "channel_id": "UCLA_DiR1FfKNvjuUpBHmylQ"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "youtube",
        "action": "channel_playlists",
        "params": {
            "channel_id": "UCLA_DiR1FfKNvjuUpBHmylQ",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "youtube",
  "action": "channel_playlists",
  "results": [
    {
      "type": …,
      "id": …,
      "url": …,
      "title": …,
      "author_name": …,
      "author_id": …,
      "author_url": …,
      "thumbnail_url": …,
      "playlist_id": …,
      "video_count": …,
      "video_count_estimated": …,
      "is_course": …,
      "platform": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=youtube
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
