How to Pull Video Captions With the YouTube Transcript API
Get a timed YouTube transcript into an agent or script and turn the response into a reusable record.

Get a timed YouTube transcript into your agent. Paste this into your agent:
Set up https://monid.ai/SKILL.md, then use Monid to get the English transcript for my YouTube video, retain its timestamps, and save the result as JSON.
One prompt starts the transcript workflow.
Developers searching for a YouTube transcript API usually want to pass one video URL to a script and get text back with timestamps. Copying captions from a video page works for an occasional video, but even one transcript has to be selected, copied and attached to the right source before an agent can use it.
That manual handoff becomes a recurring job when a research queue contains several videos. A transcript without its source and timing also makes it harder to check what a summary actually says against the recording.
In this guide, we'll use Monid, the OpenRouter for agent tools, to fetch one transcript and preserve its structure. You'll discover the tool, run a small request, and turn its response into a record your agent can use. The YouTube tools show the wider catalog.
Our test returned this record on November 25, 2026. The table summarizes the actual response without reproducing the speaker's words.
| Field | Observed value |
|---|---|
| Result status | success |
| Selected language | English |
| Video duration | 520 seconds |
| Timed transcript segments | 160 |
| First segment start and end | 4.035 and 6.003 seconds |
| Auto-generated captions | false |
How to use the YouTube transcript API with Monid
Use a video URL and a language code to request a transcript, then pass the returned segments to your agent. Monid provides one key and one balance for discovering and calling tools from multiple providers; the transcript extractor in this guide is an Apify actor accessed through the Apify tools page.
An endpoint is a specific callable tool. This one accepts either a video URL or a channel URL, and the example below uses a single video so that the first test has a clear scope. It returns transcript segments and video information when a transcript is available. It does not guarantee captions for every video or verify what a speaker said.
The key decision is whether your next step needs timing. A single block of text is convenient for a summary, but the segments keep the connection between a passage and its place in the video. Request both forms when you need both jobs, and keep the original response alongside any derived summary.
Start with a source you can check
Choose a public video whose transcript you are allowed to use and whose result you can review. Use its actual URL as the source identifier, not a title alone: titles can change and two videos can have similar names. The sample request below uses the video tested for this article.
A transcript is a source document, not an answer in itself. If your agent makes a claim from it, make the agent retain the segment times and review the relevant recording before relying on that claim. For a file-oriented workflow, the guide to downloading YouTube transcript files covers the export task. The comparison of free transcript methods and a transcript API examines the choice of retrieval route.
How do you get a transcript into your workflow?
Choose the route according to how often you need the text and whether another program needs to consume it. Monid is one route for a repeatable tool call; this is the Monid blog, and we have a stake in that choice.
| Route | How it is used | Fits | Limit |
|---|---|---|---|
| Monid | Shared key and balance for a tool request | An agent or script that needs structured data | Depends on the selected tool and available captions |
| Manual copy | Copy a displayed transcript into a document | One occasional review | Source and timing need careful handling |
| Apify directly | Use the provider's actor in its own workflow | An existing Apify setup | A separate provider workflow to manage |
Manual copy for a one-off
Open the video and copy the transcript when the task is a single reading session. This requires no integration work, but you must preserve the video link and distinguish the transcript from your notes. If you need timestamps later, record them as you work rather than assuming a pasted paragraph contains them.
A tool call for a repeatable record
A structured response gives your script fields to check before using the text. It is useful when the next step is a queue, a summary or a searchable archive. Manual and automated retrieval each have a place in the workflow.
A provider workflow for an existing setup
Use Apify directly if your team already manages this actor there and wants the transcript job in that environment. The example in this article instead uses the same provider through Monid, which is useful when an agent already has a Monid key and calls other tools through it. Neither route turns unavailable captions into an available transcript.
How to get a timed transcript into your agent
Run one video first, inspect the response, and only then add it to a larger queue. Monid makes discovery and inspection free; the request itself is the paid step. The steps below preserve the video URL, language and timestamps so the record remains useful after the first summary.
Step 1. Set up your agent or CLI
For an agent, get a key at app.monid.ai and give the agent the following instruction. The agent quickstart explains the setup.
set up https://monid.ai/SKILL.md
For a human using a terminal, install the CLI and add your key. The CLI quickstart covers installation and key management.
npm install -g @monid-ai/cli
monid keys add --label main --key <your-api-key>
Keep the key out of source files and shared transcripts. The agent needs the key for calls, but the downstream consumer of a saved transcript does not need to receive it.
Step 2. Find the tool and inspect its inputs
Search for the task, then inspect the selected tool before sending a paid request. Inspection shows the input schema and current price, including whether the tool bills by call or by result.
monid discover -q "youtube transcript api"
monid inspect -p apify -e /starvibe/youtube-video-transcript

The selected tool accepts youtube_url for a single video and language as a two-letter language code. It also accepts include_transcript_text; setting it to true asks for a plain text field as well as the timed segments. Use a video URL or a channel URL, not both in the same request.
Step 3. Request one video
Run the small example below. -w waits for the result, and -o saves the output as JSON so a script can read it without copying terminal output.
monid run -p apify -e /starvibe/youtube-video-transcript \
-i '{"youtube_url":"https://www.youtube.com/watch?v=gN07gbipMoY","language":"en","include_transcript_text":true}' \
-w -o transcript.json
Our request completed with one result on November 25, 2026. It took about 6.6 seconds between the recorded start and completion timestamps; that is one observation, not a performance promise. It returned English text and 160 timed segments for the 520-second video.
Step 4. Save the source with the text
Keep transcript.json with the video URL and selected language rather than saving only a summary. The response includes a transcript array whose entries contain start, end, duration, and text; it also returned transcript_text, status, selected_language, and is_auto_generated in our test.
Use the timestamp fields as data, not as a substitute for checking the recording. A segment boundary is the boundary returned by the tool, and the text is a caption. Preserve the original array even if you later join segments into larger passages, so your summary can point back to the source.
How do you turn the response into useful input?
Treat the result as a source record first and a prompt input second. Monid returns the data, while your script decides how to store, divide and use it. In our sample, the transcript array held 160 objects, each with its own text and timing; the transcript_text field supplied a continuous version.
Check status and language before processing
Read the returned status and selected_language before sending text to a model. The test returned success and English, with is_auto_generated set to false. Keep these values with the record so a reviewer can see what was actually returned, rather than inferring the result from your requested language.
If a result does not contain the text you need, record it as an unresolved source and review the video. Do not silently replace missing text with an empty summary or mark a video as reviewed just because the request finished. A run status and a content status answer different questions: one describes the request, the other describes the returned record.
Build a citation-friendly passage
Group adjacent segments into passages that suit your task, retaining the first start and last end time for each group. Store the video URL with every passage. That gives a reader a path back to the recording when a summary cites a statement, even after the text has been moved into a separate search index.
Avoid treating a short caption fragment as a complete argument. Include surrounding segments when preparing an excerpt so that an agent can see the context. The guide to preparing YouTube transcripts for an LLM discusses the next stage after retrieval.
Keep the raw record and derived work separate
Save the original JSON once, and put summaries, tags and search chunks in separate files or records. This separation lets you regenerate a summary without calling the tool again and makes it clear which text came from captions and which text was produced later by a model.
For a list, use a queue with one source URL per item and retain the outcome for each item. Start with a single video, review the response and decide what your application should do with missing or unexpected data before increasing the workload. The sample establishes the shape of one successful response; it is not a measurement of coverage across a channel.
How much does a transcript request cost?
The tested Apify transcript tool is priced at $0.005 per result, Verified 2026-11-25. Monid discovery and inspection are free; the single successful test returned one billed result and cost $0.005, Verified 2026-11-25.
Budget by returned results
Per-result pricing means a larger input needs a budget based on the results it produces, not just the number of commands you type. Inspect the tool before a new run because the current price and billing shape are shown there. Our one-video test is a useful starting point, not evidence for the charge on an empty result or a failed request.
For an agent, set a budget before asking it to process a queue. Save each completed output and avoid submitting the same video again when the saved record already meets your needs. These are application choices: the endpoint supplies the transcript, while your workflow manages its own deduplication and retention.
Separate retrieval from downstream processing
The transcript request and any later model or storage operations are separate parts of a workflow. The measured amount above covers the transcript tool run only. If your application summarizes or indexes the text, account for those operations separately in your own budget and keep their outputs distinct from the original transcript.
When should you use something else?
Use a manual transcript for one occasional reading task, or use Apify directly when an existing provider workflow is where your team already manages this actor. Monid routes the provider's tool through its shared key and balance; it does not create captions that are unavailable on the source video.
Choose the source before choosing the integration
If you own the recording and already have an authoritative transcript, use that file as your source. It avoids an extra retrieval step and gives you a version you can review and correct. If the task requires a verified quotation, compare the relevant passage with the recording regardless of how the transcript was acquired.
For video metadata without the transcript processing described here, the guide to using an API key for YouTube video data addresses a different part of the workflow. Choose a source based on the fields your application needs, then decide how to integrate it.
Which tool fits the job?
The tested transcript tool fits a single video-to-text workflow. The Monid catalog is the place to inspect the current tool details before you run it.
| Use case | Best endpoint | Why? |
|---|---|---|
| Timed transcript and optional plain text for one video | apify /starvibe/youtube-video-transcript | One tested response included both forms; $0.005 per result, Verified 2026-11-25. |
Pick based on the record you need
If the next step is a summary, request the plain text field. If a reader must return to a particular moment, retain the timed segments as well. Both were present in the measured response, so the same saved record can serve those two jobs without a second retrieval.
Conclusion
You now have a repeatable way to request one YouTube transcript, save its source and timing, and pass the text to an agent or script. Begin with one video, verify the returned language and status, then expand the queue only after deciding how to handle missing text. Keeping the raw record and its timestamps gives your reader a direct route back to the source.
FAQ
Common transcript questions
Can I use the YouTube transcript API for free?
Discovering and inspecting tools on Monid is free. The tested transcript request is billed per result at $0.005, Verified 2026-11-25; see the current tool details.
Do I need to install anything to get a transcript?
An agent can follow the Monid skill setup, while a terminal user can install the CLI. Both routes need a Monid key for the tool request.
Can I get timestamps with the transcript?
Yes. The tested response returned a transcript array with start, end, duration and text for each segment. Save those fields with the video URL if you need to trace a passage back to the recording.
Can I choose a transcript language?
Yes. Supply a two-letter language code in language; the test requested en and returned English. Check the returned selected language and content for each video.
How many videos can I request at once?
The inspected schema supports a channel URL with max_videos from 1 to 200, but this guide tested one video URL. Start with one and budget for results before using a larger channel request.
Am I charged if a transcript request fails?
The measured successful request was charged for one result. This test did not establish the billing outcome for an empty or failed request, so inspect the current tool details and account for that uncertainty in your budget.
Can I use a transcript in my application?
Rules and permissions vary by jurisdiction and by the material. Check the applicable rights and rules for your intended use.
Published November 2026.


