> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scraperize.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Playlist videos

> Fetches the videos in a YouTube playlist, 100 per page, in the playlist's order. Each video has its position, id, URL, title, channel (id, handle, name, avatar, verified) and, for a collaboration, every credited channel; its views and publish time as YouTube lists them (rounded / relative), length, thumbnail and moving preview; and whether it is live now (with viewers), scheduled (start time, people waiting) or members-only. The response also describes the playlist on every page: title, full description and its links, kind (`playlist`, `podcast` or `course`), owner, video count, exact total views, when it was last updated, how many unavailable videos YouTube hides, whether it is unlisted, and its cover. Works for any public or unlisted playlist, including a channel's uploads (`UU…`), Shorts (`UUSH…`, one page of up to 100) and live (`UULV…`) lists. Pass the returned `cursor` back (with the same `playlistId`) for the next page. Private playlists and Mixes (`RD…`) return 404. Only publicly available data is returned.

> [!NOTE]
>
> **Cost: 1 credit** per successful request. Errors and cache hits (`cache_max_age`) are free.

> [accordion] Copy for AI assistant
>
> Paste this into ChatGPT, Claude or your coding assistant to generate working code for this endpoint (use the copy button).
>
> ```text Prompt
> I want to make an API call to /v1/youtube/playlist. Here are the details:
>
> Endpoint: GET https://api.scraperize.com/v1/youtube/playlist
> Description: Fetches the videos in a YouTube playlist, 100 per page, in the playlist's order. Each video has its position, id, URL, title, channel (id, handle, name, avatar, verified) and, for a collaboration, every credited channel; its views and publish time as YouTube lists them (rounded / relative), length, thumbnail and moving preview; and whether it is live now (with viewers), scheduled (start time, people waiting) or members-only. The response also describes the playlist on every page: title, full description and its links, kind (`playlist`, `podcast` or `course`), owner, video count, exact total views, when it was last updated, how many unavailable videos YouTube hides, whether it is unlisted, and its cover. Works for any public or unlisted playlist, including a channel's uploads (`UU…`), Shorts (`UUSH…`, one page of up to 100) and live (`UULV…`) lists. Pass the returned `cursor` back (with the same `playlistId`) for the next page. Private playlists and Mixes (`RD…`) return 404. Only publicly available data is returned.
>
> Required Headers:
> - x-api-key: Your API key
>
> Parameters:
> - playlistId (string) [required]: The playlist id — the `list` value of a playlist URL (`youtube.com/playlist?list=<playlistId>`), e.g. `PL8mG-RkN2uTwcE8ceu8yAjExyRvw5DsA6`.
> - cursor (string): The `cursor` from the previous page, to get the next one. Omit for the first page.
> - cache_max_age (select): Optional. Return a cached result if one this age or newer exists — served for **0 credits** with `meta.cached=true` and `meta.cachedAt`. Otherwise a fresh scrape runs (**1 credit**) and refreshes the cache. Omit to always scrape fresh.
>
> Example Response:
> {
>   "data": {
>     "playlist": {
>       "id": "PL8mG-RkN2uTwcE8ceu8yAjExyRvw5DsA6",
>       "url": "https://www.youtube.com/playlist?list=PL8mG-RkN2uTwcE8ceu8yAjExyRvw5DsA6",
>       "title": "Secret Shopper",
>       "description": "We put your favourite tech companies to the test on how well they handle the customer experience- from ordering and shipping,  through to customer service and r…",
>       "links": [],
>       "type": "playlist",
>       "owner": {
>         "id": "UCXuqSBlHAE6Xw-yeJA0Tunw",
>         "name": "Linus Tech Tips",
>         "handle": "LinusTechTips",
>         "url": "https://www.youtube.com/@LinusTechTips",
>         "avatarUrl": "https://yt3.ggpht.com/gnvYLhXy8FAlPXZ2RTrkrgj-5kyt0vdE2FUGVOiKGdEZIa-wN5A-7nwZBlWJLzUMmoh1NWAU=s176-c-k-c0x00ffffff-no-rj"
>       },
>       "videoCount": 24,
>       "videoCountText": "24 videos",
>       "viewCount": 80081,
>       "lastUpdatedAt": "2026-06-18",
>       "lastUpdatedText": "Last updated on Jun 18, 2026",
>       "unavailableVideoCount": 0,
>       "isUnlisted": false,
>       "thumbnailUrl": "https://i.ytimg.com/vi/Clrj_lSDvzQ/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLC1C0WNOwIT4majHh4P8uYoWRCYcA&days_since_epoch=20762",
>       "thumbnails": [
>         {
>           "url": "https://i.ytimg.com/vi/Clrj_lSDvzQ/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLC1C0WNOwIT4majHh4P8uYoWRCYcA&days_since_epoch=20762",
>           "width": 480,
>           "height": 270
>         }
>       ]
>     },
>     "videos": [
>       {
>         "position": 1,
>         "id": "Clrj_lSDvzQ",
>         "url": "https://www.youtube.com/watch?v=Clrj_lSDvzQ",
>         "title": "Buying a Gaming PC at Best Buy – How Bad is it?",
>         "channel": {
>           "id": "UCXuqSBlHAE6Xw-yeJA0Tunw",
>           "name": "Linus Tech Tips",
>           "handle": "LinusTechTips",
>           "url": "https://www.youtube.com/@LinusTechTips",
>           "avatarUrl": "https://yt3.ggpht.com/gnvYLhXy8FAlPXZ2RTrkrgj-5kyt0vdE2FUGVOiKGdEZIa-wN5A-7nwZBlWJLzUMmoh1NWAU=s68-c-k-c0x00ffffff-no-rj",
>           "isVerified": true,
>           "isOfficialArtist": false
>         },
>         "collaborators": [],
>         "viewCount": 4600000,
>         "viewCountText": "4.6M views",
>         "publishedText": "10 years ago",
>         "durationSeconds": 492,
>         "durationText": "8:12",
>         "isLive": false,
>         "concurrentViewers": null,
>         "isUpcoming": false,
>         "scheduledStartAt": null,
>         "waitingCount": null,
>         "isMembersOnly": false,
>         "isShort": false,
>         "badges": [],
>         "thumbnailUrl": "https://i.ytimg.com/vi/Clrj_lSDvzQ/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDmSlpYYvU0A7q7PA0afkVQSDjxEg",
>         "thumbnails": [
>           {
>             "url": "https://i.ytimg.com/vi/Clrj_lSDvzQ/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDmSlpYYvU0A7q7PA0afkVQSDjxEg",
>             "width": 336,
>             "height": 188
>           }
>         ],
>         "frameUrl": null
>       }
>     ],
>     "count": 24,
>     "cursor": null,
>     "hasMore": false,
>     "fetchedAt": "2026-11-05T13:52:13.155Z"
>   },
>   "meta": {
>     "requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
>     "creditsCharged": 1,
>     "creditsRemaining": 4999,
>     "cached": false
>   }
> }
>
> Please help me write code in my preferred programming language to make this API call and handle the response appropriately. Include error handling and best practices.
> ```


## OpenAPI

````yaml /api-reference/openapi.json get /v1/youtube/playlist
openapi: 3.0.3
info:
  title: Scraperize API
  version: 1.0.0
  description: >-
    Extract public data from social media platforms as clean JSON. Endpoints are
    split by platform and by what they return, e.g. `GET /v1/twitter/tweet`.


    ## Authentication

    Send your API key in the `x-api-key` header (or `Authorization: Bearer
    <key>`). Create keys in your dashboard.


    ## Credits

    Each successful live scrape costs **1 credit**. Credits are prepaid and
    never expire.


    ## Caching

    Every endpoint accepts an optional `cache_max_age`
    (`1d`|`3d`|`7d`|`14d`|`30d`). A cache hit within that window is returned for
    **0 credits**.


    ## Responses

    Success returns `{ "data": …, "meta": { "requestId", … } }`. Errors return
    `{ "error": { "code", "message", "requestId" } }` with a matching HTTP
    status. `meta` on a scrape carries `creditsCharged`, `creditsRemaining`,
    `cached`, and (on a hit) `cachedAt`.


    ## Rate limits

    Requests are limited per team per minute; over the limit returns `429` with
    a `Retry-After` header.
servers:
  - url: https://api.scraperize.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Twitter
    description: Twitter / X scraping endpoints
  - name: Facebook
    description: Facebook scraping endpoints
  - name: Linkme
    description: Linkme (link.me) scraping endpoints
  - name: Amazon
    description: Amazon (creator shop / storefront) scraping endpoints
  - name: Linkbio
    description: Linkbio (lnk.bio) scraping endpoints
  - name: Pillar
    description: Pillar (pillar.io) scraping endpoints
  - name: Komi
    description: Komi (komi.io) scraping endpoints
  - name: Linktree
    description: Linktree (linktr.ee) scraping endpoints
  - name: Kick
    description: Kick (kick.com) scraping endpoints
  - name: Snapchat
    description: Snapchat (snapchat.com) scraping endpoints
  - name: Telegram
    description: Telegram (t.me) scraping endpoints
  - name: LinkedIn
    description: LinkedIn scraping endpoints
  - name: Twitch
    description: Twitch scraping endpoints
  - name: TikTok
    description: TikTok (tiktok.com) scraping endpoints
  - name: Instagram
    description: Instagram scraping endpoints
  - name: Lagos Life
    description: Lagos Life scraping endpoints
  - name: Bluesky
    description: Bluesky (bsky.app) scraping endpoints
  - name: Threads
    description: Threads (threads.com) scraping endpoints
  - name: Reddit
    description: Reddit (reddit.com) scraping endpoints
  - name: Rumble
    description: Rumble (rumble.com) scraping endpoints
  - name: Truth Social
    description: Truth Social (truthsocial.com) scraping endpoints
  - name: YouTube
    description: YouTube (youtube.com) scraping endpoints
paths:
  /v1/youtube/playlist:
    get:
      tags:
        - YouTube
      summary: Playlist videos
      description: >-
        Fetches the videos in a YouTube playlist, 100 per page, in the
        playlist's order. Each video has its position, id, URL, title, channel
        (id, handle, name, avatar, verified) and, for a collaboration, every
        credited channel; its views and publish time as YouTube lists them
        (rounded / relative), length, thumbnail and moving preview; and whether
        it is live now (with viewers), scheduled (start time, people waiting) or
        members-only. The response also describes the playlist on every page:
        title, full description and its links, kind (`playlist`, `podcast` or
        `course`), owner, video count, exact total views, when it was last
        updated, how many unavailable videos YouTube hides, whether it is
        unlisted, and its cover. Works for any public or unlisted playlist,
        including a channel's uploads (`UU…`), Shorts (`UUSH…`, one page of up
        to 100) and live (`UULV…`) lists. Pass the returned `cursor` back (with
        the same `playlistId`) for the next page. Private playlists and Mixes
        (`RD…`) return 404. Only publicly available data is returned.
      parameters:
        - name: playlistId
          in: query
          required: true
          description: >-
            The playlist id — the `list` value of a playlist URL
            (`youtube.com/playlist?list=<playlistId>`), e.g.
            `PL8mG-RkN2uTwcE8ceu8yAjExyRvw5DsA6`.
          schema:
            type: string
          example: PL8mG-RkN2uTwcE8ceu8yAjExyRvw5DsA6
        - name: cursor
          in: query
          required: false
          description: >-
            The `cursor` from the previous page, to get the next one. Omit for
            the first page.
          schema:
            type: string
        - name: cache_max_age
          in: query
          required: false
          description: >-
            Optional. Return a cached result if one this age or newer exists —
            served for **0 credits** with `meta.cached=true` and
            `meta.cachedAt`. Otherwise a fresh scrape runs (**1 credit**) and
            refreshes the cache. Omit to always scrape fresh.
          schema:
            type: string
            enum:
              - 1d
              - 3d
              - 7d
              - 14d
              - 30d
          example: 7d
      responses:
        '200':
          description: >-
            One page of the playlist's videos (empty when it has none), with the
            playlist itself.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      playlist:
                        type: object
                      videos:
                        type: array
                        items:
                          type: object
                      count:
                        type: integer
                      cursor:
                        type: string
                        nullable: true
                      hasMore:
                        type: boolean
                      fetchedAt:
                        type: string
                        format: date-time
                  meta:
                    type: object
                    description: >-
                      requestId + credit/caching metadata (creditsCharged,
                      creditsRemaining, cached, cachedAt).
                required:
                  - data
                  - meta
              example:
                data:
                  playlist:
                    id: PL8mG-RkN2uTwcE8ceu8yAjExyRvw5DsA6
                    url: >-
                      https://www.youtube.com/playlist?list=PL8mG-RkN2uTwcE8ceu8yAjExyRvw5DsA6
                    title: Secret Shopper
                    description: >-
                      We put your favourite tech companies to the test on how
                      well they handle the customer experience- from ordering
                      and shipping,  through to customer service and repair.
                      Then we rank them accordingly...
                    links: []
                    type: playlist
                    owner:
                      id: UCXuqSBlHAE6Xw-yeJA0Tunw
                      name: Linus Tech Tips
                      handle: LinusTechTips
                      url: https://www.youtube.com/@LinusTechTips
                      avatarUrl: >-
                        https://yt3.ggpht.com/gnvYLhXy8FAlPXZ2RTrkrgj-5kyt0vdE2FUGVOiKGdEZIa-wN5A-7nwZBlWJLzUMmoh1NWAU=s176-c-k-c0x00ffffff-no-rj
                    videoCount: 24
                    videoCountText: 24 videos
                    viewCount: 80081
                    lastUpdatedAt: '2026-06-18'
                    lastUpdatedText: Last updated on Jun 18, 2026
                    unavailableVideoCount: 0
                    isUnlisted: false
                    thumbnailUrl: >-
                      https://i.ytimg.com/vi/Clrj_lSDvzQ/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLC1C0WNOwIT4majHh4P8uYoWRCYcA&days_since_epoch=20762
                    thumbnails:
                      - url: >-
                          https://i.ytimg.com/vi/Clrj_lSDvzQ/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLC1C0WNOwIT4majHh4P8uYoWRCYcA&days_since_epoch=20762
                        width: 480
                        height: 270
                      - url: >-
                          https://i.ytimg.com/vi/Clrj_lSDvzQ/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCrh-P4qrYyxRGOanGZ3z8bor82tg
                        width: 336
                        height: 188
                      - url: >-
                          https://i.ytimg.com/vi/Clrj_lSDvzQ/hqdefault.jpg?sqp=-oaymwEXCPYBEIoBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLAwy2nm2gc1fK1D6EROd3UkUApgsg
                        width: 246
                        height: 138
                  videos:
                    - position: 1
                      id: Clrj_lSDvzQ
                      url: https://www.youtube.com/watch?v=Clrj_lSDvzQ
                      title: Buying a Gaming PC at Best Buy – How Bad is it?
                      channel:
                        id: UCXuqSBlHAE6Xw-yeJA0Tunw
                        name: Linus Tech Tips
                        handle: LinusTechTips
                        url: https://www.youtube.com/@LinusTechTips
                        avatarUrl: >-
                          https://yt3.ggpht.com/gnvYLhXy8FAlPXZ2RTrkrgj-5kyt0vdE2FUGVOiKGdEZIa-wN5A-7nwZBlWJLzUMmoh1NWAU=s68-c-k-c0x00ffffff-no-rj
                        isVerified: true
                        isOfficialArtist: false
                      collaborators: []
                      viewCount: 4600000
                      viewCountText: 4.6M views
                      publishedText: 10 years ago
                      durationSeconds: 492
                      durationText: '8:12'
                      isLive: false
                      concurrentViewers: null
                      isUpcoming: false
                      scheduledStartAt: null
                      waitingCount: null
                      isMembersOnly: false
                      isShort: false
                      badges: []
                      thumbnailUrl: >-
                        https://i.ytimg.com/vi/Clrj_lSDvzQ/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDmSlpYYvU0A7q7PA0afkVQSDjxEg
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/Clrj_lSDvzQ/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDmSlpYYvU0A7q7PA0afkVQSDjxEg
                          width: 336
                          height: 188
                        - url: >-
                            https://i.ytimg.com/vi/Clrj_lSDvzQ/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLD4Um-fY75diia12MI1Tv6dwPFRRA
                          width: 246
                          height: 138
                        - url: >-
                            https://i.ytimg.com/vi/Clrj_lSDvzQ/hqdefault.jpg?sqp=-oaymwEbCMQBEG5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLDI7TIXHrcs_T7Ik83oy9zB2KHc8A
                          width: 196
                          height: 110
                      frameUrl: null
                    - position: 2
                      id: rzpYkpZX8qw
                      url: https://www.youtube.com/watch?v=rzpYkpZX8qw
                      title: >-
                        Are PC Manufacturers Ripping You Off? - $1500 Gaming PC
                        Secret Shopper Part 1
                      channel:
                        id: UCXuqSBlHAE6Xw-yeJA0Tunw
                        name: Linus Tech Tips
                        handle: LinusTechTips
                        url: https://www.youtube.com/@LinusTechTips
                        avatarUrl: >-
                          https://yt3.ggpht.com/gnvYLhXy8FAlPXZ2RTrkrgj-5kyt0vdE2FUGVOiKGdEZIa-wN5A-7nwZBlWJLzUMmoh1NWAU=s68-c-k-c0x00ffffff-no-rj
                        isVerified: true
                        isOfficialArtist: false
                      collaborators: []
                      viewCount: 4300000
                      viewCountText: 4.3M views
                      publishedText: 7 years ago
                      durationSeconds: 1467
                      durationText: '24:27'
                      isLive: false
                      concurrentViewers: null
                      isUpcoming: false
                      scheduledStartAt: null
                      waitingCount: null
                      isMembersOnly: false
                      isShort: false
                      badges: []
                      thumbnailUrl: >-
                        https://i.ytimg.com/vi/rzpYkpZX8qw/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBvN2JdFXKSi2fsSJ4RQGeDrbdq0w
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/rzpYkpZX8qw/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBvN2JdFXKSi2fsSJ4RQGeDrbdq0w
                          width: 336
                          height: 188
                        - url: >-
                            https://i.ytimg.com/vi/rzpYkpZX8qw/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDB2X9BthLGbgIYwtitgHjePK3tJw
                          width: 246
                          height: 138
                        - url: >-
                            https://i.ytimg.com/vi/rzpYkpZX8qw/hqdefault.jpg?sqp=-oaymwEbCMQBEG5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBVUBB3uLJCXGu7zQA-n9WZWbgMZg
                          width: 196
                          height: 110
                      frameUrl: null
                    - position: 3
                      id: yGoCMDrzCq0
                      url: https://www.youtube.com/watch?v=yGoCMDrzCq0
                      title: >-
                        What did we BUY?? - $1500 Gaming PC Secret Shopper Part
                        2
                      channel:
                        id: UCXuqSBlHAE6Xw-yeJA0Tunw
                        name: Linus Tech Tips
                        handle: LinusTechTips
                        url: https://www.youtube.com/@LinusTechTips
                        avatarUrl: >-
                          https://yt3.ggpht.com/gnvYLhXy8FAlPXZ2RTrkrgj-5kyt0vdE2FUGVOiKGdEZIa-wN5A-7nwZBlWJLzUMmoh1NWAU=s68-c-k-c0x00ffffff-no-rj
                        isVerified: true
                        isOfficialArtist: false
                      collaborators: []
                      viewCount: 3500000
                      viewCountText: 3.5M views
                      publishedText: 7 years ago
                      durationSeconds: 1734
                      durationText: '28:54'
                      isLive: false
                      concurrentViewers: null
                      isUpcoming: false
                      scheduledStartAt: null
                      waitingCount: null
                      isMembersOnly: false
                      isShort: false
                      badges: []
                      thumbnailUrl: >-
                        https://i.ytimg.com/vi/yGoCMDrzCq0/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLClu02kkxUmgbE9l-Z5w-_7TSt71Q
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/yGoCMDrzCq0/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLClu02kkxUmgbE9l-Z5w-_7TSt71Q
                          width: 336
                          height: 188
                        - url: >-
                            https://i.ytimg.com/vi/yGoCMDrzCq0/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLA11wNqTSnAU-3ZlcAJGfMA0UMOZQ
                          width: 246
                          height: 138
                        - url: >-
                            https://i.ytimg.com/vi/yGoCMDrzCq0/hqdefault.jpg?sqp=-oaymwEbCMQBEG5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLC4kRGLCj-Y43fpnU8c89Wib5nWsw
                          width: 196
                          height: 110
                      frameUrl: null
                  count: 24
                  cursor: null
                  hasMore: false
                  fetchedAt: '2026-11-05T13:52:13.155Z'
                meta:
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
                  creditsCharged: 1
                  creditsRemaining: 4999
                  cached: false
        '400':
          description: Invalid or expired cursor (or one for another playlist).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: BAD_REQUEST
                  message: The request was invalid.
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
        '401':
          description: Missing, invalid, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: UNAUTHORIZED
                  message: API key required — pass it in the `x-api-key` header.
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
        '402':
          description: Not enough credits for this request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: INSUFFICIENT_CREDITS
                  message: >-
                    This request costs 1 credit, but your balance is 0. Top up
                    to continue.
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
        '404':
          description: >-
            No YouTube playlist found (it may not exist, be private, or be a
            Mix).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: NOT_FOUND
                  message: >-
                    The requested content was not found (it may not exist, be
                    deleted, or be private).
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
        '422':
          description: Invalid query parameters (playlistId is required).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: VALIDATION_ERROR
                  message: Request validation failed
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
                  details:
                    - path: url
                      message: url is required
        '429':
          description: Over the per-minute rate limit — honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: RATE_LIMITED
                  message: >-
                    Rate limit exceeded — max 100 requests per 60s. Retry in
                    ~30s.
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
        '503':
          description: >-
            Temporarily unavailable — retry after `Retry-After`. `error.code`
            tells you why: `UPSTREAM_BLOCKED` (the source blocked this request),
            `EXTRACTION_FAILED` (the source returned unexpected data),
            `PLATFORM_UNAVAILABLE` (the source is down), or
            `SERVICE_UNAVAILABLE` (we are at capacity).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: UPSTREAM_BLOCKED
                  message: >-
                    The source is temporarily unavailable. Please try again
                    shortly.
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: NOT_FOUND
            message:
              type: string
              example: The requested content was not found.
            requestId:
              type: string
              example: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
            details:
              type: array
              items:
                type: object
              description: Present on validation errors.
          required:
            - code
            - message
            - requestId
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your API key. Send it in the `x-api-key` header (or `Authorization:
        Bearer <key>`). Create and manage keys from your dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.