Youtube api data with video type also returns channel

Youtube api data erroneously returns one channel, even if "type = video" is set.

For example, the query https://www.googleapis.com/youtube/v3/search?q=coldplay&type=video&key=API_KEY&part=snippet&maxResults=10&fields=items(snippet/title,id/videoId) "returns the following result:

{ "items": [ { "id": { "videoId": "YykjpeuMNEk" }, "snippet": { "title": "Coldplay - Hymn For The Weekend (Official Video)" } }, { "id": { "videoId": "z9BPMjL44Aw" }, "snippet": { "title": "Coldplay & Big Sean - Miracles (Someone Special) - Official Lyric Video" } }, { "id": { "videoId": "FM7MFYoylVs" }, "snippet": { "title": "The Chainsmokers & Coldplay - Something Just Like This (Lyric)" } }, { "id": { "videoId": "KnLNG0WnGsI" }, "snippet": { "title": "Coldplay - All I Can Think About Is You (Official Lyric Video)" } }, { "id": { "videoId": "we-LaiQNY5s" }, "snippet": { "title": "Coldplay - ALIENS (Official Lyric Video)" } }, { "id": { "videoId": "WXmTEyq5nXc" }, "snippet": { "title": "Coldplay - Hypnotised (Official Lyric Video)" } }, { "id": { "videoId": "BPNTC7uZYrI" }, "snippet": { "title": "Coldplay - Up&Up (Official Video)" } }, { "id": { "videoId": "VPRjCeoBqrI" }, "snippet": { "title": "Coldplay - A Sky Full Of Stars (Official Video)" } }, { "id": { "videoId": "QtXby3twMmI" }, "snippet": { "title": "Coldplay - Adventure Of A Lifetime (Official Video)" } }, { "snippet": { "title": "Coldplay Official" } }, ] } 

The last result is here for the channel and does not have a "videoId".

Why does this problem occur? Is there something wrong with my request url?

+5
source share

Source: https://habr.com/ru/post/1270690/


All Articles