Description Methods Arguments References Examples
An API key is needed to bridge communication between R and Zomato. You can sign up the key here.
Restaurants:
dailymenu(res_id)
Get daily menu using Zomato restaurant ID.
restaurant(res_id)
Get detailed restaurant information using Zomato restaurant ID.
reviews(res_id)
Get restaurant reviews using the Zomato restaurant ID. Only 5 latest reviews are available under the Basic API plan.
search( query = NULL, lat = NULL, lon = NULL, radius = NULL, cuisines = NULL, establishment_type = NULL, collection_id = NULL, category = NULL, sort = NULL, order = NULL )
The location input can be specified using Zomato location ID or coordinates. cuisine/establishment/ collection IDs can be obtained from respective api calls.
Location:
location_details(entity_id, entity_type)
Get Foodie Index, Nightlife Index, Top Cuisines and Best rated restaurants in a given location
locations(query, lat = NULL, lon = NULL)
Search for Zomato locations by keyword. Provide coordinates to get better search results.
Common:
categories()
Get a list of categories. List of all restaurants categorized under a particular restaurant type can be obtained using /search API with
cities(query, lat = NULL, lon = NULL, city_ids = NULL)
Find the Zomato ID and other details for a city.
collections(city_id = NULL, lat = NULL, lon = NULL)
Returns Zomato Restaurant Collections in a city.
cuisines(city_id = NULL, lat = NULL, lon = NULL)
Get a list of all cuisines of restaurants listed in a city.
establishments(city_id = NULL, lat = NULL, lon = NULL)
Get a list of restaurant types in a city.
geocode(lat, lon)
Get Foodie and Nightlife Index, list of popular cuisines and nearby restaurants around the given coordinates.
res_id
, entity_id
, city_id
: identifiers in integer
query
: string that you search for
lat
, lon
: geo coordinates in double
entity_type
: string
sort
: NULL
, "cost", "rating", "real_distance"
order
: NULL
, "asc", "desc"
Parameters without defaults are required to specify.
https://developers.zomato.com/documentation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
zmt <- zomato$new("your-api-key")
zmt
mugen <- zmt$search(query = "Mugen Ramen & Bar", lat = -37.81, lon = 144.96)
zmt$reviews(res_id = mugen$id[1])
zmt$restaurant(res_id = mugen$id[1])
zmt$locations(query = "Melbourne", -37.8136, 144.9631)
zmt$location_details(93747, "zone")
zmt$categories()
zmt$cities(query = "Melbourne")
zmt$collections(259)
zmt$cuisines(259)
zmt$establishments(259)
zmt$geocode(-37.8136, 144.9631)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.