zomato
npm package for Zomato API
Installation
Install using npm:
npm install zomato
Usage
Require library
var zomato = ;
Create client
var client = zomato;
Get a list of categories. List of all restaurants categorized under a particular restaurant type can be obtained using /Search API with Category ID as inputs.
client;
Find the Zomato ID and other details for a city . You can obtain the Zomato City ID in one of the following ways -
- City Name in the Search Query - Returns list of cities matching the query
- Using coordinates - Identifies the city details based on the coordinates of any location inside a city
If you already know the Zomato City ID, this API can be used to get other details of the city
client;
Returns Zomato Restaurant Collections in a City. The location/City input can be provided in the following ways -
- Using Zomato City ID
- Using coordinates of any location within a city
List of all restaurants listed in any particular Zomato Collection can be obtained using the '/search' API with Collection ID and Zomato City ID as the input.
client;
Get a list of all cuisines of restaurants listed in a city. The location/city input can be provided in the following ways -
-Using Zomato City ID -Using coordinates of any location within a city
List of all restaurants serving a particular cuisine can be obtained using '/search' API with cuisine ID and location details
client;
Get a list of restaurant types in a city. The location/City input can be provided in the following ways -
-Using Zomato City ID -Using coordinates of any location within a city
List of all restaurants categorized under a particular restaurant type can obtained using /Search API with Establishment ID and location details as inputs
client;
Get Foodie and Nightlife Index, list of popular cuisines and nearby restaurants around the given coordinates
client;
Get Foodie Index, Nightlife Index, Top Cuisines and Best rated restaurants in a given location
client;
Search for Zomato locations by keyword. Provide coordinates to get better search results
client;
Search for Zomato locations by keyword. Provide coordinates to get better search results
client;
Get detailed restaurant information using Zomato restaurant ID. Partner Access is required to access photos and reviews.
client;
Get restaurant reviews using the Zomato restaurant ID
client;
The location input can be specified using Zomato location ID or coordinates. Cuisine / Establishment / Collection IDs can be obtained from respective api calls. Partner Access is required to access photos and reviews.
Examples -
- To search for 'Italian' restaurants in 'Manhattan, New York City', set cuisines = 55, entity_id = 94741 and entity_type = zone
- To search for 'cafes' in 'Manhattan, New York City', set establishment_type = 1, entity_type = zone and entity_id = 94741
- Get list of all restaurants in 'Trending this Week' collection in 'New York City' by using entity_id = 280, entity_type = city and collection_id = 1
client;