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.

Base URL

https://api.freetranscriptapi.com/v1

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:

  1. Send a GET request to the transcript endpoint with your video URL or video ID.
  2. 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:

Authorization: Bearer fta_live_sk_...

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

GET/transcript

Returns the full transcript for a YouTube video. Accepts a video URL or 11-character video ID.

ParameterTypeRequiredDescription
video_urlstringYesYouTube video URL or video ID (e.g. dQw4w9WgXcQ).
langstringNoPreferred language code (e.g. en, es, fr). Falls back to available captions if not found.
formatstringNoResponse 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

GET/languages

Returns all available caption languages for a video before fetching the transcript.

ParameterTypeRequiredDescription
video_urlstringYesYouTube video URL or video ID.

Response

{
  "languages": [
    {
      "code": "en",
      "name": "English",
      "auto_generated": false
    },
    {
      "code": "es",
      "name": "Spanish",
      "auto_generated": true
    }
  ]
}

Health check

GET/health

Returns 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.

ParameterTypeRequiredDescription
languagestringYesISO language code of the returned transcript.
titlestringYesTitle of the YouTube video.
transcriptarrayYesArray of caption line objects.
transcript[].textstringYesCaption text for this line.
transcript[].startnumberYesStart time in seconds.
transcript[].durationnumberYesDuration 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."
  }
}
StatusCodeDescription
400invalid_requestMissing or invalid query parameters.
401unauthorizedMissing, invalid, or revoked API key.
404video_not_foundVideo does not exist or has no captions.
429rate_limit_exceededDaily or monthly request limit reached.
500internal_errorUnexpected server error. Retry the request.

Rate limiting

Rate limits depend on how you authenticate. Unauthenticated requests are tracked by IP address:

ParameterTypeRequiredDescription
No API keypublicNo20 requests per hour, limited by IP address.
FreeAPI keyNo200 requests per day.
ProAPI keyNo1,000 requests per day.

Every response includes rate limit headers so you can track remaining quota:

ParameterTypeRequiredDescription
X-RateLimit-LimitintegerNoMaximum requests allowed in the current window.
X-RateLimit-RemainingintegerNoRequests remaining in the current window.
X-RateLimit-ResetintegerNoUnix 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.