This project was created for one purpose — to make OpenTable data easily accesible to developers. No longer do you have to download XLS file, parse it and insert into your app's database. That shit is annoying.
It is absolutely free and open for everyone to use.
Created by @dan_sosedoff while drinking beers with @alwaysunday in Austin, TX.
- API Endpoint: http://opentable.heroku.com/api
- Response Format: JSON
GET /api/restaurants
Parameters: (at least one required)
name
- Name of the restaurant (optional)address
- Address line. Should not contain state or city or zip. (optional)state
- State code (ex.: IL) (optional)city
- City name (ex.: Chicago) (optional)zip
- Zipcode (ex: 60601) (optional)
Returns response:
{
"count": 521,
"per_page": 25,
"current_page": 1,
"restaurants": [ ... ]
}
GET /api/restaurants/:id
Returns a single restaurant record, see reference for details.
{
"id": 55807,
"name": "ALC Steaks (Austin Land & Cattle)",
"address": "1205 N. Lamar Blvd",
"city": "Austin",
"state": "TX",
"area": "Austin",
"postal_code": "78703",
"country": "US",
"phone": "5124721813",
"token": "D70F992E",
"reserve_url": "http://www.opentable.com/single.aspx?rid=55807",
"mobile_reserve_url": "http://mobile.opentable.com/opentable/?restId=55807"
}
To generate a proper reservation link just ref parameter with your affiliate ID to reserve_url or mobile_reserve_url
You can use simple client library i wrote — https://gist.github.com/2504683
Example:
api = OpenTable::Client.new
# Find restaurants
resp = api.restaurants(:city => "Chicago")
# Process response
resp['count'] # => records found
resp['restaurants'] # => restaurant records
# Fetch a single record
api.restaurant(81169)