Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube /v3/search API no longer returning live videos

I was using the YouTube search API to retrieve live videos by channel ID, but recently, the API has begun to return an empty response.

For example, I am retrieving from https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&eventType=live&key={YOUTUBE_KEY}&channelId=UCPde4guD9yFBRzkxk2PatoA which should return all videos which are live from channelID = UCPde4guD9yFBRzkxk2PatoA. This channel has a 24/7 live stream, but the response I get back is:

{
 "kind": "youtube#searchListResponse",
 "etag": "\"8jEFfXBrqiSrcF6Ee7MQuz8XuAM/-f6JA5_OcXz2RWuH1mpAA2_9mM8\"",
 "regionCode": "US",
 "pageInfo": {
  "totalResults": 0,
  "resultsPerPage": 5
 },
 "items": []
}

As I mentioned before, this request was retrieving data fine up until recently. I was unable to find any changes on the YouTube API docs, so I'm wondering if anyone has any idea on what changed or if there's a different approach I can take to pull live videos by channel ID.

like image 349
ceejayc7 Avatar asked Sep 10 '19 18:09

ceejayc7


People also ask

Why is YouTube API not working?

My YouTube API Key is Not Working Your API key may not be working because you're using it for the wrong project. Be sure you're using the key for the project that you created it for, especially if you created multiple projects at the same time. If it's still not working, consider creating a new API key entirely.

Did YouTube change its API?

July 12, 2022. The YouTube API Services Terms of Service has been updated.

Can you still use YouTube API v2?

You can continue using the v2 API for comments and uploading video captions for now, and we'll be adding this functionality into the v3 API soon.

Does YouTube API have a limit?

You can find the quota available to your application in the API Console. Projects that enable the YouTube Data API have a default quota allocation of 10,000 units per day, an amount sufficient for the overwhelming majority of our API users.


1 Answers

Not an answer, but it seems that endpoint isn't returning ANY recent videos that would include live. From what I can tell it doesn't return anything published in the previous 24 hours.

Found an open issue on Google Support https://support.google.com/youtube/thread/14611425?hl=en

like image 159
another-cranky-old-guy Avatar answered Oct 05 '22 03:10

another-cranky-old-guy