hlidotbe
hlidotbe

Reputation: 908

YouTube api returns empty results where video exists

Using the youtube API, I get no results for either channels list, search, ... for a channel where there is some content.

There is no error returned, just an empty set. No channels, no video, nothing either in the API explorer or through my code.

Everything was working correctly up until a few days/weeks (hard to tell when since I had no errors)

curl -v 'https://www.googleapis.com/youtube/v3/search?key=[api_key]&channelId=UCKTgGP9lrL5Yjs4f8WuI1Vw&part=snippet,id&order=date&maxResults=20'

is the query I used but I tried to get the uploads channel id as some answers here advised but the channels/list endpoint is empty too. I checked the documentation and I couldn't find anything wrong with my query.

This is the answer I currently get:

{
 "kind": "youtube#searchListResponse",
 "etag": "\"ksCrgYQhtFrXgbHAhi9Fo5t0C2I/nrqzXB-_ht29Bt6u-f7_lLyFcCw\"",
 "regionCode": "BE",
 "pageInfo": {
  "totalResults": 0,
  "resultsPerPage": 20
 },
 "items": []
}

and you can see here https://www.youtube.com/channel/UCKTgGP9lrL5Yjs4f8WuI1Vw/videos that it's not empty.

Upvotes: 0

Views: 1094

Answers (1)

Luigi De Rosa
Luigi De Rosa

Reputation: 720

Try to add type=video as param, it seems working :)

Upvotes: 2

Related Questions