首先,我获得了 zomato api。然后我使用 nodejs fetch 从 api 获取餐馆。
0-19 项:
https://developers.zomato.com/api/v2.1/search?entity_id=259&entity_type=city&start=0&count=20
20-40 项:
https://developers.zomato.com/api/v2.1/search?entity_id=259&entity_type=city&start=20&count=20
40-60 项:
https://developers.zomato.com/api/v2.1/search?entity_id=259&entity_type=city&start=40&count=20
60-80 项:
https://developers.zomato.com/api/v2.1/search?entity_id=259&entity_type=city&start=60&count=20
80-100 项:
https://developers.zomato.com/api/v2.1/search?entity_id=259&entity_type=city&start=80&count=20
100-120(此后开始返回空记录)
https://developers.zomato.com/api/v2.1/search?entity_id=259&entity_type=city&start=100&count=20
我的问题是,这是否是退回更多商品的一种方式。
最佳答案
特定搜索条件的上限限制为 100 个结果。通过搜索 API 无法获取超过 100 个列表(这适用于基本 API 和合作伙伴 API 访问)。
关于node.js - 如何通过 zomato api 获取超过 100 家餐厅?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45545705/