API Reference

API Documentation

Build powerful integrations with our RESTful API. Extract transcripts programmatically with support for multiple languages and formats.

API Status: Operationalv1.0.0REST API

Try It Out

Test the API directly from your browser. Enter your API key and a YouTube URL to see the API in action.

Try it out

Overview

The YTT API allows you to programmatically extract transcripts from YouTube videos. Our API is RESTful and returns JSON responses.

Base URL

https://yttapi.com/api/v1

Getting Started

  1. Create a free account to get started
  2. Navigate to your Dashboard → API Keys
  3. Create an API key and copy it securely
  4. Use the API key in the Authorization header

Quick Start Examples

Copy and paste these examples to get started quickly. Each example shows the same operation in multiple languages.

GET

Get Single Transcript

Fetch the transcript for a single YouTube video by ID or URL.

curl -X GET "https://yttapi.com/api/v1/transcripts?id=dQw4w9WgXcQ" \
-H "Authorization: Bearer YOUR_API_KEY"
POST

Bulk Transcript Extraction

Extract transcripts from multiple videos in a single API call.

curl -X POST "https://yttapi.com/api/v1/transcripts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ids": ["dQw4w9WgXcQ", "abc123", "xyz789"]}'
GET

Download as Subtitle File

Export transcripts as SRT or VTT subtitle files for video editing.

# Download as SRT
curl -X GET "https://yttapi.com/api/v1/transcripts?id=dQw4w9WgXcQ&format=srt" \
-H "Authorization: Bearer YOUR_API_KEY" -o subtitle.srt
# Download as VTT (WebVTT)
curl -X GET "https://yttapi.com/api/v1/transcripts?id=dQw4w9WgXcQ&format=vtt" \
-H "Authorization: Bearer YOUR_API_KEY" -o subtitle.vtt
GET

Get Transcript in Specific Language

Request transcripts in different languages when available.

# Spanish transcript
curl -X GET "https://yttapi.com/api/v1/transcripts?id=dQw4w9WgXcQ&language=es" \
-H "Authorization: Bearer YOUR_API_KEY"
# French transcript
curl -X GET "https://yttapi.com/api/v1/transcripts?id=dQw4w9WgXcQ&language=fr" \
-H "Authorization: Bearer YOUR_API_KEY"
POSTPRO

AI Summarization

Generate intelligent summaries in multiple formats: brief, detailed, bullet-points, or chapters.

curl -X POST "https://yttapi.com/api/v1/summarize" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"videoId": "dQw4w9WgXcQ", "format": "bullet-points"}'
POSTPLUS

Chat with Transcript

Have a conversation about the video content. The AI maintains context across messages.

curl -X POST "https://yttapi.com/api/v1/chat" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"videoId": "dQw4w9WgXcQ", "message": "What are the main topics discussed?"}'
POST

Auto-Generate Chapters

Automatically detect topic changes and generate timestamps for YouTube descriptions.

curl -X POST "https://yttapi.com/api/v1/chapters" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"videoId": "dQw4w9WgXcQ", "format": "youtube"}'
GET

Get Channel Content

Fetch all videos, shorts, or playlists from a YouTube channel. Supports pagination for large channels.

# Get channel videos
curl "https://yttapi.com/api/v1/channels?id=@MrBeast&content=videos" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get channel shorts
curl "https://yttapi.com/api/v1/channels?id=@MrBeast&content=shorts" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get channel playlists
curl "https://yttapi.com/api/v1/channels?id=@MrBeast&content=playlists" \
-H "Authorization: Bearer YOUR_API_KEY"
# Paginate with continuation token
curl "https://yttapi.com/api/v1/channels?id=@MrBeast&content=videos&continuationToken=..." \
-H "Authorization: Bearer YOUR_API_KEY"
GET

Get Playlist Videos

Get all video information from a YouTube playlist. Perfect for extracting video IDs for bulk transcript operations.

# Get playlist videos
curl "https://yttapi.com/api/v1/playlists?id=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf" \
-H "Authorization: Bearer YOUR_API_KEY"
# With URL instead of ID
curl "https://yttapi.com/api/v1/playlists?url=https://www.youtube.com/playlist?list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf" \
-H "Authorization: Bearer YOUR_API_KEY"
# Limit results
curl "https://yttapi.com/api/v1/playlists?id=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Keep your API key secure

Never expose your API key in client-side code or public repositories. Use environment variables and server-side requests.

Getting an API Key

  1. Sign up for a YTTranscript account
  2. Navigate to Settings → API Keys
  3. Click "Create new API key"
  4. Copy and securely store your key

Endpoints

Below are all available API endpoints. Click on an endpoint to see details, parameters, and example responses.

AI Features

Leverage AI to summarize videos and chat with transcripts. AI features require higher tier plans and use more credits due to LLM processing costs.

PRO Plan

AI Summarization

Generate intelligent summaries in multiple formats: brief, detailed, bullet-points, chapters, or key-takeaways.

Credits:10-50 based on video length
PLUS Plan

Chat with Transcript

Ask questions about video content. The AI analyzes the transcript and provides accurate, contextual answers.

Credits:5 per message

Summary Credit Pricing

AI summaries are priced based on video duration at 0.67 credits per minute (minimum 5 credits). If you don't have enough credits for a full summary, we'll process as much as your credits allow.

Video DurationCreditsExample Cost
15 minutes10 credits$0.04 (Popular tier)
30 minutes20 credits$0.08 (Popular tier)
60 minutes40 credits$0.16 (Popular tier)
120 minutes80 credits$0.32 (Popular tier)
Any length~0.67/minPay for what you use

Plan Requirements

  • Chat: PLUS plan (2,500+ credits purchased)
  • Summarization: PRO plan (10,000+ credits purchased)

Rate Limits

Rate limits vary by plan. Exceeding your rate limit will result in a 429 error. Rate limit headers are included in every response.

FREE
Requests:
5 credits on signup
Concurrent:
2
PLUS
Requests:
2,500+ credits purchased
Concurrent:
10
PRO
Requests:
10,000+ credits purchased
Concurrent:
50
ENTERPRISE
Requests:
Custom
Concurrent:
Unlimited

Rate Limit Headers

X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9876
X-RateLimit-Reset: 1705312800

Error Codes

The API uses standard HTTP status codes to indicate success or failure. Error responses include a JSON body with more details.

400Bad Request

Invalid request parameters or video ID

401Unauthorized

Invalid or missing API key

402Payment Required

Insufficient credits for this operation

403Forbidden

Feature requires higher plan or insufficient permissions

404Not Found

Video not found or no transcript available

422Unprocessable Entity

Video has no available transcript or captions disabled

429Too Many Requests

Rate limit exceeded. See Retry-After header

500Internal Server Error

Server error, please try again

503Service Unavailable

YouTube temporarily unavailable, retry in a few seconds

Error Response Format

{
"error": {
"code": "rate_limit_exceeded",
"message": "You have exceeded your rate limit. Please try again later.",
"status": 429,
"details": {
"reset_at": "2024-01-15T12:00:00Z",
"limit": 100,
"remaining": 0
}
}
}

Need help?

Check out our guides and tutorials, or reach out to our support team.