Youtube数据api错误地返回一个频道,即使" type = video"已经确定了。
例如,查询" https://www.googleapis.com/youtube/v3/search?q=coldplay&type=video&key=API_KEY&part=snippet&maxResults=10&fields=items(snippet/title,id/videoId)"返回以下结果:
{
"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 - A L I E N S (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"
}
},
]
}
此处为频道的最后结果,并且没有" videoId"。
为什么会出现这个问题?我的查询网址有什么问题吗?