Overview
This node retrieves the transcript (captions) of a specified YouTube video. It is useful for scenarios where you want to extract and analyze the spoken content of videos, such as generating subtitles, performing text analysis, or creating searchable video archives. For example, you can input a YouTube video URL or ID and get back the transcript in your preferred language, optionally including metadata like the channel ID, channel name, and video title.
Properties
| Name | Meaning |
|---|---|
| Youtube Video ID or Url | The YouTube video identifier or full URL from which to extract the transcript. |
| Preferred Caption Language | The language code (e.g., "en", "ko", "jp") specifying the preferred caption language to retrieve. |
| Return Channel ID | Whether to include the channel's unique identifier in the output (true/false). |
| Return Channel Name | Whether to include the channel's display name in the output (true/false). |
| Return Title | Whether to include the video's title in the output (true/false). |
Output
The node outputs an array of JSON objects, each corresponding to an input item. Each JSON object contains:
youtubeId: The normalized YouTube video ID.transcript(optional): The full transcript text extracted from the captions in the preferred language or fallback language. The transcript is cleaned by removing extra spaces, commas, and newlines.channelId(optional): The unique identifier of the channel that published the video.channelName(optional): The display name of the channel.title(optional): The title of the YouTube video.
No binary data is output by this node.
Dependencies
- This node depends on the external library
youtubeito interact with YouTube and fetch video details and captions. - No special API keys or authentication tokens are required since it uses public YouTube data accessible without credentials.
- Requires internet access to query YouTube.
Troubleshooting
- Invalid YouTube URL or ID: If the provided URL does not contain a valid video identifier, the node throws an error indicating the invalid URL. Ensure the input is a correct YouTube video URL or ID.
- No Captions Available: If the video has no captions in the preferred language or any language, the transcript field will be empty or missing.
- Language Fallback: If the preferred caption language is not available, the node tries English ("en") or falls back to the first available caption language.
- Network Issues: Failures to retrieve video information may occur due to network problems or changes in YouTube’s API. Check connectivity and try again.
- Continue On Fail: If enabled, the node continues processing other items even if one fails, returning error details in the output.
Links and References
- YouTube Captions and Transcripts
- youtubei GitHub Repository (for the underlying library used)
