Build powerful integrations with our RESTful API. Extract transcripts programmatically with support for multiple languages and formats.
Test the API directly from your browser. Enter your API key and a YouTube URL to see the API in action.
The YTT API allows you to programmatically extract transcripts from YouTube videos. Our API is RESTful and returns JSON responses.
https://yttapi.com/api/v1Copy and paste these examples to get started quickly. Each example shows the same operation in multiple languages.
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"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"]}'Export transcripts as SRT or VTT subtitle files for video editing.
# Download as SRTcurl -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.vttRequest transcripts in different languages when available.
# Spanish transcriptcurl -X GET "https://yttapi.com/api/v1/transcripts?id=dQw4w9WgXcQ&language=es" \ -H "Authorization: Bearer YOUR_API_KEY"# French transcriptcurl -X GET "https://yttapi.com/api/v1/transcripts?id=dQw4w9WgXcQ&language=fr" \ -H "Authorization: Bearer YOUR_API_KEY"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"}'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?"}'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"}'Fetch all videos, shorts, or playlists from a YouTube channel. Supports pagination for large channels.
# Get channel videoscurl "https://yttapi.com/api/v1/channels?id=@MrBeast&content=videos" \ -H "Authorization: Bearer YOUR_API_KEY"# Get channel shortscurl "https://yttapi.com/api/v1/channels?id=@MrBeast&content=shorts" \ -H "Authorization: Bearer YOUR_API_KEY"# Get channel playlistscurl "https://yttapi.com/api/v1/channels?id=@MrBeast&content=playlists" \ -H "Authorization: Bearer YOUR_API_KEY"# Paginate with continuation tokencurl "https://yttapi.com/api/v1/channels?id=@MrBeast&content=videos&continuationToken=..." \ -H "Authorization: Bearer YOUR_API_KEY"Get all video information from a YouTube playlist. Perfect for extracting video IDs for bulk transcript operations.
# Get playlist videoscurl "https://yttapi.com/api/v1/playlists?id=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf" \ -H "Authorization: Bearer YOUR_API_KEY"# With URL instead of IDcurl "https://yttapi.com/api/v1/playlists?url=https://www.youtube.com/playlist?list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf" \ -H "Authorization: Bearer YOUR_API_KEY"# Limit resultscurl "https://yttapi.com/api/v1/playlists?id=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf&limit=50" \ -H "Authorization: Bearer YOUR_API_KEY"All API requests require authentication using an API key. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYKeep your API key secure
Never expose your API key in client-side code or public repositories. Use environment variables and server-side requests.
Below are all available API endpoints. Click on an endpoint to see details, parameters, and example responses.
Leverage AI to summarize videos and chat with transcripts. AI features require higher tier plans and use more credits due to LLM processing costs.
Generate intelligent summaries in multiple formats: brief, detailed, bullet-points, chapters, or key-takeaways.
Ask questions about video content. The AI analyzes the transcript and provides accurate, contextual answers.
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 Duration | Credits | Example Cost |
|---|---|---|
| 15 minutes | 10 credits | $0.04 (Popular tier) |
| 30 minutes | 20 credits | $0.08 (Popular tier) |
| 60 minutes | 40 credits | $0.16 (Popular tier) |
| 120 minutes | 80 credits | $0.32 (Popular tier) |
| Any length | ~0.67/min | Pay for what you use |
Rate limits vary by plan. Exceeding your rate limit will result in a 429 error. Rate limit headers are included in every response.
| Plan | Requests | Concurrent |
|---|---|---|
| FREE | 5 credits on signup | 2 |
| PLUS | 2,500+ credits purchased | 10 |
| PRO | 10,000+ credits purchased | 50 |
| ENTERPRISE | Custom | Unlimited |
X-RateLimit-Limit: 10000X-RateLimit-Remaining: 9876X-RateLimit-Reset: 1705312800The API uses standard HTTP status codes to indicate success or failure. Error responses include a JSON body with more details.
| Code | Name | Description |
|---|---|---|
| 400 | Bad Request | Invalid request parameters or video ID |
| 401 | Unauthorized | Invalid or missing API key |
| 402 | Payment Required | Insufficient credits for this operation |
| 403 | Forbidden | Feature requires higher plan or insufficient permissions |
| 404 | Not Found | Video not found or no transcript available |
| 422 | Unprocessable Entity | Video has no available transcript or captions disabled |
| 429 | Too Many Requests | Rate limit exceeded. See Retry-After header |
| 500 | Internal Server Error | Server error, please try again |
| 503 | Service Unavailable | YouTube temporarily unavailable, retry in a few seconds |
Invalid request parameters or video ID
Invalid or missing API key
Insufficient credits for this operation
Feature requires higher plan or insufficient permissions
Video not found or no transcript available
Video has no available transcript or captions disabled
Rate limit exceeded. See Retry-After header
Server error, please try again
YouTube temporarily unavailable, retry in a few seconds
{ "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 } }}Check out our guides and tutorials, or reach out to our support team.