Youtube Transcript
AI-generatedOverview
This node retrieves the transcript of a specified YouTube video. It is useful for extracting the text content of video captions, which can be used for content analysis, accessibility improvements, or generating summaries. For example, users can input a YouTube video URL or ID and get the transcript in their preferred language, optionally including metadata like channel ID, channel name, and video title.
Use Case Examples
- Extracting the transcript of a tutorial video to create searchable text content.
- Generating subtitles or captions in a preferred language for accessibility.
- Collecting video metadata along with the transcript for content management.
Properties
| Name | Meaning |
|---|---|
| Youtube Video ID or Url | The YouTube video identifier or full URL from which to retrieve the transcript. |
| Preferred Caption Language | The language code (e.g., 'en', 'ko', 'jp') specifying the preferred caption language for the transcript. |
| Return Channel ID | Boolean flag to include the YouTube channel ID of the video in the output. |
| Return Channel Name | Boolean flag to include the YouTube channel name of the video in the output. |
| Return Title | Boolean flag to include the video title in the output. |
Output
JSON
youtubeId- The YouTube video ID extracted or provided.transcript- The concatenated transcript text of the video captions in the preferred language, cleaned of extra spaces and commas.channelId- The YouTube channel ID of the video, included if requested.channelName- The YouTube channel name of the video, included if requested.title- The title of the YouTube video, included if requested.
Dependencies
- Uses the 'youtubei' library to interact with YouTube and fetch video and caption data.
Troubleshooting
- If the provided YouTube URL does not contain a valid video ID, the node throws an error indicating the invalid URL.
- If the video information cannot be retrieved, a node operation error is thrown.
- If captions are not available in the preferred language, the node attempts to fall back to English or the first available language.
- Errors during transcript extraction are logged but do not stop the node unless 'Continue On Fail' is disabled.
- Ensure the input YouTube ID or URL is correct and accessible.
