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

# Get playlist

> Returns a playlist details



## OpenAPI

````yaml /api-reference/services_docs_mintlify_enriched/streaming_api.yaml get /streaming/playlists/{playlist_id}
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Streaming API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: a530a0309a3f
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: AI
  - name: Broadcasts
  - name: Directories
  - name: Overlays
  - name: Players
  - name: Playlists
  - name: QualitySets
  - name: Restreams
  - name: Statistics
  - name: Streams
  - name: Subtitles
  - name: Videos
paths:
  /streaming/playlists/{playlist_id}:
    get:
      tags:
        - Playlists
      summary: Get playlist
      description: Returns a playlist details
      operationId: get_playlists_id
      parameters:
        - name: playlist_id
          in: path
          description: >-
            Playlist ID.   

            IDs of all created playlists can be received via Get All Playlists
            request
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/playlistDetails'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            playlist = client.streaming.playlists.get(
                0,
            )
            print(playlist.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tplaylist, err := client.Streaming.Playlists.Get(context.TODO(), 0)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", playlist.ID)\n}\n"
components:
  schemas:
    playlistDetails:
      allOf:
        - $ref: '#/components/schemas/playlist'
        - properties:
            id:
              type: integer
              description: Playlist ID
            iframe_embed_code:
              type: string
              description: >-
                Ready-to-use HTML `<iframe>` snippet embedding the playlist
                player
      example:
        id: 10050
        name: Playlist - playlist2
        client_id: 102748
        active: true
        start_time: '2024-06-17T11:56:00.000Z'
        loop: true
        video_ids:
          - 5528796
          - 5268174
          - 5065017
        client_user_id: null
        ad_id: null
        player_id: null
        countdown: false
        playlist_type: live
        hls_cmaf_url: https://102748.gvideo.io/playlists/102748_10050/master-cmaf.m3u8
        iframe_embed_code: >-
          <iframe width="560" height="315"
          src="https://player.gvideo.co/playlists/102748_10050" frameborder="0"
          allowfullscreen></iframe>
        iframe_url: https://player.gvideo.co/playlists/102748_10050
        hls_url: https://102748.gvideo.io/playlists/102748_10050/master.m3u8
    playlist:
      allOf:
        - $ref: '#/components/schemas/createPlaylist'
        - properties:
            client_id:
              type: integer
              description: Current playlist client ID
            hls_url:
              type: string
              description: >-
                A URL to a master playlist HLS (master.m3u8) with MPEG TS
                container.
                  


                This URL is a link to the main manifest. But you can also
                manually specify suffix-options that will allow you to change
                the manifest to your request:


                ```/playlists/{client_id}_{playlist_id}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8```

                Please see the details in ```hls_url``` attribute of
                /videos/{id} method.
                  


                Caution. Solely master.m3u8 (and master[-options].m3u8) is
                officially documented and intended for your use. Any additional
                internal manifests, sub-manifests, parameters, chunk names, file
                extensions, and related components are internal infrastructure
                entities. These may undergo modifications without prior notice,
                in any manner or form. It is strongly advised not to store them
                in your database or cache them on your end.
            hls_cmaf_url:
              type: string
              description: >-
                A URL to a master playlist HLS (master-cmaf.m3u8) with
                CMAF-based chunks. Chunks are in fMP4 container.
                  


                It is possible to use the same suffix-options as described in
                the "hls_url" attribute.
                  


                Caution. Solely master.m3u8 (and master[-options].m3u8) is
                officially documented and intended for your use. Any additional
                internal manifests, sub-manifests, parameters, chunk names, file
                extensions, and related components are internal infrastructure
                entities. These may undergo modifications without prior notice,
                in any manner or form. It is strongly advised not to store them
                in your database or cache them on your end.
            iframe_url:
              type: string
              description: >-
                A URL to a built-in HTML video player with the video inside. It
                can be inserted into an iframe on your website and the video
                will automatically play in all browsers.


                The player can be opened or shared via this direct link. Also
                the video player can be integrated into your web pages using the
                Iframe tag.

                  


                Please see the details in ```iframe_url``` attribute of
                /videos/{id} method.
    createPlaylist:
      type: object
      properties:
        name:
          type: string
          description: Playlist name
        active:
          type: boolean
          default: true
          description: |-
            Enables/Disables playlist. Has two possible values:
            - true – Playlist can be played.
            - false – Playlist is disabled. No broadcast while it's disabled.
        start_time:
          type: string
          default: null
          description: >-
            Playlist start time. Playlist won't be available before the
            specified time. Datetime in ISO 8601 format.
        loop:
          type: boolean
          default: false
          description: Enables/Disables playlist loop
        video_ids:
          type: array
          description: |-
            A list of VOD IDs included in the playlist. Order of videos in a
            playlist reflects the order of IDs in the array.

            Maximum video limit = 128.
          items:
            type: integer
        client_user_id:
          type: integer
          description: Custom field where you can specify user ID in your system
        ad_id:
          type: integer
          description: The advertisement ID that will be inserted into the video
        player_id:
          type: integer
          description: The player ID with which the video will be played
        countdown:
          type: boolean
          description: >-
            Enables countdown before playlist start with ```playlist_type:
            live```
        playlist_type:
          type: string
          enum:
            - live
            - vod
          description: |-
            Determines whether the playlist:
             - `live` - playlist for live-streaming
             - `vod` - playlist is for video on demand access
      example:
        name: >-
          Playlist: Webinar 'Onboarding for new employees on working with the
          corporate portal'
        active: true
        start_time: '2024-07-01T11:00:00Z'
        loop: false
        video_ids:
          - 17800
          - 17801
        client_user_id: 2876
        countdown: true
        playlist_type: live
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234_abcdef`
      type: apiKey
      in: header
      name: Authorization

````