REST API v1

YouTube Transcript API

Programmatically retrieve transcripts and channel data from YouTube videos. Integrate with your apps, automations, and workflows.

Quick Start

Get your first transcript in 3 steps:

1

Get an API key

Subscribe to a paid plan, then go to your Profile and create an API key.

2

Make your first request

Send a POST request with your video IDs. Your key goes in the Authorization header.

3

Parse the response

Each transcript returns as an array of timestamped segments with text, offset, and duration.

Minimal Example

curl -X POST https://yourdomain.com/api/v1/transcripts \
  -H "Authorization: Bearer ytk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids": ["dQw4w9WgXcQ"]}'

Authentication

All API requests require authentication via an API key. Include your key in the Authorization header using the Bearer scheme.

Authorization: Bearer ytk_YOUR_API_KEY

How to get your API key:

  1. Sign up or log in to your account
  2. Subscribe to a paid plan (Plus, Pro, or Enterprise)
  3. Go to your Profile page
  4. Click "Create Key" in the API Keys section
  5. Copy and save your key — it's only shown once
Security: Keep your API key secret. Never expose it in client-side code, public repos, or browser requests. Use environment variables and server-side code only.

Transcripts

POST/api/v1/transcripts

Retrieve transcripts for one or more YouTube videos in a single request. Supply an array of video IDs (up to 50 per request). Each successful transcript counts as 1 usage credit.

Headers

AuthorizationstringrequiredYour API key: Bearer ytk_...
Content-TypestringrequiredMust be application/json

Body Parameters

idsstring[]requiredArray of YouTube video IDs (11-character IDs). Maximum 50 per request.
langstringoptionalPreferred transcript language code (e.g. en, es, ja). Defaults to auto (best available).
translateTostringoptionalTranslate the transcript to this language code. YouTube's built-in translation is used when available.

Example — Multiple Videos

curl -X POST https://yourdomain.com/api/v1/transcripts \
  -H "Authorization: Bearer ytk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": ["dQw4w9WgXcQ", "jNQXAC9IVRw"],
    "lang": "en"
  }'

Example Response

{
  "success": true,
  "count": 2,
  "total": 2,
  "usage": { "used": 15, "limit": 1000 },
  "data": [
    {
      "videoId": "dQw4w9WgXcQ",
      "title": "Rick Astley - Never Gonna Give You Up",
      "lang": "en",
      "availableLangs": ["en", "es", "fr", "de", "ja"],
      "transcript": [
        {
          "text": "We're no strangers to love",
          "offset": 18.0,
          "duration": 3.44
        },
        {
          "text": "You know the rules and so do I",
          "offset": 22.32,
          "duration": 3.38
        }
      ]
    },
    {
      "videoId": "jNQXAC9IVRw",
      "title": "Me at the zoo",
      "lang": "en",
      "transcript": [...]
    }
  ]
}

Transcript Segment Format

FieldTypeDescription
textstringThe transcript text for this segment
offsetnumberStart time in seconds from the beginning of the video
durationnumberDuration of this segment in seconds

Translation

Use the translateTo parameter to get transcripts translated into a different language. This uses YouTube's built-in translation when available.

Example — Translate to Spanish

curl -X POST https://yourdomain.com/api/v1/transcripts \
  -H "Authorization: Bearer ytk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": ["dQw4w9WgXcQ"],
    "translateTo": "es"
  }'

Supported Language Codes

en Englishes Spanishfr Frenchde Germanpt Portugueseit Italianja Japaneseko Koreanzh Chineseru Russianar Arabichi Hinditr Turkishnl Dutchpl Polishsv Swedishand many more...

Channels

Plus+
POST/api/v1/channels

Retrieve channel metadata and uploads playlist IDs. Useful for discovering all videos from a channel, then fetching their transcripts. Requires Plus plan or higher.

Body Parameters

idsstring[]requiredArray of YouTube channel IDs (start with UC...). Limited to 5 on Plus, 50 on Pro/Enterprise.
includePlaylistDatabooleanoptionalWhen true, returns the uploads playlist ID for each channel.

Example Request

curl -X POST https://yourdomain.com/api/v1/channels \
  -H "Authorization: Bearer ytk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": ["UC_x5XG1OV2P6uZZ5FSM9Ttw"],
    "includePlaylistData": true
  }'

Example Response

{
  "success": true,
  "count": 1,
  "total": 1,
  "data": [
    {
      "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
      "title": "Google for Developers",
      "description": "Subscribe to join a community of creative developers...",
      "thumbnail": "https://yt3.ggpht.com/...",
      "uploadsPlaylistId": "UU_x5XG1OV2P6uZZ5FSM9Ttw"
    }
  ]
}

Rate Limits

API requests are rate-limited per API key. When you exceed the limit, the API returns a 429 status with a Retry-After header.

PlanPer MinutePer DayMonthly Quota
FreeNo API access
Plus ($9/mo)20 requests1,000 requests1,000 transcripts
Pro ($22/mo)60 requests5,000 requests3,000 transcripts
Enterprise120 requests20,000 requests10,000 transcripts
Tip: Check the X-Usage-Used and X-Usage-Limit response headers to track your quota in real-time.

Usage Quotas

Each successful transcript extraction counts as 1 usage credit against your monthly quota. Failed requests (invalid video ID, transcript unavailable) are not counted. Quotas reset on the 1st of each month at midnight UTC.

What counts as usage:

  • Each video ID that returns a successful transcript = 1 credit
  • Batch request with 10 video IDs = up to 10 credits (only successful ones count)
  • Failed extractions (video not found, no captions) = 0 credits
  • Rate-limited requests = 0 credits

Error Handling

Implement proper error handling with retries for rate limits. All error responses include a descriptive message.

Example — Error Handling with Retry

async function getTranscript(videoId) {
  const res = await fetch("https://yourdomain.com/api/v1/transcripts", {
    method: "POST",
    headers: {
      Authorization: "Bearer ytk_YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ ids: [videoId] }),
  });

  if (res.status === 429) {
    const retryAfter = res.headers.get("Retry-After") || "60";
    console.log(`Rate limited. Retry after ${retryAfter}s`);
    return null;
  }

  if (res.status === 401) {
    console.error("Invalid API key");
    return null;
  }

  if (!res.ok) {
    const err = await res.json();
    console.error("API error:", err.error);
    return null;
  }

  const { data } = await res.json();
  return data[0];
}

Error Response Format

{
  "error": "Monthly transcript limit reached (1000/1000). Upgrade your plan for more.",
  "usage": { "used": 1000, "limit": 1000 }
}

Status Codes

200Success — transcript data returned
400Bad request — invalid parameters (missing ids, too many IDs, etc.)
401Unauthorized — missing, invalid, or revoked API key
403Forbidden — monthly quota exceeded or plan doesn't support this endpoint
429Rate limited — too many requests. Check the Retry-After header
500Server error — something went wrong on our end

Automation Tools

Pre-built templates for popular automation platforms. Import and start extracting transcripts in minutes.

n8n Workflow

Import into your n8n instance

Automate transcript extraction with n8n. Trigger on new videos, process in bulk, save to Google Sheets, and more.

Make (Integromat)

Import into your Make scenario

Build visual automation scenarios with Make. Connect to 1000+ apps and automate your transcript workflows.

Zapier

Use with Zapier webhooks

Use our API with Zapier's webhook action to connect transcript extraction to your existing Zaps.

Google Sheets

Apps Script integration

Use Google Apps Script to pull transcripts directly into your spreadsheets for analysis.

Terms of Use

By using the YouTube Transcript API you agree to our Terms of Service and Privacy Policy. API access is subject to rate limits and fair-use policies. We reserve the right to revoke API tokens found in violation. Transcripts are sourced from YouTube and may be subject to YouTube's own terms and copyright policies.

Need Help?

Check our support page or email us if you have questions about the API.