npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

zomato-developers

v1.0.1

Published

Zomato API call.

Readme

Zomato-developers

Zomato APIs give you access to the freshest and most exhaustive information for over 1.5 million restaurants across 10,000 cities globally. With the Zomato APIs, you can :

  • Search for restaurants by name, cuisine, or location
  • Display detailed information including ratings, location and cuisine
  • Use the Zomato Foodie Index to show great areas to dine in a city

Prerequisites

  • Credentials

    • Go here and create your API key.

Basic: Get free and instant access to restaurant information and search APIs (up to 1000 calls/day). API key generated is neccessary and will be required to accesss zomato APIs.

Getting started

Install using npm :

npm i zomato-developers --save

Usage

A seperate example has been added in the repository displaying usage of the package.

Zomato.getCategories

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

Zomato.getCategories(API_key, Type).then((result) => {
	console.log(result)
}).catch(function(err){
	console.log(err)
})

Type : Type could be id ,name or undefined.

Zomato.getCities

Find the Zomato ID and other details for a city . You can obtain the Zomato City ID in one of the following ways:

  1. City Name in the Search Query - Returns list of cities matching the query
  2. 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.

Zomato.getCities(API_key, Data).then((result) => {
	console.log(result)
}).catch(function(err){
	console.log(err)
});

Data : Data is an object having q, lat, lon, city_ids and count. Input it in same order.

Zomato.getCollection

Returns Zomato Restaurant Collections in a City. The location/City input can be provided in the following ways -

  1. Using Zomato City ID
  2. 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

Zomato.getCollection(ZomatoKey, city_id, Data).then((result) => {
	console.log(result)
}).catch(function(err) {
	console.log(err)
})

Data : Data is an object having city_id, lat, lon and count. Pass parameter in same order.

Zomato.getCuisines

Get a list of all cuisines of restaurants listed in a city. The location/city input can be provided in the following ways -

  1. Using Zomato City ID
  2. 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

Zomato.getCuisines(API_Key, city_id, Data).then((result) => {
	console.log(result)
}).catch(function(err){
	console.log(err)
})

Data : Data is an object having city_id, lat and lon . Pass parameter in same order.

Zomato.getEstablishment

Get a list of restaurant types in a city. The location/City input can be provided in the following ways -

  1. Using Zomato City ID
  2. 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

Zomato.getEstablishment(API_Key, city_id, Data).then((result) => {
	console.log(result)
}).catch(function(err){
	console.log(err)
})

Data : Data is an object having city_id, lat and lon . Pass parameter in same order.

Zomato.getGeocode

Get Foodie and Nightlife Index, list of popular cuisines and nearby restaurants around the given coordinates

Zomato.getGeocode(zomatoUserKey, lat, lon).then((result) => {
	console.log(result)
}).catch(function(err) {
	console.log(err)
})

Zomato.getLocationDetails

Get Foodie Index, Nightlife Index, Top Cuisines and Best rated restaurants in a given location

Zomato.getLocationDetails(API_Key, city_id, LocationType).then((result) => {
	console.log(result)
}).catch(function(err) {
	console.log(err)
})

Zomato.getLocation

Search for Zomato locations by keyword. Provide coordinates to get better search results

Zomato.getLocation(API_Key, Query, Data).then((result) => {
	console.log(result)
}).catch(function(err){
	console.log(err)
})

Data : Data is an object having lat, lon and count . Pass parameter in same order.

Zomato.getDailyMenu

Get daily menu using Zomato restaurant ID

Zomato.getDailyMenu(API_Key, Res_ID).then((result) => {
	console.log(result)
}).catch(function(err) {
	console.log(err)
})

Zomato.getRestaurant

Get detailed restaurant information using Zomato restaurant ID. Partner Access is required to access photos and reviews.

Zomato.getRestaurant(API_Key, Res_ID).then((result) => {
	console.log(result)
}).catch(function(err){
	console.log(err)
})

Zomato.getReviews

Get restaurant reviews using the Zomato restaurant ID. Only 5 latest reviews are available under the Basic API plan.

Zomato.getReviews(API_Key, Res_ID, Data).then((result) => {
	console.log(result)
}).catch(function(err){
	console.log(err)
})

Data : Data is an object having start and count. Place parameters in the same order.

Zomato.getSearch

The location input can be specified using Zomato location ID or coordinates. Cuisine / Establishment / Collection IDs can be obtained from respective api calls. Get up to 100 restaurants by changing the 'start' and 'count' parameters with the maximum value of count being 20. Partner Access is required to access photos and reviews.

Zomato.getSearch(API_Key, Data).then((result) => {
	console.log(result)
}).catch(function(err) {
	console.log(err)
})

Data : Data is an object having entity_id, entity_type, q, start, count, lat, lon, radius, cuisines, establishment_type, collection_id, category, sort and order. Place parameters in the same order.

Parameters | Data type -----------|-------- API_Key|string Type|string city_id|integer lat|double lon|double LocationType|string query|string Res_ID|integer

Contributing

Code can be made more efficient and customised. Any contribution towards that will be appreciated.