Zomato

Zomato

Food & Drink

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

Visit API๐Ÿ” Alternatives

๐Ÿ“š Documentation & Examples

Everything you need to integrate with Zomato

๐Ÿš€ Quick Start Examples

Zomato Javascript Examplejavascript
// Zomato API Example
const response = await fetch('https://developers.zomato.com/api', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Getting Started with Zomato Public API

If you're a developer looking to integrate restaurant data into your application, Zomato Public API might be what you're looking for. Zomato is an online restaurant search and discovery platform that provides detailed information about restaurants, including menus, photos, user reviews, and more. Their API allows developers to access this data programmatically and build their applications around it. In this blog post, we'll explore how to use Zomato Public API by providing some JavaScript examples.

Getting Zomato API Access (Important Update)

Heads-up: the old public Zomato API that most tutorials reference โ€” the developers.zomato.com v2.1 endpoints authenticated with a user-key โ€” has been discontinued. You can no longer self-register for a free restaurant-search key, and code pointing at https://developers.zomato.com/api/v2.1/... will fail.

Zomato's current developer offering is the Zomato Developer Platform (zomato.com/developer/integration), which is a POS / partner integration program for restaurants and merchants operating on Zomato โ€” not a general-purpose data API. Access is granted through partner onboarding rather than instant signup, and it's governed by Zomato's API policy.

If your goal is general restaurant discovery, ratings or menu data, consider alternatives such as the Google Places API, Yelp Fusion API, or Foursquare Places, which still offer self-serve keys. The examples below remain only as a historical reference to how the retired API worked.

Example of HTTP Request

Here's an example of an HTTP request to the Zomato API endpoint to get a list of restaurants in a specific location.

const apiKey = 'your_api_key_here';
const location = 'Toronto';

//Set headers
const headers = new Headers({
  'Content-Type': 'application/json',
  'user-key': apiKey
});

//Make a GET request to the API with a location parameter
fetch(`https://developers.zomato.com/api/v2.1/locations?query=${location}`, { headers })
  .then(response => response.json())
  .then(data => {
    const locationID = data.location_suggestions[0].entity_id;
    console.log(`Location ID for ${location}: ${locationID}`);
    // Make a GET request to the restaurant search endpoint with location id parameter
    return fetch(`https://developers.zomato.com/api/v2.1/search?entity_id=${locationID}&entity_type=city`, { headers });
  })
  .then(response => response.json())
  .then(data => {
    console.log(data.restaurants);
  })
  .catch(error => console.error(error));

In this example, we are using the fetch function in JavaScript to make an HTTP GET request to the Zomato API with the location parameter. The response is a JSON object containing the location's ID, which can be used in another API request to get a list of restaurants in that location.

Example API Call

Here's an example of how to retrieve information about a specific restaurant using its ID.

const apiKey = 'your_api_key_here';
const restaurantID = '16507624';

// Set headers
const headers = new Headers({
  'Content-Type': 'application/json',
  'user-key': apiKey
});

// Make a GET request to the restaurant endpoint with restaurant id parameter
fetch(`https://developers.zomato.com/api/v2.1/restaurant?res_id=${restaurantID}`, { headers })
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));

In this example, we are using the fetch function in JavaScript to make an HTTP GET request to the Zomato API with the restaurantID parameter. The response is a JSON object containing detailed information about the restaurant.

Conclusion

This blog post provides some examples of how to use Zomato Public API. However, this is just the tip of the iceberg. Zomato Public API offers many more endpoints and parameters that allow developers to retrieve and manipulate restaurant data programmatically. If you're interested in exploring more, head over to their website and explore the documentation. Happy coding!

Explore More

Best Zomato alternatives (2026)Best Food & Drink APIs

Related APIs in Food & Drink