1

I'm working on a documentary and looking for specific sound bites – wondering if anyone has ever developed a way to search YouTube transcripts en masse.

Like, as an example: if I'm looking for a clip of someone talking about pounds of e-waste, I could search for "million pounds of e-waste" and find any video where that phrase pops up in the transcript.

I'm surprised this doesn't already exist, since it would be so valuable to many different aspects of crediting, sourcing, and media production. So that leads me to think it's not possible or allowed w/the API for some reason.

jacobreed
  • 11
  • 1
  • 1
    AFAIK you can't search a video by its caption. However you can discover *all* YouTube videos with [a method similar as this one](https://stackoverflow.com/a/69259093/7123660) and retrieve their transcripts. I remember that pbesong#1660 on Discord was working on such a search engine based on YouTube videos captions. – Benjamin Loison Aug 23 '22 at 20:04
  • Note that [I finally implemented such a YouTube captions search engine](https://codeberg.org/Benjamin_Loison/YouTube_captions_search_engine). – Benjamin Loison Feb 26 '23 at 16:17

1 Answers1

0

I doubt there is such a way provided by YouTube to batch search all videos by transcript.

However, if you really want to get this result, the best way I can think of is as follows:

  • Make a search of videos about your topic - in this case, using the search term: "million pounds of e-waste"
  • For each video, get its transcripts/captions
  • Read the obtained transcripts/captions and mark those videos where the search term is found (either total or parcially).

You can check my answer (https://stackoverflow.com/a/70438847) for get a initial starting point for read the captions and search the text on its transcripts/captions.