Even if I change count parameter to something else, it's always returning 20 responses only. Is this a limitation of basic zomato API?
Asked
Active
Viewed 2,775 times
0
-
Seems like a question you could ask to the creators of the API. Probably they have a forum and/or implementation guides. – miken32 Feb 03 '17 at 00:47
1 Answers
4
Zomato API was made in order to ease the pagination process on search results. Hence, at a time you can fetch a maximum of 20 restaurants. Varying the API parameters 'start' and 'count' can get you upto 100 restaurants, for example, you can search from result number 1 to 20 and also result number 60 to 80 and likewise by varying API parameters multiple times to obtain all the subset of results that are provided by the search API. Here's an example:
https://developers.zomato.com/api/v2.1/search?entity_id=1&entity_type=city&start=0&count=20 gives you restaurants from 1 to 20
and
https://developers.zomato.com/api/v2.1/search?entity_id=1&entity_type=city&start=20&count=20 gives you restaurants from 21 to 40

Rohit Chandna
- 251
- 1
- 6
-
3
-
3There is a limitation to 100 items when using the API, that is why you can not search for start > 80. – Rohit Chandna Feb 20 '17 at 13:13