问题
Getting 400 error while exploring YoutubeData API V3 for search. It accepts parameters like:
part = snippet
location = 12.9667,77.5667
locationRadius = 50km
But it gives me the response below :
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:
I've faced the same problem. Documentation says
Note that you must set the type parameter to video if you set a value for the eventType, videoCaption, videoCategoryId, videoDefinition, videoDimension, videoDuration, videoEmbeddable, videoLicense, videoSyndicated, or videoType parameters.
Though nothing mentioned about location parameter, adding type = "video"
to parameter list has solved my problem.
来源:https://stackoverflow.com/questions/30436458/invalid-combination-of-search-filters-and-or-restrictions-for-youtube-data-api-v