当我从Java代码、 Postman 或Web浏览器调用此URL时
URL:
https://customsearch.googleapis.com/customsearch/v1?key=AIzaSyCca5akhZ492pP08QBchz5Q4QA6kFYsBrc&cx=923a7bcc712ee431d&searchType=image&imgUrl=https://media.gq.com/photos/5a5f79d52316871dcb3c837f/master/w_1600,c_limit/Dua_Lipa_02.jpg
回复:
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"errors": [
{
"message": "Request contains an invalid argument.",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT"
}
}
1条答案
按热度按时间h43kikqp1#
您必须使用q参数来定义图像url而不是imageUrl