Scraper API
YouTubeyoutube.transcriptAvailable
YouTube transcript
The video's captions as timed segments and as one text, with the language, whether they are auto-generated, and every language the video offers.
Give it a YouTube video's address, or its id, and optionally a language.
1 unit a run, for runs that return data. Runs that fail cost nothing. How units work
- Counted
- 1 unit a run
- Inputs
- 4
- Record
- 14 fields
- A run takes
- up to 5 minutes
- Records kept
- 7 days
- Measured
- its success, on the status page
POST/v1/scrapers/youtube.transcript/runs
sent, and answered
a record of the run14 fields
ok1 unit a run
A record this scraper returned for this input. The first 9 of its 14 fields are set down here; the whole record is below.

What it is used for
- Get a video as text
- The transcript of a video in the language you ask for, as one text and as timed segments, with whether it was written by a person or generated.
- Search inside videos
- Index the segments with their start times and take a viewer to the second a subject is spoken about.
- Summarise and translate
- Give the text to a language model for a summary, notes or a translation.
available_languageslists what else the video offers.
What you send
A YouTube video's address, or its id, and optionally a language. These are its 4 inputs, as its schema has them.
urlstring One of the two- The video's address: a youtube.com/watch, youtu.be, /shorts/, /live/ or /embed/ link.
video_idstring One of the two- The video's 11-character id.
languagestring Optional- The caption language wanted, as a language code: "en", "es", "pt-BR". A code without a region also finds that language's regional tracks. Leave out for the language spoken in the video.
segmentsboolean Optional- Return the timed segments. Set false to get only the full text, which keeps the record small for a long video.Default
true
A request, ready to send
It starts a run with the input shown at the top of this page, waits up to 60 seconds for it, and reads its records. Put your key in the variable it reads.
# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/youtube.transcript/runs?wait=60" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"video_id":"8jPQjjsBbIc","language":"en"}}'
# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY"from enrichednow import EnrichedNow
client = EnrichedNow() # reads ENRICHEDNOW_API_KEY
# Start a run, wait for it to end, and get its records
result = client.scrape("youtube.transcript", {
"video_id": "8jPQjjsBbIc",
"language": "en",
})
print(result.run.id, result.run.status, result.run.record_count)
# Read its records: pages are fetched as you go
for record in result.records:
print(record)Install it with pip install enrichednow, then save as run.py and run python3 run.py
import EnrichedNow from "enrichednow";
const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("youtube.transcript", {
video_id: "8jPQjjsBbIc",
language: "en",
});
console.log(run.id, run.status, run.record_count);
// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);Install it with npm install enrichednow, then save as run.mjs and run node run.mjs
package main
import (
"context"
"fmt"
"log"
"time"
enrichednow "github.com/enrichednow/enrichednow-go"
)
func main() {
client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
if err != nil {
log.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
// Start a run, wait for it to end, and get its records
run, records, err := client.Scrape(ctx, "youtube.transcript", map[string]any{"video_id": "8jPQjjsBbIc", "language": "en"})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Status, run.RecordCount)
// Read its records: pages are fetched as you go
for records.Next() {
fmt.Println(string(records.Current()))
}
if err := records.Err(); err != nil {
log.Fatal(err)
}
}Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go
import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;
public class Run {
public static void main(String[] args) {
EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
ScrapeResult result = client.scrape("youtube.transcript", Map.of("video_id", "8jPQjjsBbIc", "language", "en"));
System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
// Read its records: pages are fetched as you go
for (Map<String, Object> record : result.records()) {
System.out.println(record);
}
}
}Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java
enrichednow run youtube.transcript --input video_id=8jPQjjsBbIc --input language=enInstall it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh
What comes back
The video's captions as timed segments and as one text, with the language, whether they are auto-generated, and every language the video offers. A record has 14 fields. One we could not read is null, never an empty string or a zero.
{
"video_id": "8jPQjjsBbIc",
"url": "https://www.youtube.com/watch?v=8jPQjjsBbIc",
"title": "How to stay calm when you know you'll be stressed | Daniel Levitin | TED",
"channel_name": "TED",
"channel_id": "UCAuUUnT6oDeKwE6v1NGQxug",
"duration_seconds": 740,
"language_code": "en",
"language_name": "English",
"auto_generated": false,
"available_languages": [
{
"language_code": "ar",
"name": "Arabic",
"auto_generated": false,
"translatable": true
},
{
"language_code": "bg",
"name": "Bulgarian",
"auto_generated": false,
"translatable": true
}
],
"segment_count": 260,
"text": "A few years ago, I broke into my own house. I had just driven home, it was around midnight in the dead of Montreal winter, I had been visiting my friend, Jeff, across town, and the thermometer on the front porch read minus 40 degrees -- and … [truncated]",
"segments": [
{
"start": 13.24,
"duration": 2.56,
"text": "A few years ago, I broke into my own house."
},
{
"start": 16.88,
"duration": 1.216,
"text": "I had just driven home,"
}
],
"fetched_at": "2026-11-19T18:07:42.951604Z"
}The scraper returned this record for the input above, reading a saved copy of the page, not the live site.
Values shortened for this page: available_languages: 41 items, the first 2 shown; text: 12,360 characters, the first 240 shown; segments: 260 items, the first 2 shown.
The fields of a record
video_idstring- The video id.
urlstring- The video's address: youtube.com/watch?v=<id>.
titlestring or null- The video's title.
channel_namestring or null- The name of the channel that published it.
channel_idstring or null- That channel's id (UC…).
duration_secondsinteger or null- The video's length in seconds.
language_codestring- The language of the captions returned, as YouTube codes it ("en", "pt-BR").
language_namestring or null- That track's name as YouTube shows it ("English", "English (auto-generated)").
auto_generatedboolean- True when the captions were made by speech recognition, false when the channel supplied them.
available_languageslist of objects- Every caption track the video offers, in YouTube's order: the language code, the name shown, and whether it is automatic.Each holds
language_code,name,auto_generated,translatable. segment_countinteger- The number of caption lines in the track.
textstring- The whole transcript as one text: the caption lines in order, joined by spaces.
segmentslist of objects or null- The caption lines in order, each with its start time and duration in seconds; null when the input set
segmentsto false. fetched_atdatetime- When the captions were read, in UTC.
Units and limits
- Counted per request
- Billed per request: a run that returns data costs 1 unit, however many records it returns.
- A miss costs nothing
- A run that fails, that meets something not supported yet, or that you cancel costs nothing. You pay for runs that return data.
- What bounds a run
- A run may take up to 5 minutes. Its records are read in pages of up to 1,000 and are kept for 7 days.
What it does not do
- A video without captions has no transcript to return, and a stream that is still on air has none yet.
- Captions are returned in a language the video offers. Nothing is translated.
- An age-restricted video's captions are shown only to a signed-in viewer and are not read.
Questions
What does YouTube transcript return?
The video's captions as timed segments and as one text, with the language, whether they are auto-generated, and every language the video offers. A record has 14 fields, among them video_id, url, title, channel_name, channel_id and duration_seconds. A value that could not be read is null, never an empty string or a zero.
What do I send?
A YouTube video's address, or its id, and optionally a language. Of url and video_id, send one of the two. Optional: language and segments.
How is it counted?
Billed per request: a run that returns data costs 1 unit, however many records it returns. A run that fails, that meets something not supported yet, or that you cancel costs nothing. The first 1,000 units each month are free.
What does it not do?
A video without captions has no transcript to return, and a stream that is still on air has none yet. Captions are returned in a language the video offers. Nothing is translated. An age-restricted video's captions are shown only to a signed-in viewer and are not read.
How long are the records kept, and in what format do they come?
Records are kept for 7 days after the run ended, and read in pages of up to 1,000. They come as JSON, as NDJSON with one record a line, or as CSV with a column for each field.
Can an AI assistant call it?
Yes. Through the EnrichedNow MCP server an assistant calls the tool run_scraper with the scraper_id youtube.transcript and the same input. It costs what the same API call costs.
YouTube
YouTube's public pages, as a visitor who is not signed in sees them.
YouTube search
youtube.searchA search query. The videos, Shorts, channels and playlists YouTube lists for the query, in its order; or, with type movie, the films of YouTube Movies & TV with their genre, year and credits.
YouTube video
youtube.videoA YouTube video's address, or its id. Its title, description, channel, dates, length, views, likes, comment count, tags, hashtags, chapters and caption languages.
YouTube channel
youtube.channelA YouTube channel's address, handle or id. Its name, description, subscribers, video count, country, join date, total views, links, avatar and banner.
YouTube channel videos
youtube.channel_videosA YouTube channel's address, handle or id. The videos on the channel's Videos tab, newest first.
YouTube channel Shorts
youtube.channel_shortsA YouTube channel's address, handle or id. The Shorts on the channel's Shorts tab, newest first: title, views and cover image.
YouTube channel live streams
youtube.channel_streamsA YouTube channel's address, handle or id. The streams on the channel's Live tab: on air now, scheduled and past, with viewers, views and length.
YouTube channel playlists
youtube.channel_playlistsA YouTube channel's address, handle or id. The playlists the channel lists on its Playlists tab: title, number of videos and cover image.
YouTube playlist
youtube.playlistA YouTube playlist's address, or its id. The videos in the playlist, in its order: title, length, views, age and thumbnail.
YouTube comments
youtube.commentsA YouTube video's address, or its id. The comments under the video, top or newest first, with replies if you ask for them: text, likes, reply count, time, pinned and hearted marks, and the author's channel.
YouTube Music search
youtube.music_searchWords to search YouTube Music for: a song, an artist, an album. The top result and the songs, videos, albums, singles, artists, playlists and episodes YouTube Music lists, each with its kind, title, artists, the plays or audience shown, the year for an album, and its address.
- Industry
- Social and video
- Where
- Worldwide
Run it on an input of your own.
Create an account, make a key, and send the request above with your own input. The first 1,000 units each month are free.