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

# Get transcript from any supported video URL

> Supports YouTube, TikTok, Instagram, X (Twitter), Facebook. Mode 'native' fetches existing captions, 'auto' tries native then falls back to AI generation, 'generate' always uses whisper.cpp.



## OpenAPI

````yaml /openapi.json get /v1/transcript
openapi: 3.1.0
info:
  title: urltodata.ai
  description: >-
    API for extracting transcripts, metadata, and structured data from YouTube,
    TikTok, Instagram, X (Twitter), Facebook, and the web.
  version: 0.1.0
servers:
  - url: https://api.urltodata.ai
    description: Production API
security:
  - bearerAuth: []
paths:
  /v1/transcript:
    get:
      summary: Get transcript from any supported video URL
      description: >-
        Supports YouTube, TikTok, Instagram, X (Twitter), Facebook. Mode
        'native' fetches existing captions, 'auto' tries native then falls back
        to AI generation, 'generate' always uses whisper.cpp.
      operationId: getTranscript
      parameters:
        - name: url
          in: query
          required: true
          description: Video URL
          schema:
            type: string
            format: uri
        - name: lang
          in: query
          description: Language code
          schema:
            type: string
        - name: text
          in: query
          description: Return plain text instead of chunks
          schema:
            type: boolean
        - name: chunkSize
          in: query
          description: Max chars per chunk (50-10000)
          schema:
            type: integer
            minimum: 50
            maximum: 10000
        - name: mode
          in: query
          description: Transcript retrieval mode
          schema:
            type: string
            enum:
              - native
              - auto
              - generate
            default: auto
      responses:
        '200':
          description: Transcript (sync)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transcript'
        '202':
          description: Job created (async)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobId'
components:
  schemas:
    Transcript:
      type: object
      properties:
        content:
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/TranscriptChunk'
        lang:
          type: string
        availableLangs:
          type: array
          items:
            type: string
    JobId:
      type: object
      properties:
        jobId:
          type: string
    TranscriptChunk:
      type: object
      properties:
        text:
          type: string
        offset:
          type: integer
          description: Offset in milliseconds
        duration:
          type: integer
          description: Duration in milliseconds
        lang:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-default: your-api-key
      description: API key as Bearer token (e.g. Bearer mp_abc123_secret)

````