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

# Get a transcript

> Returns the transcript of a video or audio link. Waits up to 25 seconds; if the transcript isn't ready by then, returns 202 with a jobId to poll at GET /v1/transcript/{jobId}. The same url, lang and mode within an hour returns the same job and is charged once.



## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/transcript
openapi: 3.1.0
info:
  title: Video Transcript API
  version: '1.0'
  description: >-
    Transcripts of YouTube, Instagram, Facebook, X and LinkedIn videos and of
    audio or video files.
servers:
  - url: https://app.bestvideotranscriptapi.com
security:
  - apiKey: []
  - bearer: []
paths:
  /v1/transcript:
    get:
      summary: Get a transcript
      description: >-
        Returns the transcript of a video or audio link. Waits up to 25 seconds;
        if the transcript isn't ready by then, returns 202 with a jobId to poll
        at GET /v1/transcript/{jobId}. The same url, lang and mode within an
        hour returns the same job and is charged once.
      operationId: getTranscript
      parameters:
        - name: url
          in: query
          required: true
          description: >-
            A YouTube link or 11-character video ID, an Instagram reel, a
            Facebook reel or video, an X post (add /video/<n> for its nth
            video), a LinkedIn post, or a public http(s) link to an audio or
            video file, including the url from POST /v1/uploads.
          schema:
            type: string
          example: https://www.youtube.com/watch?v=jNQXAC9IVRw
        - $ref: '#/components/parameters/Lang'
        - name: mode
          in: query
          description: >-
            auto: captions, falling back to AI transcription when there are
            none. native: captions only. generate: always AI-transcribe the
            audio.
          schema:
            type: string
            enum:
              - auto
              - native
              - generate
            default: auto
        - $ref: '#/components/parameters/Text'
      responses:
        '200':
          description: The transcript.
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transcript'
        '202':
          description: Still working. Poll GET /v1/transcript/{jobId}.
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
            Retry-After:
              description: Seconds to wait before polling (30).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - jobId
                properties:
                  jobId:
                    type: string
                    example: run_cmh2x8k0a00fz2
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '402':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '502':
          $ref: '#/components/responses/Error'
components:
  parameters:
    Lang:
      name: lang
      in: query
      description: >-
        A language code like en or es-US. Picks the caption track; for AI
        transcription it's a hint for the spoken language. Leave it out to
        detect the language.
      schema:
        type: string
    Text:
      name: text
      in: query
      description: true returns content as one string instead of timed segments.
      schema:
        type: string
        enum:
          - 'true'
          - 'false'
        default: 'false'
  headers:
    RequestId:
      description: This request's ID. Quote it to support.
      schema:
        type: string
  schemas:
    Transcript:
      type: object
      required:
        - content
        - lang
        - availableLangs
        - platform
      properties:
        content:
          description: Timed segments, or one string with text=true.
          oneOf:
            - type: array
              items:
                $ref: '#/components/schemas/Segment'
            - type: string
        lang:
          type: string
          description: The transcript's language.
        availableLangs:
          type: array
          items:
            type: string
          description: The caption languages the video has.
        platform:
          type: string
          enum:
            - youtube
            - instagram
            - facebook
            - x
            - linkedin
            - file
        note:
          type: string
          description: Present for a post with more than one video.
    Segment:
      type: object
      required:
        - text
        - offset
        - duration
        - lang
      properties:
        text:
          type: string
        offset:
          type: integer
          description: Start, in milliseconds.
        duration:
          type: integer
          description: Length, in milliseconds.
        lang:
          type: string
    Error:
      type: object
      required:
        - code
        - message
        - requestId
      properties:
        code:
          type: string
          enum:
            - UNAUTHENTICATED
            - INVALID_REQUEST
            - UNSUPPORTED_PLATFORM
            - NOT_A_VIDEO
            - VIDEO_UNAVAILABLE
            - MEDIA_NOT_FOUND
            - CAPTIONS_UNAVAILABLE
            - LANGUAGE_NOT_AVAILABLE
            - NO_SPEECH_FOUND
            - FILE_TOO_LARGE
            - VIDEO_TOO_LONG
            - LIVE_STREAM
            - AI_HOURS_EXHAUSTED
            - CAPTIONS_LIMIT_REACHED
            - RATE_LIMITED
            - JOB_NOT_FOUND
            - UPSTREAM_FAILURE
        message:
          type: string
        requestId:
          type: string
        availableLangs:
          type: array
          items:
            type: string
        durationSeconds:
          type: number
        maxDurationSeconds:
          type: number
        sizeBytes:
          type: number
        maxSizeBytes:
          type: number
        aiMinutesNeeded:
          type: integer
        aiMinutesRemaining:
          type: integer
        refillsAt:
          type: string
          format: date-time
        billingUrl:
          type: string
  responses:
    Error:
      description: An error. See the Errors page for every code.
      headers:
        x-request-id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                $ref: '#/components/schemas/Error'
    RateLimited:
      description: Over your plan's requests per second.
      headers:
        x-request-id:
          $ref: '#/components/headers/RequestId'
        Retry-After:
          description: Seconds to wait.
          schema:
            type: string
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
    bearer:
      type: http
      scheme: bearer

````

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