OpenTable restaurant reviews
All diner reviews of one OpenTable restaurant, a page at a time: review id, text, overall, food, service, ambience and value ratings, noise level, reviewer nickname, metro, review count and VIP flag, dined and submitted dates, review type, helpful votes, the restaurant's public reply, highlighted passages (start and end offsets in the text when q is given), review photos, and whether the review is from the restaurant's previous concept. Sort by newest, highest or lowest rating; q keeps only reviews mentioning a word or phrase. Identify the restaurant by its opentable.com/r/<name> link or name part, or by the numeric restaurant_id from /opentable/v1/search or /opentable/v1/restaurant (faster). total is the number of matching reviews; 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 |
|---|---|---|
restaurant | string | An opentable.com/r/<name> link or its <name> part, e.g. patrizias-of-brooklyn. Give this or restaurant_id. Example: patrizias-of-brooklyn |
restaurant_id | integer | The restaurant's numeric OpenTable id (the id from /opentable/v1/search or /opentable/v1/restaurant), e.g. 1006366. Used instead of restaurant when both are given. |
sort | newest | highest | lowest | Order: newest (default), highest or lowest rating first. |
q | string | Only reviews mentioning this word or phrase, e.g. pasta. |
page | integer | Page number (default 1). |
page_size | integer | Reviews per page (default 10, at most 50). |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/opentable/v1/reviews?restaurant=patrizias-of-brooklyn" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/opentable/v1/reviews",
params={"restaurant": "patrizias-of-brooklyn"},
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/reviews");
url.searchParams.set("restaurant", "patrizias-of-brooklyn");
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).