2

My goal is a script to download captions of youtube videos, multilanguage - mostly songs with lyrics or subtitled talks.

I found that captions can be downloaded only if owner of them or are enabled by third-contribution: Downloading captions always returns a 403

How to search for youtube videos filtering out ones that do not have captions in the specified language, and have third-party contribution enabled for captions?

I could not find a reference in the tutorial:

Workaround

An alternative approach for me may be to search for videos that only have lyrics in the description using API V3, but I haven't found a guide on how to restrict keyword search to description and not whole snippet. I tried with part=snippet.description in search list.

Community
  • 1
  • 1
user305883
  • 1,635
  • 2
  • 24
  • 48
  • In the same [Search.list](https://developers.google.com/youtube/v3/docs/search/list) docs you found, there's an optional parameter you can use called 'videoCaption'. The videoCaption parameter indicates whether the API should filter video search results based on whether they have captions. If you specify a value for this parameter, you must also set the type parameter's value to video. It can filter for videos that have captions, do not have captions or any. – ReyAnthonyRenacia Oct 23 '16 at 23:08
  • VideoCaption param cannot filter for captions enabled by third-party contribution. So when you want to download a caption, you may get error 403 (see first link in description). – user305883 Oct 24 '16 at 19:15
  • Youtube API may not support this then. You'll just have to rely on your own workaround. – ReyAnthonyRenacia Oct 25 '16 at 18:19

0 Answers0