YouTube Transcriber logoYouTube Transcriber
API Reference

Get a video transcript

Extract the transcript for a YouTube video.

Quick example

curl "https://getyoutubetranscriber.com/api/v2/transcript?video_url=dQw4w9WgXcQ" \
  -H "Authorization: Bearer ytt_your_key_here"

Full parameter list, response schema, and try-it samples in every language are below.


GET
/api/v2/transcript
AuthorizationBearer <token>

Send your API key as Authorization: Bearer <api_key>.

In: header

Query Parameters

video_urlstring

YouTube video ID or any URL form.

Length1 <= length <= 2048
format?string

Response in json or text.

Default"json"
Value in"json" | "text"
include_timestamp?string

Include start time and duration on each segment.

Default"true"
send_metadata?string

Include video title, channel, and thumbnail in a metadata field. Defaults to true; the metadata is already fetched to produce the transcript so this costs no extra credits or upstream calls. Set false to shrink the response by ~150 bytes.

Default"true"
lang?string

Caption language code (e.g. 'fr', 'pt-BR'). Defaults to the video's original track.

Match^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})*$
Lengthlength <= 16

Response Body

curl -X GET "http://localhost:3011/api/v2/transcript?video_url=dQw4w9WgXcQ&format=json&include_timestamp=true&send_metadata=true&lang=fr"
{
  "video_id": "string",
  "language": "string",
  "transcript": [
    {
      "text": "We're no strangers to love",
      "start": 18640,
      "duration": 3240
    }
  ],
  "metadata": {
    "title": "string",
    "author_name": "string",
    "author_url": "string",
    "thumbnail_url": "string"
  }
}
{
  "type": "https://getyoutubetranscriber.com/api/errors/validation",
  "title": "Validation failed",
  "status": 422,
  "detail": "video_url is required",
  "instance": "/api/v2/transcript",
  "request_id": "req_01J0XYZ...",
  "code": "E_VALIDATION",
  "errors": [
    {
      "field": "string",
      "code": "string",
      "message": "string"
    }
  ],
  "retry_after": 0
}
{
  "type": "https://getyoutubetranscriber.com/api/errors/validation",
  "title": "Validation failed",
  "status": 422,
  "detail": "video_url is required",
  "instance": "/api/v2/transcript",
  "request_id": "req_01J0XYZ...",
  "code": "E_VALIDATION",
  "errors": [
    {
      "field": "string",
      "code": "string",
      "message": "string"
    }
  ],
  "retry_after": 0
}
{
  "type": "https://getyoutubetranscriber.com/api/errors/validation",
  "title": "Validation failed",
  "status": 422,
  "detail": "video_url is required",
  "instance": "/api/v2/transcript",
  "request_id": "req_01J0XYZ...",
  "code": "E_VALIDATION",
  "errors": [
    {
      "field": "string",
      "code": "string",
      "message": "string"
    }
  ],
  "retry_after": 0
}
{
  "type": "https://getyoutubetranscriber.com/api/errors/validation",
  "title": "Validation failed",
  "status": 422,
  "detail": "video_url is required",
  "instance": "/api/v2/transcript",
  "request_id": "req_01J0XYZ...",
  "code": "E_VALIDATION",
  "errors": [
    {
      "field": "string",
      "code": "string",
      "message": "string"
    }
  ],
  "retry_after": 0
}
{
  "type": "https://getyoutubetranscriber.com/api/errors/validation",
  "title": "Validation failed",
  "status": 422,
  "detail": "video_url is required",
  "instance": "/api/v2/transcript",
  "request_id": "req_01J0XYZ...",
  "code": "E_VALIDATION",
  "errors": [
    {
      "field": "string",
      "code": "string",
      "message": "string"
    }
  ],
  "retry_after": 0
}
{
  "type": "https://getyoutubetranscriber.com/api/errors/validation",
  "title": "Validation failed",
  "status": 422,
  "detail": "video_url is required",
  "instance": "/api/v2/transcript",
  "request_id": "req_01J0XYZ...",
  "code": "E_VALIDATION",
  "errors": [
    {
      "field": "string",
      "code": "string",
      "message": "string"
    }
  ],
  "retry_after": 0
}
{
  "type": "https://getyoutubetranscriber.com/api/errors/validation",
  "title": "Validation failed",
  "status": 422,
  "detail": "video_url is required",
  "instance": "/api/v2/transcript",
  "request_id": "req_01J0XYZ...",
  "code": "E_VALIDATION",
  "errors": [
    {
      "field": "string",
      "code": "string",
      "message": "string"
    }
  ],
  "retry_after": 0
}