YouTube Transcript API: Text, Timestamps, SRT and VTT
This Actor returns the captions that already exist on YouTube videos, manual or automatic, as one text string, timestamped segments and optional SRT or WebVTT files. It is for developers, researchers and AI teams who need transcripts of known videos in bulk.
Main price: $3.50 per 1,000 transcripts, same on every Apify plan.
What you can do with it
- Feed video transcripts into summaries, search indexes or RAG pipelines.
- Get SRT or VTT subtitle files for videos that already have captions.
- Pick caption languages in order of preference, with a fallback to the original language.
- Process up to 1,000 video URLs or IDs in one run.
What you get
Results come as rows in an Apify dataset, which you can export as JSON, CSV or Excel or read over the API. These are the main fields:
| Field | Example | Meaning |
|---|---|---|
videoId | jNQXAC9IVRw | 11 character video ID |
language | en | Language code of the returned caption track |
isGenerated | false | true for automatic captions, false for manual |
text | First caption line... | Full transcript as one string |
segments | [{ text, start, duration, end }] | Timestamped caption segments, in seconds |
srt, vtt | 1 00:00:01,200 --> ... | Optional subtitle files as text |
matchedRequestedLanguage | true | false when the original language was used as a fallback |
Pricing
This Actor is pay per event, with one price for every Apify plan, the free plan included. Prices are per 1,000 events.
| Event | What is charged | Price per 1,000 |
|---|---|---|
| Transcript | One successfully extracted, non-empty transcript for a unique video. Failed videos and duplicate links are not charged. | $3.50 |
No run start fee. Prices come from the Apify Store and can change; the Actor's Apify page always shows the current ones. Platform usage is billed through your Apify account.
Run it from code
Create an API token in Apify Console (Settings, API and Integrations) and replace YOUR_APIFY_TOKEN. This call starts a run with a small input and returns the rows when it finishes. Synchronous calls suit small inputs; for big jobs, start a run and read the dataset later.
curl
curl -X POST "https://api.apify.com/v2/acts/apisamurai~youtube-transcript-api/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"videoUrls": [
"https://www.youtube.com/watch?v=jNQXAC9IVRw"
],
"languages": [
"en"
]
}'Python (pip install apify-client)
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {
"videoUrls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],
"languages": ["en"],
}
# Start the Actor and wait for it to finish.
run = client.actor("apisamurai/youtube-transcript-api").call(run_input=run_input)
# Read the results from the run's default dataset.
items = client.dataset(run.default_dataset_id).list_items().items
for item in items:
print(item)JavaScript (npm install apify-client)
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const input = {
videoUrls: ['https://www.youtube.com/watch?v=jNQXAC9IVRw'],
languages: ['en'],
};
// Start the Actor and wait for it to finish.
const run = await client.actor('apisamurai/youtube-transcript-api').call(input);
// Read the results from the run's default dataset.
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);Client calls follow the Python and JavaScript client docs. The full input reference is on the Actor's Apify page.
FAQ
- Does it transcribe videos without captions?
- No. It reads existing captions only. There is no speech recognition and no translation. For audio files, see the Audio, Video and Podcast Transcriber.
- Can I pass a playlist or channel?
- No. Playlists and channels are not expanded in this version. Pass video URLs or IDs.
- What is not charged?
- Duplicates, invalid inputs, failed extractions, videos without captions and skipped inputs. There is no start fee.
- Which videos cannot be read?
- Private, members only, age restricted and deleted videos.
- Where do I report a problem?
- Email hello@apisamurai.com, or open an issue on the Actor's Apify page.