Overview
This node retrieves the transcript (subtitles) of a YouTube video, given either its Video ID or full URL. It is useful for automating workflows that require extracting spoken content from YouTube videos, such as content analysis, sentiment analysis, summarization, or archiving subtitles for accessibility purposes.
Practical examples:
- Automatically transcribe new YouTube uploads for content moderation.
- Extract transcripts for further processing in NLP pipelines.
- Archive video subtitles for compliance or documentation.
Properties
| Name | Type | Meaning |
|---|---|---|
| Youtube Video ID or Url | String | The unique identifier or full URL of the YouTube video whose transcript you want to fetch. |
Output
The node outputs a JSON object with the following structure:
{
"youtubeId": "<video_id>",
"transcript": [
{
"text": "<caption text>",
"start": <start time in seconds>,
"duration": <duration in seconds>
},
...
]
}
- youtubeId: The resolved YouTube video ID.
- transcript: An array of transcript segments, each containing:
- text: The caption text.
- start: Start time of the segment (in seconds).
- duration: Duration of the segment (in seconds).
If an error occurs and "Continue On Fail" is enabled, the output will be:
{
"error": "<error message>"
}
Dependencies
- External Service: Requires access to YouTube to fetch transcripts.
- npm package: Uses
youtube-transcriptfor fetching subtitles. - No API key is required for public videos with available transcripts.
Troubleshooting
Invalid YouTube URL format:
Error:"Invalid YouTube URL format. Please provide a valid URL or video ID."
Resolution: Ensure you enter a correct YouTube video URL or just the video ID.URL missing video identifier:
Error:"The provided URL doesn't contain a valid YouTube video identifier. URL: ..."
Resolution: Make sure the URL includes a validvparameter (e.g.,https://www.youtube.com/watch?v=VIDEO_ID).Transcript not available:
If the video has no transcript (e.g., auto-captions are disabled), the node may throw an error or return an empty transcript.Private or region-restricted videos:
The node cannot fetch transcripts for private or restricted videos.
