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

# Get Video play data



## OpenAPI

````yaml https://video.bunnycdn.com/openapi/bunnynet-video-api.public.json get /library/{libraryId}/videos/{videoId}/play
openapi: 3.0.0
info:
  title: Stream API
  termsOfService: https://bunny.net/tos
  contact:
    name: bunny.net
    url: https://docs.bunny.net
    email: support@bunny.net
  version: 1.5.5
servers:
  - url: https://video.bunnycdn.com
security: []
tags:
  - name: Manage Collections
  - name: Manage Videos
paths:
  /library/{libraryId}/videos/{videoId}/play:
    get:
      tags:
        - Manage Videos
      summary: Get Video play data
      operationId: Video_GetVideoPlayData
      parameters:
        - name: libraryId
          in: path
          required: true
          schema:
            type: integer
            format: int64
          x-position: 1
        - name: videoId
          in: path
          required: true
          schema:
            type: string
          x-position: 2
        - name: token
          in: query
          schema:
            type: string
            default: ''
            nullable: true
          x-position: 3
        - name: expires
          in: query
          schema:
            type: integer
            format: int64
            default: 0
          x-position: 4
      responses:
        '200':
          description: The play data of the requested video
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoPlayDataModel'
        '401':
          description: The request authentication failed
        '404':
          description: The requested video was not found
        '500':
          description: Internal Server Error
components:
  schemas:
    VideoPlayDataModel:
      type: object
      additionalProperties: false
      properties:
        video:
          description: Video data.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/VideoModel'
        libraryName:
          type: string
          nullable: true
        captionsPath:
          type: string
          nullable: true
        seekPath:
          type: string
          nullable: true
        thumbnailUrl:
          type: string
          nullable: true
        fallbackUrl:
          type: string
          nullable: true
        videoPlaylistUrl:
          type: string
          nullable: true
        originalUrl:
          type: string
          nullable: true
        previewUrl:
          type: string
          nullable: true
        controls:
          type: string
          nullable: true
        enableDRM:
          type: boolean
        drmVersion:
          type: integer
          format: int32
        playerKeyColor:
          type: string
          nullable: true
        vastTagUrl:
          type: string
          nullable: true
        viAiPublisherId:
          type: string
          nullable: true
        captionsFontSize:
          type: integer
          format: int32
        captionsFontColor:
          type: string
          nullable: true
        captionsBackground:
          type: string
          nullable: true
        uiLanguage:
          type: string
          nullable: true
        allowEarlyPlay:
          type: boolean
        tokenAuthEnabled:
          type: boolean
        enableMP4Fallback:
          type: boolean
        showHeatmap:
          type: boolean
        fontFamily:
          type: string
          nullable: true
        playbackSpeeds:
          type: string
          nullable: true
        widevineMinClientSecurityLevel:
          type: integer
          format: int32
          nullable: true
        zoneTier:
          type: integer
          format: int32
          nullable: true
        isPlayable:
          type: boolean
          description: >-
            Determines if the video is currently playable using either playlist
            or original source.
        isPlaylistPlayable:
          type: boolean
          description: Determines if the HLS playlist is currently playable.
        preferredPlaybackSource:
          description: Preferred playback source for the current video state.
          oneOf:
            - $ref: '#/components/schemas/VideoPlaybackSource'
        rememberPlayerPosition:
          type: boolean
        customCss:
          type: string
          nullable: true
        exposeVideoMetadata:
          type: boolean
        enableCompactControls:
          type: boolean
    VideoModel:
      type: object
      additionalProperties: false
      required:
        - videoLibraryId
        - guid
        - title
        - dateUploaded
        - views
        - isPublic
        - length
        - status
        - framerate
        - width
        - height
        - outputCodecs
        - thumbnailCount
        - encodeProgress
        - storageSize
        - hasMP4Fallback
        - averageWatchTime
        - totalWatchTime
      properties:
        videoLibraryId:
          type: integer
          description: The ID of the video library that the video belongs to
          format: int64
        guid:
          type: string
          description: The unique ID of the video
          minLength: 1
        title:
          type: string
          description: The title of the video
          minLength: 1
        description:
          type: string
          description: The description of the video
          nullable: true
        dateUploaded:
          type: string
          description: The date when the video was uploaded
          format: date-time
          minLength: 1
        views:
          type: integer
          description: The number of views the video received
          format: int64
        isPublic:
          type: boolean
          description: Determines if the video is publically accessible
        length:
          type: integer
          description: The duration of the video in seconds
          format: int32
        status:
          description: The status of the video. See VideoModelStatus.
          oneOf:
            - $ref: '#/components/schemas/VideoModelStatus'
        framerate:
          type: number
          description: The framerate of the video
          format: double
        rotation:
          type: integer
          description: The rotation of the video
          nullable: true
        width:
          type: integer
          description: The width of the original video file
          format: int32
        height:
          type: integer
          description: The height of the original video file
          format: int32
        availableResolutions:
          type: string
          description: The available resolutions of the video
          nullable: true
        outputCodecs:
          type: string
          description: Encoded output codecs of the video
          minLength: 1
        thumbnailCount:
          type: integer
          description: The number of thumbnails generated for this video
          format: int32
        encodeProgress:
          type: integer
          description: The current encode progress of the video
          format: int32
        storageSize:
          type: integer
          description: The amount of storage used by this video
          format: int64
        captions:
          type: array
          description: The list of captions available for the video
          nullable: true
          items:
            $ref: '#/components/schemas/CaptionModel'
        hasMP4Fallback:
          type: boolean
          description: Determines if the video has MP4 fallback files generated
        collectionId:
          type: string
          description: The ID of the collection where the video belongs
          nullable: true
        thumbnailFileName:
          type: string
          description: The file name of the thumbnail inside of the storage
          nullable: true
        thumbnailBlurhash:
          type: string
          description: >-
            Thumbnail blurhash to show while the actual thumbnail is being
            loaded
          nullable: true
        averageWatchTime:
          type: integer
          description: The average watch time of the video in seconds
          format: int64
        totalWatchTime:
          type: integer
          description: The total video watch time in seconds
          format: int64
        category:
          type: string
          description: The automatically detected category of the video
          nullable: true
        chapters:
          type: array
          description: The list of chapters available for the video
          nullable: true
          items:
            $ref: '#/components/schemas/ChapterModel'
        moments:
          type: array
          description: The list of moments available for the video
          nullable: true
          items:
            $ref: '#/components/schemas/MomentModel'
        metaTags:
          type: array
          description: The list of meta tags that have been added to the video
          nullable: true
          items:
            $ref: '#/components/schemas/MetaTagModel'
        transcodingMessages:
          type: array
          description: >-
            The list of transcoding messages that describe potential issues
            while the video was transcoding
          nullable: true
          items:
            $ref: '#/components/schemas/TranscodingMessageModel'
        jitEncodingEnabled:
          type: boolean
          nullable: true
        smartGenerateStatus:
          description: >-
            Aggregate smart generate status derived from per-feature statuses
            when present: InProgress, then Queued, then Failed, then Finished;
            otherwise the stored legacy value. See SmartGenerateFeaturesStatus.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/SmartGenerateStatus'
        smartGenerateFeaturesStatus:
          description: >-
            Per-feature smart generate statuses (title, description, chapters,
            moments). Null for a feature on legacy rows.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/SmartGenerateFeaturesStatusModel'
        hasOriginal:
          type: boolean
          description: Determines if video has the original file available in storage
          nullable: true
        originalHash:
          type: string
          description: Original uploaded file SHA256 hash
          nullable: true
        hasHighQualityPreview:
          type: boolean
          nullable: true
    VideoPlaybackSource:
      type: string
      description: ''
      oneOf:
        - title: None
          type: string
          enum:
            - None
        - title: Playlist
          type: string
          enum:
            - Playlist
        - title: Original
          type: string
          enum:
            - Original
    VideoModelStatus:
      type: integer
      description: ''
      oneOf:
        - title: Created
          type: integer
          enum:
            - 0
        - title: Uploaded
          type: integer
          enum:
            - 1
        - title: Processing
          type: integer
          enum:
            - 2
        - title: Transcoding
          type: integer
          enum:
            - 3
        - title: Finished
          type: integer
          enum:
            - 4
        - title: Error
          type: integer
          enum:
            - 5
        - title: UploadFailed
          type: integer
          enum:
            - 6
        - title: JitSegmenting
          type: integer
          enum:
            - 7
        - title: JitPlaylistsCreated
          type: integer
          enum:
            - 8
    CaptionModel:
      type: object
      additionalProperties: false
      properties:
        srclang:
          type: string
          description: The unique srclang shortcode for the caption
          nullable: true
        label:
          type: string
          description: The text description label for the caption
          nullable: true
        version:
          type: integer
          format: int32
    ChapterModel:
      type: object
      additionalProperties: false
      required:
        - title
      properties:
        title:
          type: string
          description: The title of the chapter
          minLength: 1
        start:
          type: integer
          description: The start time of the chapter in seconds
          format: int32
        end:
          type: integer
          description: The end time of the chapter in seconds
          format: int32
    MomentModel:
      type: object
      additionalProperties: false
      required:
        - label
      properties:
        label:
          type: string
          description: The text description label for the chapter
          minLength: 1
        timestamp:
          type: integer
          description: The timestamp of the moment in seconds
          format: int32
    MetaTagModel:
      type: object
      additionalProperties: false
      properties:
        property:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
    TranscodingMessageModel:
      type: object
      additionalProperties: false
      properties:
        timeStamp:
          type: string
          format: date-time
        level:
          $ref: '#/components/schemas/Severity'
        issueCode:
          $ref: '#/components/schemas/IssueCodes'
        message:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
    SmartGenerateStatus:
      type: integer
      description: ''
      oneOf:
        - title: None
          type: integer
          enum:
            - 0
        - title: Queued
          type: integer
          enum:
            - 1
        - title: InProgress
          type: integer
          enum:
            - 2
        - title: Finished
          type: integer
          enum:
            - 3
        - title: Failed
          type: integer
          enum:
            - 4
    SmartGenerateFeaturesStatusModel:
      type: object
      additionalProperties: false
      properties:
        title:
          description: Smart generate status for the video title, when applicable.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/SmartGenerateStatus'
        description:
          description: Smart generate status for the video description, when applicable.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/SmartGenerateStatus'
        chapters:
          description: Smart generate status for chapters, when applicable.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/SmartGenerateStatus'
        moments:
          description: Smart generate status for moments, when applicable.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/SmartGenerateStatus'
    Severity:
      type: integer
      description: ''
      oneOf:
        - title: Undefined
          type: integer
          description: Shouldn't be used
          enum:
            - 0
        - title: Information
          type: integer
          description: An info message to the user, shouldn't break anythying
          enum:
            - 1
        - title: Warning
          type: integer
          description: >-
            A warning message, for example that the transcoded video may break
            when playing
          enum:
            - 2
        - title: Error
          type: integer
          description: An error, meaning that the video will most likely not be playable
          enum:
            - 3
    IssueCodes:
      type: integer
      description: ''
      oneOf:
        - title: Undefined
          type: integer
          description: Shouldn't be used
          enum:
            - 0
        - title: StreamLengthsDifference
          type: integer
          description: >-
            Marks that there is a mismatch between lengths of audio and video
            streams in the transcoded file
          enum:
            - 1
        - title: TranscodingWarnings
          type: integer
          description: Marks that transcoding completed with warnings
          enum:
            - 2
        - title: IncompatibleResolution
          type: integer
          description: >-
            Marks that original video file has incompatible resolution or isn't
            a video stream
          enum:
            - 3
        - title: InvalidFramerate
          type: integer
          description: Marks that original video file has invalid framerate
          enum:
            - 4
        - title: VideoExceededMaxDuration
          type: integer
          description: Marks that video stream exceeded max duration
          enum:
            - 5
        - title: AudioExceededMaxDuration
          type: integer
          description: Marks that audio stream exceeded max duration
          enum:
            - 6
        - title: OriginalCorrupted
          type: integer
          description: >-
            Marks that video file is corrupted and couldn't be processed
            properly
          enum:
            - 7
        - title: TranscriptionFailed
          type: integer
          description: >-
            Marks that video transcription finished with errors and might not be
            complete
          enum:
            - 8
        - title: JitIncompatible
          type: integer
          description: Marks that video file is not compatible with JIT encoding
          enum:
            - 9
        - title: JitFailed
          type: integer
          description: Marks that video failed JIT encoding
          enum:
            - 10
        - title: CaptionGenerationFailed
          type: integer
          description: Marks that captions generation failed
          enum:
            - 11

````