Overview
This node fetches the transcript of a YouTube video using its Video ID. It is useful for automating workflows that require extracting spoken content from YouTube videos, such as generating subtitles, performing sentiment analysis, or archiving video transcripts for documentation purposes.
Example scenarios:
- Automatically transcribing educational videos for searchable knowledge bases.
- Extracting text for further natural language processing (NLP) tasks.
- Creating summaries or highlights from video content.
Properties
| Display Name | Type | Meaning |
|---|---|---|
| Video ID | String | The unique identifier of the YouTube video whose transcript you want to fetch. This is required. |
Output
The node outputs an array of items, each with the following structure in the json field:
{
"youtubeId": "<Video ID>",
"transcript": [
{
"text": "<Transcript segment>",
"start": <Start time in seconds>,
"duration": <Duration in seconds>
},
...
]
}
- youtubeId: The Video ID provided as input.
- transcript: An array of transcript segments, where each segment contains:
- text: The spoken text.
- start: The start time of the segment in seconds.
- duration: The 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 the
youtube-transcriptpackage. - No API key is required for public videos with available transcripts.
Troubleshooting
Common Issues:
- Empty Video ID: If the Video ID property is empty, the node will throw an error:
"The video ID parameter is empty." - No Transcript Available: If the video does not have a transcript (e.g., auto-generated captions are disabled), the node may return an error from the underlying library.
- Invalid Video ID: Providing an invalid or non-existent Video ID will result in an error.
- Empty Video ID: If the Video ID property is empty, the node will throw an error:
Error Handling:
- If "Continue On Fail" is enabled, errors are returned in the output under the
errorfield for the affected item. - Otherwise, the workflow execution stops on error.
- If "Continue On Fail" is enabled, errors are returned in the output under the