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

1# Get transcript for a single video
2curl -X GET "https://yttapi.com/api/v1/transcripts?id=dQw4w9WgXcQ" \
3 -H "Authorization: Bearer YOUR_API_KEY"
4
5# Bulk transcript extraction
6curl -X POST "https://yttapi.com/api/v1/transcripts" \
7 -H "Authorization: Bearer YOUR_API_KEY" \
8 -H "Content-Type: application/json" \
9 -d '{
10 "ids": [
11 "dQw4w9WgXcQ",
12 "https://youtube.com/watch?v=xyz123"
13 ]
14 }'

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.

PlanRequestsConcurrent
FREE5 credits on signup2
PLUS2,500+ credits purchased10
PRO10,000+ credits purchased50
ENTERPRISECustomUnlimited

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.

CodeNameDescription
400Bad RequestInvalid request parameters
401UnauthorizedInvalid or missing API key
403ForbiddenRate limit exceeded or insufficient permissions
404Not FoundResource not found
422Unprocessable EntityVideo has no available transcript
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error, please try again

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.