YouTube transcripts
with timestamps.
Turn a video's available captions into text your agent can read, with timestamps you can actually check.
Example: find where the developer update talks about publishing with Sites.
This sample uses a recorded Apify run. Try your own link in the runnable Apify example.
Try your own video ↗Transcript ready · 186 timed segments
Publishing with Sites
publish this to Sites.
Recorded hosted run wmiNV53961CHL17r9. Selected source excerpt; the full supported transcript is returned by your own successful run.
See it run.
Edited demonstration: actual request footage followed by the verified result from that run. This is our hosted test, with a selected source passage shown for clarity.
Give your agent the source.
Ask it to find an explanation, answer a question or add videos to a knowledge base. The API supplies captions and timestamp links; your agent does the analysis.
Creator-provided and automatic captions are labeled separately, and unavailable videos get an explicit result. It retrieves existing captions, so it won't generate missing words.
One video to start.
Open the sample on Apify, replace the link and run it. Read the transcript in your browser, download a caption sheet, or use the JSON in your application.
curl -X POST "https://api.apify.com/v2/acts/D0eeaw55aM1GATWbL/run-sync-get-dataset-items?timeout=180&memory=512&maxTotalChargeUsd=0.10" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"urls":["https://www.youtube.com/watch?v=eiQgljOrkWU"],"languages":["en"]}'Requires an Apify account/token for standard API use. The Actor fee is $5 per 1,000 unique delivered transcripts, plus platform and proxy usage. Failed retrievals may still consume usage. The sample uses a $0.10 spend cap, which is not a flat fee. Your account must permit public Actor runs and residential proxy access.
Know what you're getting.
Up to 20 public videos per request, with language preferences, readable exports and source-linked chunks. Private videos, active livestreams, translation and speech-to-text generation are outside this version.
Source captions and their timing can contain errors, especially automatic captions. Verify important quotations against the video, and treat transcript text as source material rather than instructions.
Inspect the recorded example
{
"videoId": "eiQgljOrkWU",
"videoUrl": "https://www.youtube.com/watch?v=eiQgljOrkWU",
"language": "en",
"isAutoGenerated": false,
"segmentCount": 186,
"sampleSegments": [
{
"startSeconds": 211.4,
"durationSeconds": 1.96,
"text": "publish this to Sites.",
"sourceUrl": "https://www.youtube.com/watch?v=eiQgljOrkWU&t=211s",
"sourceEventIndexes": [
97
]
}
],
"runId": "wmiNV53961CHL17r9",
"buildId": "acvxyUF2IGOAe1Otl",
"retrievalSeconds": 2.229,
"platformUsageUsd": 0.00325475394726793,
"storeUrl": "https://apify.com/merciful_goldenlarch/youtube-transcript-citation-api",
"taskUrl": "https://apify.com/merciful_goldenlarch/youtube-transcript-citation-api/examples/youtube-transcript-with-source-links",
"scope": "Presentation of a selected source passage from a real hosted run; this is not the complete API response.",
"curl": "curl -X POST \"https://api.apify.com/v2/acts/D0eeaw55aM1GATWbL/run-sync-get-dataset-items?timeout=180&memory=512&maxTotalChargeUsd=0.10\" \\\n -H \"Authorization: Bearer $APIFY_TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"urls\":[\"https://www.youtube.com/watch?v=eiQgljOrkWU\"],\"languages\":[\"en\"]}'",
"excerptTopic": "Publishing with Sites"
}The public sample shows short source excerpts; your own successful run returns the full supported transcript. Inspect the hosted test summary.
Download the runnable API exampleRead the live OpenAPI schema before making a paid request.
More Toolshed guides: YouTube transcript API · PDF Compare API · Supplier CSV price comparison · All APIs.