API Documentation
FreeTranscriptAPI reference
Extract YouTube transcripts with a single HTTP request. No credit card or API key required to get started. Pass a video URL and receive structured JSON data.
Introduction
FreeTranscriptAPI provides a REST API for fetching YouTube video transcripts. All requests are made to the base URL below and return JSON responses.
The API supports standard HTTP methods. Requests without an API key are limited to 20 requests per hour per IP address. With a free API key, you receive 200 requests per day. No credit card required.
Quick start
Get your first transcript in two steps. No account, API key, or credit card required:
- Send a GET request to the transcript endpoint with your video URL or video ID.
- Parse the JSON response in your application.
Need higher limits? Create a free account and generate an API key from the dashboard. Still no credit card required.
cURL
curl "https://api.freetranscriptapi.com/v1/transcript?video_url=dQw4w9WgXcQ"JavaScript
const response = await fetch(
"https://api.freetranscriptapi.com/v1/transcript?video_url=dQw4w9WgXcQ"
);
const data = await response.json();
console.log(data.transcript);Python
import requests
response = requests.get(
"https://api.freetranscriptapi.com/v1/transcript",
params={"video_url": "dQw4w9WgXcQ"},
)
data = response.json()
print(data["transcript"])Authentication
API keys are optional. Without one, you can make up to 20 requests per hour per IP address. Include an API key in the Authorization header to unlock 200 requests per day on the free plan:
API keys are created in your dashboard. The full key is shown only once at creation. Store it securely and never expose it in client-side code.
Get transcript
/transcriptReturns the full transcript for a YouTube video. Accepts a video URL or 11-character video ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
| video_url | string | Yes | YouTube video URL or video ID (e.g. dQw4w9WgXcQ). |
| lang | string | No | Preferred language code (e.g. en, es, fr). Falls back to available captions if not found. |
| format | string | No | Response format. Defaults to json. Set to text for plain text output. |
Response
{
"language": "en",
"title": "Example Video Title",
"transcript": [
{
"text": "Hello world.",
"start": 0.0,
"duration": 2.1
}
]
}List languages
/languagesReturns all available caption languages for a video before fetching the transcript.
| Parameter | Type | Required | Description |
|---|---|---|---|
| video_url | string | Yes | YouTube video URL or video ID. |
Response
{
"languages": [
{
"code": "en",
"name": "English",
"auto_generated": false
},
{
"code": "es",
"name": "Spanish",
"auto_generated": true
}
]
}Health check
/healthReturns the API status. No authentication required. Use this endpoint for uptime monitoring.
Response
{
"status": "ok",
"version": "1.0.0"
}Response format
Transcript responses include the detected language, video title, and an array of caption lines.
| Parameter | Type | Required | Description |
|---|---|---|---|
| language | string | Yes | ISO language code of the returned transcript. |
| title | string | Yes | Title of the YouTube video. |
| transcript | array | Yes | Array of caption line objects. |
| transcript[].text | string | Yes | Caption text for this line. |
| transcript[].start | number | Yes | Start time in seconds. |
| transcript[].duration | number | Yes | Duration of this caption line in seconds. |
Error codes
Errors return a JSON object with an error field containing a machine-readable code and human-readable message.
Example
{
"error": {
"code": "video_not_found",
"message": "No transcript available for this video."
}
}| Status | Code | Description |
|---|---|---|
| 400 | invalid_request | Missing or invalid query parameters. |
| 401 | unauthorized | Missing, invalid, or revoked API key. |
| 404 | video_not_found | Video does not exist or has no captions. |
| 429 | rate_limit_exceeded | Daily or monthly request limit reached. |
| 500 | internal_error | Unexpected server error. Retry the request. |
Rate limiting
Rate limits depend on how you authenticate. Unauthenticated requests are tracked by IP address:
| Parameter | Type | Required | Description |
|---|---|---|---|
| No API key | public | No | 20 requests per hour, limited by IP address. |
| Free | API key | No | 200 requests per day. |
| Pro | API key | No | 1,000 requests per day. |
Every response includes rate limit headers so you can track remaining quota:
| Parameter | Type | Required | Description |
|---|---|---|---|
| X-RateLimit-Limit | integer | No | Maximum requests allowed in the current window. |
| X-RateLimit-Remaining | integer | No | Requests remaining in the current window. |
| X-RateLimit-Reset | integer | No | Unix timestamp when the limit resets. |
When you exceed your limit, the API returns a 429 status. Upgrade your plan on the pricing page or contact us for enterprise volume.