问题
I'm would like to develop an application which searches restaurants in a given location and also displays the restaurant's menu details.
Are there any existing APIs which I could reuse to develop such a restaurant search?
回答1:
yes you can use Yahoo local search API for this. see this link for more info.. http://developer.yahoo.com/search/local/V3/localSearch.html
回答2:
You can also try using the Locu API
Documentation: https://dev.locu.com/documentation/
The basic query that I used to get menu information of restaurants by location is shown below:
curl -X POST https://api.locu.com/v2/venue/search -d '{
"api_key" : "[insert api key]",
"fields" : [ "name", "menus" ],
"venue_queries" :
[
{
"location" :
{
"locality" : ["insert city name"]
}
}
]
}'
I then used http://curl.trillworks.com to convert my query into python (with the requests module) to actually perform the data pull. I hope this helps!
来源:https://stackoverflow.com/questions/6454795/restaurant-menu-search-api