OpenTable restaurant search with open times
Restaurants OpenTable lists for a place, cuisine or restaurant name (or a position) on a date, time and party size: id, name, link, cuisine, dining style, price band, neighborhood, address, position, rating and review count, bookings today, description, a highlighted review, offers, awards, takeout, online ordering, private dining, outdoor and bar seating, largest party, phone, photos, and the open reservation times around the requested time (date, time, slot type, seating, points). Filter by cuisine, neighborhood, price band, tag, award, seating and feature ids (each answer's filters lists them with counts); sort by rating, distance, name or newest. total is the number of matching restaurants. 50 per page: pass next_page back as page; null on the last page.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
term | string | Place, cuisine or restaurant name, e.g. Chicago, italian, sushi. Give this, a position, or both. Example: italian |
latitude | number | Latitude to search around, e.g. 40.7128. Example: 40.7128 |
longitude | number | Longitude to search around, e.g. -74.006. Example: -74.006 |
date | string | Reservation date (YYYY-MM-DD, default tomorrow). |
time | string | Reservation time, 24-hour HH:MM (default 19:00). |
party_size | integer | Party size (default 2). |
sort | featured | rating | distance | name | newest | Order (default featured). |
cuisines | string | Cuisine ids from the filters list, comma-separated. |
neighborhoods | string | Neighborhood ids from the filters list, comma-separated. |
price_bands | string | Price bands, comma-separated: 2 ($30 and under), 3 ($31 to $50), 4 ($50 and over). |
tags | string | Tag ids from the filters list (e.g. charming), comma-separated. |
awards | string | Award ids from the filters list (e.g. MICHELIN), comma-separated. |
seating | string | Seating ids from the filters list (e.g. bar, outdoor), comma-separated. |
features | string | Feature ids from the filters list (e.g. Takeout), comma-separated. |
page | integer | Page number (next_page from the previous answer). |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/opentable/v1/search?term=italian" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/opentable/v1/search",
params={"term": "italian"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/opentable/v1/search");
url.searchParams.set("term", "italian");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).