When I try to get more than 5 reviews, the same set of reviews are returned back by the 'reviews' API.
I am getting the reviews using curl requests. For example, I am trying to get 10 reviews of 'Impromptu' with the start index as 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"
It gives me the same reviews as it would give, if I didn't give the start and count parameters as the following :
curl -X GET --header "Accept: application/json" --header "user-key: <API_KEY>" "https://developers.zomato.com/api/v2.1/reviews?res_id=311104"
Thus, I get only 5 reviews for a said restaurant. Is this a limitation of my API_KEY?
Try using V1 API, with something like:
https://api.zomato.com/v1/reviews.json/RESTAURANT-ID/user?count=0&apikey=YOUR-KEY
Setting the count parameter value as 0
, will return all the reviews, for the given restaurant ID. Other positive values (< 50) will return the mentioned number of reviews.
Currently, you can get the first 500 characters of the latest 5 reviews of a given restaurant through Zomato public API. That is why the variation in start-and-count parameters does not affect the result set from reviews API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With