搜索过滤器的组合无效和/或Youtube数据api v3搜索的限制

时间:2015-05-25 10:41:31

标签: youtube-api youtube-data-api

在浏览YoutubeData API V3进行搜索时出错400。  它接受如下参数:

part = snippet

location = 12.9667,77.5667

locationRadius = 50km

但它给出了以下回复:

400 Bad Request


{
"error": {
 "errors": [
{
 "domain": "youtube.search",
 "reason": "invalidSearchFilter",
 "message": "Invalid combination of search filters and/or restrictions.",
"locationType": "parameter",
"location": ""
}
],
"code": 400,
"message": "Invalid combination of search filters and/or restrictions."
}
}

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题。 Documentation

  

请注意,如果为eventType,videoCaption,videoCategoryId,videoDefinition,videoDimension,videoDuration,videoEmbeddable,videoLicense,videoSyndicated或videoType参数设置了值,则必须将type参数设置为video。

虽然没有提及位置参数,但是将type = "video"添加到参数列表已经解决了我的问题。