Youtube Transcripts avatar

Youtube Transcripts

Pricing

from $5.00 / 1,000 transcripts

Go to Apify Store
Youtube Transcripts

Youtube Transcripts

Extract 1 transcript or 1000s of YouTube transcripts fast. Save time & effort . Get accurate structured transcripts or captions in seconds for each video & short. Export in various formats,, JSON, XML, HTML, CSV, EXCEL... Boost your productivity!

Pricing

from $5.00 / 1,000 transcripts

Rating

5.0

(15)

Developer

karamelo

karamelo

Maintained by Community

Actor stats

240

Bookmarked

8.2K

Total users

758

Monthly active users

14 days ago

Last modified

Share

YouTube Transcript Scraper: Extract Captions and Video Metadata

YouTube Transcript Scraper extracts available captions from public YouTube videos and Shorts, then saves each processed video as a structured dataset record. Add one URL or a batch of URLs, choose the transcript format you need, and optionally include video metadata such as the title, channel, publication date, views, likes, comments, tags, thumbnail, and description.

Use the Actor as a YouTube transcript downloader for content research, caption analysis, accessibility workflows, search indexing, dataset creation, or automated video monitoring. Results can be exported as JSON, CSV, Excel, XML, and other formats supported by the Apify Dataset, or collected programmatically through the Apify API.

The default output is a clean array of caption lines. You can instead request timestamped segments, XML with or without timing attributes, or a single transcript string. The Actor processes standard YouTube video links, shortened youtu.be links, and Shorts URLs. A transcript is returned only when captions are available for the source video; this Actor does not create a transcript from the audio track.

What you can do with this YouTube transcript scraper

  • Extract captions from one video or a URL batch — submit a single YouTube link for a quick task or process multiple videos in one run.
  • Choose from five transcript formats — receive text lines, timestamped segments, XML, or one continuous text string to match your downstream workflow.
  • Collect only the metadata you need — enable individual fields for channel details, dates, engagement metrics, tags, thumbnails, and descriptions.
  • Process videos and Shorts — use common YouTube watch, shortened, and Shorts link formats without manually extracting video IDs.
  • Keep useful failure records — when a valid video cannot be processed, the dataset can include a status and reason so you can review the affected item.
  • Export and automate the results — download the dataset in common formats, schedule runs, connect webhooks, or retrieve records through the API.

Common use cases

Content research and editorial planning

  • Search transcripts for recurring topics, terminology, names, questions, and claims across a set of videos.
  • Compare how several channels cover the same subject using transcript text together with titles, dates, and engagement metadata.
  • Turn caption text into research notes, summaries, outlines, or source indexes while retaining the originating videoId.

Caption analysis and accessibility workflows

  • Review available captions for readability, terminology, or quality-control issues.
  • Use timestamped segments to locate the original moment in a video.
  • Convert caption data into a format suitable for internal accessibility review or subtitle-processing pipelines.

Search, NLP, and dataset creation

  • Build a text corpus from public video captions for topic classification, entity extraction, sentiment analysis, or semantic search.
  • Store one normalized row per video and use videoId as the stable source identifier.
  • Combine transcripts with optional titles, channel IDs, publication dates, and keywords for filtering and analysis.

Monitoring and workflow automation

  • Run a recurring list of video URLs and send the resulting dataset to a spreadsheet, database, data warehouse, or internal application.
  • Trigger downstream processing after a run finishes by using Apify webhooks.
  • Retrieve transcript records through the API for document pipelines, knowledge bases, or content review systems.

Getting started

  1. Open the Actor in Apify Console.
  2. Paste one or more public YouTube video URLs into URL(s) of the YouTube Video(s).
  3. Keep Text array for a simple transcript, or select another output format.
  4. Enable any optional video metadata fields you need.
  5. Start with a small run and inspect the Dataset before increasing the batch size.
  6. Export the records or connect the run to your automated workflow.

Simplest successful input

This input requests the default array of caption lines for one video:

{
"urls": [
"https://www.youtube.com/watch?v=aqz-KE-bpKQ"
]
}

Get a transcript with timestamps

Use textWithTimestamps when you need each caption segment with start and end times in seconds:

{
"urls": [
"https://youtu.be/aqz-KE-bpKQ"
],
"outputFormat": "textWithTimestamps",
"maxRetries": 8
}

Extract transcripts with selected video metadata

Each metadata switch is independent. The following example adds source and engagement fields without requesting every available field:

{
"urls": [
"https://www.youtube.com/watch?v=aqz-KE-bpKQ",
"https://www.youtube.com/shorts/aqz-KE-bpKQ"
],
"outputFormat": "singleStringText",
"channelNameBoolean": true,
"channelIDBoolean": true,
"datePublishedBoolean": true,
"viewCountBoolean": true,
"keywordsBoolean": true,
"thumbnailBoolean": true,
"descriptionBoolean": true
}

The URLs above are illustrative. Use distinct, currently available public videos for a real batch.

Input reference

Video sources and transcript format

ParameterTypeDefaultRequiredDescription
urlsarray of stringsYesYouTube video URLs to process. Common watch, youtu.be, and Shorts links are accepted. Invalid links are skipped.
outputFormatstringcaptionsNoTranscript representation used for every video in the run. Accepted values are captions, textWithTimestamps, xmlWithoutTimestamps, xmlWithTimestamps, and singleStringText.
maxRetriesinteger8NoMaximum retry setting for a request. The allowed range is 3–12. A higher value may help with transient failures but can make an unsuccessful item take longer.

Optional video metadata

All metadata switches default to false. When a switch is disabled, its corresponding field is normally omitted from successful records.

ParameterOutput fieldDescription
channelNameBooleanchannelNameIncludes the name of the channel that published the video.
channelIDBooleanchannelIDIncludes the channel's stable YouTube identifier.
dateTextBooleandateTextIncludes a readable publication date such as Feb 7, 2025.
relativeDateTextBooleanrelativeDateTextIncludes a run-relative date such as 3 days ago. Its value changes over time.
datePublishedBooleandatePublishedIncludes the publication date as an ISO 8601 timestamp.
viewCountBooleanviewCountIncludes the view count as formatted text, for example 12,345 views.
likesBooleanlikesIncludes the available like count as a formatted string.
commentsBooleancommentsIncludes the available comment count as a formatted string.
keywordsBooleankeywordsIncludes video keywords or tags as a comma-separated string when available.
thumbnailBooleanthumbnailUrlIncludes a URL for the video thumbnail.
descriptionBooleandescriptionIncludes the video's description text.

Optional metadata is source-dependent. A requested field can be null when YouTube does not expose a value for that video.

Transcript output formats

The selected value of outputFormat changes the type and shape of captions:

Valuecaptions typeBest suited for
captionsarray of stringsReading, keyword search, and simple text processing
textWithTimestampsarray of objectsSegment-level analysis and locating moments in a video
xmlWithoutTimestampsstringXML workflows that do not need timing attributes
xmlWithTimestampsstringPreserving the available caption XML and timing data
singleStringTextstringSummarization, indexing, and document-oriented NLP workflows

If the video has no available caption track, captions is null or a null-style value appropriate to the selected format. English captions are preferred when available; otherwise, the first available caption track may be returned. There is currently no input for selecting a specific caption language.

Dataset output

One dataset row represents one valid video URL that reached processing. A successful row always includes videoId, title, and captions; enabled metadata fields are added to the same flat record. A failed video can include diagnostic fields instead of transcript content.

Example successful record

This shortened example uses textWithTimestamps and several optional metadata fields:

{
"videoId": "aqz-KE-bpKQ",
"title": "Example public video",
"channelName": "Example channel",
"channelID": "UC000000000000000000000",
"datePublished": "2025-02-07T00:00:00.000Z",
"viewCount": "12,345 views",
"keywords": "sample, demonstration, video",
"thumbnailUrl": "https://img.youtube.com/vi/aqz-KE-bpKQ/maxresdefault.jpg",
"captions": [
{
"start": 0.5,
"end": 2.8,
"text": "First illustrative caption line."
},
{
"start": 2.8,
"end": 5.1,
"text": "Second illustrative caption line."
}
]
}

The values above are illustrative, and the caption array is shortened.

Output field reference

FieldTypeWhen presentDescription
videoIdstring or nullProcessed rowsYouTube's identifier for the video.
titlestring or nullProcessed rowsVideo title available at run time.
channelNamestring or nullWhen requestedPublishing channel name.
channelIDstring or nullWhen requestedPublishing channel identifier.
datePublishedstring or nullWhen requestedPublication date in ISO 8601 format.
dateTextstring or nullWhen requestedHuman-readable publication date.
relativeDateTextstring or nullWhen requestedRelative publication date calculated at run time.
viewCountstring or nullWhen requestedSource-reported views formatted as text.
likesstring or nullWhen requestedSource-reported likes formatted as text.
commentsstring or nullWhen requestedSource-reported comments formatted as text.
keywordsstring or nullWhen requestedComma-separated video keywords or tags.
thumbnailUrlstring or nullWhen requestedVideo thumbnail URL.
descriptionstring or nullWhen requestedVideo description.
captionsarray, string, or nullProcessed rowsTranscript content in the format selected by outputFormat. Timestamped arrays contain start, end, and text.
statusstring or nullFailed rowsProcessing or availability status for the video.
reasonstring or nullFailed rowsAdditional source-reported context when available.
processedBystring or nullFailed rowsProcessing category recorded for the failed item.
transcriptFoundboolean or nullFailed rowsfalse when a transcript could not be produced for the failed item.

How to build a searchable YouTube transcript dataset

  1. Create a list of public video URLs relevant to one topic, channel set, or research question.
  2. Start with outputFormat: "singleStringText" so each transcript is easy to index as one document.
  3. Enable channelIDBoolean, datePublishedBoolean, keywordsBoolean, and descriptionBoolean to add filtering context.
  4. Run a small sample and remove videos with missing captions before scaling the list.
  5. Use videoId as the source key in your database or search index.
  6. Preserve datePublished as the source publication date and record your own collection time separately in the destination system.
  7. Re-run selected URLs on a schedule only when your workflow needs refreshed engagement metadata or caption changes.

For NLP or retrieval workflows, keep the original videoId beside every derived chunk or embedding. This makes it possible to trace generated summaries and search results back to the source video.

How to review timestamped captions

  1. Set outputFormat to textWithTimestamps.
  2. Keep the first run small and confirm the target videos expose captions.
  3. For each object in captions, use start and end as seconds from the beginning of the video.
  4. Search the text values for the phrase, name, or topic under review.
  5. Use the matching start time to locate and verify the surrounding context in the original video.

Caption segments follow the timing and segmentation made available by the source. Adjacent segments may split sentences, contain line breaks, or include non-speech labels. Join or clean segments in your downstream workflow only if that transformation matches your use case.

API and automation

Use the Actor ID karamelo/youtube-transcripts with Apify API clients. Store your API token securely and never place a real token in shared code or input.

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('karamelo/youtube-transcripts').call({
urls: ['https://www.youtube.com/watch?v=aqz-KE-bpKQ'],
outputFormat: 'singleStringText',
channelNameBoolean: true,
datePublishedBoolean: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('karamelo/youtube-transcripts').call(run_input={
'urls': ['https://www.youtube.com/watch?v=aqz-KE-bpKQ'],
'outputFormat': 'textWithTimestamps',
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

The call methods above wait for the Actor run to finish before retrieving the default dataset. For asynchronous pipelines, start the run, wait or poll until it reaches a terminal status, and only then retrieve dataset items. Apify schedules can start recurring runs, while webhooks can notify a downstream service after completion.

Exports and integrations

The default Dataset can be downloaded in formats supported by Apify, including JSON, CSV, Excel, XML, and HTML. Choose the export that fits the shape of captions: JSON preserves timestamped arrays and other structured values most accurately, while tabular formats are convenient for review in spreadsheets.

A typical automation flow is:

schedule or application → Actor input → completed run → Dataset → export, webhook, or API client → analysis or storage

Spreadsheet exports work well for titles and selected metadata. For transcript analysis, databases, search indexes, and data warehouses, JSON usually preserves the transcript representation with the least transformation.

Cost and run planning

Runs use Apify platform resources, and the exact amount depends on run duration, batch size, retry behavior, selected plan, and any Store pricing shown for the Actor. Review the current pricing information and run estimate in Apify Console before starting a large batch.

For cost control, begin with one to five representative URLs, keep the default metadata switches off unless you need those fields, and inspect caption availability before scaling. Increasing maxRetries can help with transient failures but can also increase the time spent on an unavailable item.

Tips for reliable results

  • Start with public videos that visibly offer captions. A public video can still return no transcript if the uploader and platform provide no caption track.
  • Use canonical video links where practical. Standard watch, shortened, and Shorts URLs are accepted, but a clean link is easier to audit and reuse.
  • Choose one output format for the downstream task. Timestamped objects are useful for locating moments; a single string is easier to index; JSON export best preserves nested data.
  • Enable metadata selectively. Optional fields add useful context, but a value may still be missing or null for a particular video.
  • Treat formatted metrics as text. viewCount, likes, and comments are strings in the dataset. Convert them deliberately if your analysis requires numeric values.
  • Do not assume input order is completion order. Batch items can finish at different times; match records with videoId.
  • Review failed rows. Use status, reason, and transcriptFound to separate unavailable videos from successful videos with no caption content.

Limitations and good-to-know details

  • The Actor extracts caption tracks that are available for a public video. It does not transcribe speech from the audio or generate new captions.
  • Private, deleted, region-restricted, age-restricted, members-only, unavailable, or otherwise inaccessible videos may fail or return incomplete data.
  • Caption coverage, language, segmentation, text, timing, and availability are controlled by the source video and can change.
  • English is preferred when available; otherwise, another available track may be selected. A specific language cannot currently be requested in the input.
  • The input schema does not define a fixed URL-count maximum. Practical batch size depends on video availability, retry settings, run resources, and platform limits.
  • Invalid URLs are skipped and may not produce a dataset row. Check the run log if the number of records is lower than the number of submitted links.
  • Optional metadata is best effort. Engagement counts and relative dates reflect what was available at run time and may later change.
  • outputFormat applies to the entire run; different formats require separate runs.
  • This Actor extracts transcript text and metadata, not video or audio media files.

Troubleshooting

SymptomLikely causeWhat to check or change
No dataset row for a submitted linkThe URL was invalid or did not contain a recognizable video IDUse a standard YouTube watch, youtu.be, or Shorts URL and remove unrelated query text if necessary.
A row has captions: nullThe video has no available caption track or the caption content could not be retrievedConfirm captions are visible on the public video and retry a small run later.
A row contains status and reasonThe video could not be processed or was unavailableReview those fields, confirm the video is public and playable, and try again only if the failure appears temporary.
Requested metadata is missing or nullThe value was not available for that videoConfirm the matching Boolean input is true; treat the field as optional in downstream code.
Batch output is smaller than the input listInvalid links were skipped or some videos were unavailableCompare input URLs with returned videoId values and review the run log.
A large run takes longer than expectedMore URLs or retries increase work per runTest a smaller batch and use the default retry value before increasing maxRetries.
CSV output is awkward for timestamped captionsNested arrays do not map naturally to table cellsExport JSON, or flatten caption segments in a downstream transformation.

Responsible use

Use this Actor only for lawful purposes and for content you are permitted to collect and process. You are responsible for complying with applicable laws, YouTube's terms, privacy obligations, copyright rules, and any restrictions that apply to your project and jurisdiction.

Transcripts can contain copyrighted material, personal data, sensitive statements, or errors inherited from automated captions. Keep source attribution where appropriate, verify important quotations against the original video, minimize unnecessary personal data, and do not use transcript data for prohibited profiling, harassment, spam, or deceptive activity. This section is practical guidance, not legal advice.

Frequently asked questions

Can this Actor download a YouTube transcript as text?

Yes. Choose captions for an array of text lines or singleStringText for one continuous string, then export the Dataset in your preferred format.

Can it extract captions with timestamps?

Yes. Set outputFormat to textWithTimestamps. Each caption segment contains start, end, and text, with time values expressed in seconds.

Does it work with YouTube Shorts?

Yes, Shorts URLs are accepted. A result still depends on the Short having an available caption track.

Can I process multiple YouTube videos in one run?

Yes. Add multiple strings to urls. Start with a small representative batch, review the results, and then scale based on availability and run cost.

Can I choose the transcript language?

Not currently. English is preferred when available; otherwise, the Actor may return the first available caption track.

Does it transcribe videos that have no captions?

No. It extracts available captions and does not perform speech-to-text transcription from video audio.

Why are likes, comments, or dates missing?

First confirm that the corresponding Boolean input is enabled. Even when requested, a field can be null if the value is unavailable for that video at run time.

Which export format should I use?

Use JSON to preserve arrays and timestamped objects. CSV or Excel is convenient for video-level metadata, while XML is available both as a Dataset export and as a transcript representation selected by outputFormat.

Can I run the scraper on a schedule or through an API?

Yes. Use Apify schedules for recurring runs, webhooks for completion events, and the Apify API clients to start the Actor and retrieve its default Dataset.

Extract your first YouTube transcript

Open YouTube Transcript Scraper, add one public video URL, and run the default text-array format. After you confirm the transcript and fields you need, expand the URL list or connect the Dataset to your automated workflow.