After trying to get download SRT files from our videos via this API for 2 days, I think there is something broken with the captions API.
So to keep things as simple as possible, we tried getting it working just using the API explorer on :
https://developers.google.com/youtube/v3/docs/captions/download
But even here, I get a 404 error.
Our setup:
- We are the channel owner, we are only trying to get our own subtitles/captions
- We have a valid API key
- We are using oAuth
- We are retrieving the captionID using https://www.googleapis.com/youtube/v3/captions/?videoId=xxAx0kOOAo8&key=XXXXXXX
- Here’s a sample caption id we are using for the query : AUieDaaebuQ4e7334VHqXqIIEiYfJI7IQAkJp0U6tO_7PSv0dao
Have tried multiple iterations of including and not including the tlang and tfmt values.
I can feed the videoID into a 3rd party captions downloader and it works instantly, so there’s defintely a file there.
Anyone got any ideas?
It’s one of the undocumented changes. You can now only use the API unless you (see this ticket in Google issue tracker):
- Own the video
- The video owner has granted permission
Alternatively, you can use:
- This Python script from another StackOverflow answer.
- Or the good plain old yt-dlp
1