If you need to automate your subtitle downloads or integrate them into a larger application, using a youtube transcript api is the most reliable approach. This guide explains how to authenticate your requests, handle standard responses, and respect usage limits while fetching data programmatically.
What you need
You will need a GetTranscript account to access the API. When you sign up, you automatically receive 50 free credits (no credit card required) to test the integration. You will also need the video ID of the YouTube video you want to process, which is the sequence of characters following v= in a standard YouTube URL.
youtube transcript api
- Get your API key: Log into your GetTranscript dashboard and navigate to your account settings to generate a new API key. Keep this key secure, as it serves as your primary method of authentication and deducts from your credit balance when used.
- Make the API request: The primary endpoint is
GET /api/get-transcript?videoId=<id>. Pass your API key as a bearer token in the headers. A strict rate limit of 60 requests per minute applies per API key — exceed it and the API returns a 429 status code with aRetry-Afterheader indicating when you can resume. - Process the response: The API returns a standard JSON response containing
success,video_id, the aggregatedtext, an array of timestampedsegments, yourremaining_creditsbalance, and acachedboolean. Cached transcripts return instantly and do not cost additional credits if you request the same video ID again.
A minimal cURL call to test your connection:
curl -X GET "https://gettranscript.io/api/get-transcript?videoId=YOUR_VIDEO_ID" \
-H "Authorization: Bearer YOUR_KEY"The same request in Python using the requests library:
import requests
url = "https://gettranscript.io/api/get-transcript"
params = {"videoId": "YOUR_VIDEO_ID"}
headers = {"Authorization": "Bearer YOUR_KEY"}
response = requests.get(url, params=params, headers=headers)
print(response.json())For the complete schema, parameter options, and error code definitions, review the official API documentation.
Supported formats
By default, the API returns a structured JSON object. You can override this using the optional ?format= query parameter.
json: The default response format. Best for programmatic parsing, featuring discrete time-coded segment blocks.srt: The most widely supported subtitle format. Ideal for video editing software.vtt: The modern web standard for captions. Best suited for HTML5 video players.plain text: A single, continuous string of text without any timestamps or formatting.txt_timestamped: A readable text file where each line or paragraph is preceded by a timestamp.md: Markdown format, perfect for exporting directly to note-taking apps like Obsidian or Notion.
Common questions
How do I get an API key?
You can generate an API key from your GetTranscript account dashboard. Signing up instantly provisions an active key alongside your 50 free starting credits.
What happens when I run out of credits?
Once your credit balance reaches zero, the API will return an error message prompting you to upgrade or top up. Your key remains active, but successful transcript retrievals are paused until credits are added.
Can I use the API from the browser?
Direct browser calls (such as from a frontend React app) will fail due to CORS restrictions and the security risk of exposing your API key in client-side code. You should route browser requests through your own backend server, which can safely hold your key and call GetTranscript on your users' behalf.
Automating your caption workflows saves hours of manual work. To grab your API key and start making requests, head over to the homepage and create your free account today.