Is it possible to search YouTube subtitles?
Asked Answered
K

2

7

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.

Kauri answered 3/5, 2017 at 7:29 Comment(1)
Did you find a way?Microscope
C
3

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?

Conundrum answered 3/5, 2017 at 16:19 Comment(1)
This does not answer the question, which is how to search through ALL videos for particular wordsRemillard
N
1

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)

Norling answered 13/7, 2021 at 13:2 Comment(1)
This does not answer the question, which is how to search through ALL videos for particular wordsRemillard

© 2022 - 2024 — McMap. All rights reserved.