Skip to content

In this project, I have used Zomato-API to get the details of restaurants present in a particular location.

License

Notifications You must be signed in to change notification settings

anandpatel504/Zomato-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zomato-API

In this project, I have used Zomato-API (https://developers.zomato.com/) to get the details of restaurants present in a particular location. You'll be asked a location to fetch the details like average cost for two people, price ranges, has online delivery or not, and cuisines of that location.

Requirements

NodeJS and npm

If you're using Linux-based OS, install the latest version of Nodejs and npm, by typing the following commands on your terminal.

sudo apt update
sudo apt install build-essential apt-transport-https lsb-release ca-certificates curl

Then, for the Latest release (version 12), add this PPA, by typing the following command on your terminal

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt install nodejs

Now, you need to install necessary dependencies using npm (node-package-manager), open your termial, and first type
npm init to initialize package.json file. Then, type

npm install body-parser ejs express iplocation path public-ip zomato --save

How to Run?

Now, navigate to server.js file on your terminal, and run the following command to start your localhost server

node server.js

Endpoints

  • /categories

    • This endpoint presents you a list of all restaurants categorized under a particular restaurant type.
  • /geocode

    • This endpoint takes latitude and longitude to get the list of popular Cuisines, Foodie, Nightlife-index and nearby restaurants using your public IP address.
  • /search

    • This endpoint takes a location, and gives you the precise restaurant suggestions, using /geocode endpoint.

Now, open your browser, and type
http://localhost:{PORT}/{YOUR_ENDPOINT} to get the required details.

Happy coding ):

About

In this project, I have used Zomato-API to get the details of restaurants present in a particular location.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published