curl - 如何从 Zomato API 获得更多评论

标签 curl zomato-api

当我尝试获得超过 5 条评论时,“评论”API 会返回相同的评论集。

我正在使用 curl 请求获取评论。例如,我试图获得 10 条关于“即兴”的评论,起始索引为 20。
curl -X GET --header "Accept: application/json" --header "user-key: <API_KEY>" "https://developers.zomato.com/api/v2.1/reviews?res_id=311104&start=20&count=10"
如果我没有提供如下的 start 和 count 参数,它会给我提供相同的评论:
curl -X GET --header "Accept: application/json" --header "user-key: <API_KEY>" "https://developers.zomato.com/api/v2.1/reviews?res_id=311104"
因此,对于上述餐厅,我只得到 5 条评论。这是我的 API_KEY 的限制吗?

最佳答案

尝试使用 V1 API,例如:
https://api.zomato.com/v1/reviews.json/RESTAURANT-ID/user?count=0&apikey=YOUR-KEY
将计数参数值设置为 0 , 将返回给定餐厅 ID 的所有评论。其他正值 (< 50) 将返回提到的评论数量。

关于curl - 如何从 Zomato API 获得更多评论,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36494354/

相关文章:

php - HTML 页面上的 preg_replace 给出 net::ERR_INVALID_CHUNKED_ENCODING

node.js - 如何通过 zomato api 获取超过 100 家餐厅?

web-services - cURL + HTTP 和 RESTful Web 服务有什么区别?

python - 为什么来自服务器的 cURL 响应是 HTTP/1.0?

windows - powershell中的curl格式化

javascript - 无法访问 Zomato API JSON 对象

php - 通过 sendgrid 发送的电子邮件未送达

node.js - 无法访问Zomato开发人员页面

javascript - 评论返回为 [Object Object]