Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to search YouTube subtitles?

Suppose I want to find list of videos which have the phrase "French presidential election" in its subtitle.

Can I do this using YouTube API?

It will be perfect if it can even search within both human-generated and auto-generated subtitles. But it will be good enough if it can search either of the two types of subtitles.

like image 884
user42459 Avatar asked May 03 '17 07:05

user42459


2 Answers

You may refer with this documentation. You can use Captions: list which returns a list of caption tracks that are associated with a specified video.

Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track.

You need to provide the videoId parameter that specifies the YouTube video ID of the video for which the API should return caption tracks.

Here's a related thread: How to add Subtitles to Youtube video using Youtube API?

like image 171
abielita Avatar answered Sep 27 '22 23:09

abielita


If you want to just search the subtitles from a particular video that is open on youtube.com you can view all the subtitles by selecting 'Open Transcript' from the ... button which is displayed below the main video window and to the right of the title (to the right of SAVE) - then you can just search them using the browser's page search functionality (i.e. Mac: +F, Win: Ctrl+F)

like image 35
Pierz Avatar answered Sep 27 '22 22:09

Pierz