TopTable API Documentation
Search and discover restaurants across Toronto, Tel Aviv, and New York. Built for AI agents and developers.
Overview
TopTable provides a free, public REST API for restaurant discovery. Every restaurant in our database has been analyzed by AI to extract 127 features across 20 categories — things like “romantic atmosphere,” “great cocktails,” “outdoor seating,” or “best for date night” — based on what real diners say in their Google reviews.
The API returns the same data that powers gettoptable.com, formatted for programmatic consumption. It is designed for:
- AI agents — ChatGPT, Claude, Gemini, or custom assistants that need real restaurant data instead of hallucinated recommendations
- Developers — building trip planners, concierge apps, Slack bots, or any tool that needs structured restaurant data
We also provide an MCP server for direct integration with Claude Desktop, Cursor, and other MCP-compatible AI tools.
Authentication
The TopTable API is free and does not require an API key. The only requirement is a User-Agent header that identifies your application.
User-Agent: YourApp/1.0 (contact@example.com)Requests without a User-Agent header will receive a 400 error with code MISSING_USER_AGENT.
Rate Limits
All API endpoints share a rate limit of 5 requests per minute per IP address. Rate limit status is returned in the response headers:
| Header | Description |
|---|---|
X-RateLimit-Remaining | Requests remaining in the current window |
Retry-After | Seconds to wait before retrying (only on 429 responses) |
Base URL
https://gettoptable.com/api/v1All endpoints are read-only (GET only). Responses are JSON with Content-Type: application/json. CORS is enabled for all origins.
Endpoints
GET /api/v1/search
Search and filter restaurants. Returns a paginated list of places matching your criteria, ranked by quality. Maximum 20 results per page, up to 5 pages of results.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
cityrequired | string | City to search. One of: toronto, tel-aviv, new-york |
cuisine | string | Filter by cuisine type, e.g. italian, japanese, mexican |
minRating | number | Minimum Google rating (1.0 to 5.0) |
minReviews | number | Minimum number of Google reviews |
price | string | Comma-separated price levels: $, $$, $$$, $$$$ |
area | string | Neighborhood slug, e.g. yorkville, florentin. Use the /cities endpoint to discover valid area slugs. |
vibe | string | Occasion or atmosphere filter. One of: date_night, groups, work_outing, brunch, drinks, coffee, foodie, family, remote_work, business_lunch |
dish | string | Search by dish, e.g. sushi, hummus, croissant |
features | string | Comma-separated feature requirements, e.g. outdoor_seating,good_cocktails |
openNow | string | Set to 1 to only return currently open restaurants (uses the city’s local timezone) |
bookable | string | Set to 1 to only return restaurants with online reservation links |
sortBy | string | Sort order. One of: rating, reviews, newest. Default: quality-ranked |
page | integer | Page number (1-5). Default: 1 |
limit | integer | Results per page (1-20). Default: 20 |
Example Request
curl "https://gettoptable.com/api/v1/search?city=toronto&cuisine=italian&limit=2" \
-H "User-Agent: MyApp/1.0"Example Response
{
"city": "toronto",
"query": {
"cuisine": "italian"
},
"results": [
{
"id": 10516,
"rank": 1,
"name": "Scaddabush Italian Kitchen & Bar Don Mills",
"rating": 4.8,
"review_count": 4294,
"price": "$$",
"cuisine": "Italian",
"area": "Leaside",
"address": "67 O'Neill Rd, Toronto, ON M3C 0H2, Canada",
"coordinates": {
"lat": 43.73378,
"lng": -79.34455
},
"open_now": true,
"url": "https://gettoptable.com/toronto/places/scaddabush-italian-kitchen-and-bar-don-mills"
},
{
"id": 1087,
"rank": 2,
"name": "Edna + Vita",
"rating": 4.8,
"review_count": 1700,
"price": null,
"cuisine": "Italian",
"area": "Downtown",
"address": "77 Adelaide St W, Toronto, ON M5H 0E2, Canada",
"coordinates": {
"lat": 43.649384,
"lng": -79.382509
},
"open_now": true,
"url": "https://gettoptable.com/toronto/places/edna-vita"
}
],
"total": 367,
"page": 1,
"per_page": 2,
"pages": 5
}Response Fields
| Field | Type | Description |
|---|---|---|
city | string | City slug that was searched |
query | object | Echo of the filters that were applied |
results[] | array | Array of matching restaurants |
.id | integer | Unique restaurant ID (use with /places/:id) |
.rank | integer | Position in the result set |
.name | string | Restaurant name |
.rating | number | Google rating (1.0-5.0) |
.review_count | integer | Number of Google reviews |
.price | string|null | Price level ($, $$, $$$, $$$$) or null |
.cuisine | string | Primary cuisine type |
.area | string|null | Neighborhood name |
.address | string|null | Full street address |
.coordinates | object | { lat, lng } for mapping |
.open_now | boolean|null | Whether the restaurant is currently open (null if unknown) |
.url | string | TopTable page URL for this restaurant |
total | integer | Total matching restaurants across all pages |
page | integer | Current page number |
per_page | integer | Number of results returned on this page |
pages | integer | Total number of pages available (max 5) |
GET /api/v1/places/:id
Get detailed information about a single restaurant, including hours, top dishes, curated highlights, photos, and reservation/menu links.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
idrequired | integer | Restaurant ID (from search results) |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
cityrequired | string | City the restaurant is in. One of: toronto, tel-aviv, new-york |
Example Request
curl "https://gettoptable.com/api/v1/places/10516?city=toronto" \
-H "User-Agent: MyApp/1.0"Example Response
{
"id": 10516,
"name": "Scaddabush Italian Kitchen & Bar Don Mills",
"rating": 4.8,
"review_count": 4294,
"price": "$$",
"cuisine": "Italian",
"area": "Leaside",
"address": "67 O'Neill Rd, Toronto, ON M3C 0H2, Canada",
"coordinates": {
"lat": 43.73378,
"lng": -79.34455
},
"open_now": true,
"hours": {
"sunday": "11:00-22:00",
"monday": "11:00-22:00",
"tuesday": "11:00-22:00",
"wednesday": "11:00-22:00",
"thursday": "11:00-23:00",
"friday": "11:00-23:00",
"saturday": "11:00-23:00"
},
"top_dishes": ["pasta", "pizza", "mozzarella", "steak", "cheesecake"],
"highlights": [
"Great for Large Groups",
"Romantic Atmosphere",
"Family-Friendly",
"Perfect for Special Occasions",
"Business Meeting Spot"
],
"photos": [
"https://lh3.googleusercontent.com/..."
],
"reservation_url": "https://www.opentable.ca/...",
"menu_url": "https://scaddabush.com/menu/...",
"url": "https://gettoptable.com/toronto/places/scaddabush-italian-kitchen-and-bar-don-mills"
}Additional Response Fields (beyond search)
| Field | Type | Description |
|---|---|---|
hours | object|null | Weekly schedule, e.g. { "monday": "11:00-22:00" }. Days may be omitted if unknown. |
top_dishes | string[] | Up to 5 dishes this restaurant is known for |
highlights | string[] | Up to 5 curated feature highlights (e.g. “Romantic Date Night Spot”, “Beautiful Patio”) |
photos | string[] | Up to 3 photo URLs |
reservation_url | string|null | Link to book a reservation (OpenTable, Resy, etc.) |
menu_url | string|null | Link to the restaurant’s menu |
GET /api/v1/cities
List all available cities with metadata, neighborhoods, and supported vibes. Use this endpoint to discover valid values for the city and area parameters in the search endpoint.
Example Request
curl "https://gettoptable.com/api/v1/cities" \
-H "User-Agent: MyApp/1.0"Example Response (truncated)
{
"cities": [
{
"id": "tel-aviv",
"name": "Tel Aviv",
"country": "Israel",
"timezone": "Asia/Jerusalem",
"center": { "lat": 32.0853, "lng": 34.7818 },
"place_count": 3394,
"areas": [
{ "id": "florentin", "name": "Florentin" },
{ "id": "neve-tzedek", "name": "Neve Tzedek" },
{ "id": "rothschild", "name": "Rothschild / Lev HaIr" }
],
"vibes": [
"date_night", "groups", "work_outing", "brunch",
"drinks", "coffee", "foodie", "family",
"remote_work", "business_lunch"
]
},
{
"id": "toronto",
"name": "Toronto",
"country": "Canada",
"timezone": "America/Toronto",
"center": { "lat": 43.6532, "lng": -79.3832 },
"place_count": 9205,
"areas": [
{ "id": "yorkville", "name": "Yorkville" },
{ "id": "queen-west", "name": "Queen West" },
{ "id": "kensington-market", "name": "Kensington Market" }
],
"vibes": ["..."]
},
{
"id": "new-york",
"name": "New York",
"country": "United States",
"timezone": "America/New_York",
"center": { "lat": 40.7128, "lng": -74.006 },
"place_count": 12331,
"areas": [],
"vibes": ["..."]
}
]
}Errors
All error responses follow a consistent format with an error code and a human-readable message.
| HTTP Status | Error Code | Description |
|---|---|---|
400 | MISSING_USER_AGENT | User-Agent header is required |
400 | INVALID_CITY | City parameter is missing or not a supported city |
400 | INVALID_PAGE | Page number is out of range (1-5) |
404 | NOT_FOUND | Restaurant with the given ID was not found |
429 | RATE_LIMITED | Rate limit exceeded (5 req/min). Check Retry-After header. |
500 | INTERNAL_ERROR | Server error |
Error Response Example
{
"error": "INVALID_CITY",
"message": "Required parameter 'city' must be one of: tel-aviv, toronto, new-york",
"available_cities": ["tel-aviv", "toronto", "new-york"]
}Code Examples
curl
curl "https://gettoptable.com/api/v1/search?city=toronto&cuisine=italian&vibe=date_night" \
-H "User-Agent: MyApp/1.0"curl "https://gettoptable.com/api/v1/places/10516?city=toronto" \
-H "User-Agent: MyApp/1.0"JavaScript (fetch)
const BASE_URL = "https://gettoptable.com/api/v1";
async function searchRestaurants(city, filters = {}) {
const params = new URLSearchParams({ city, ...filters });
const res = await fetch(`${BASE_URL}/search?${params}`, {
headers: { "User-Agent": "MyApp/1.0" },
});
if (!res.ok) {
const err = await res.json();
throw new Error(err.message);
}
return res.json();
}
async function getRestaurant(city, id) {
const res = await fetch(`${BASE_URL}/places/${id}?city=${city}`, {
headers: { "User-Agent": "MyApp/1.0" },
});
if (!res.ok) {
const err = await res.json();
throw new Error(err.message);
}
return res.json();
}
// Example: Find brunch spots in Tel Aviv
const results = await searchRestaurants("tel-aviv", {
vibe: "brunch",
minRating: 4.5,
});
console.log(`Found ${results.total} brunch spots`);
for (const r of results.results) {
console.log(` ${r.rank}. ${r.name} (${r.rating}) - ${r.area}`);
}Python (requests)
import requests
BASE_URL = "https://gettoptable.com/api/v1"
HEADERS = {"User-Agent": "MyApp/1.0"}
def search_restaurants(city, **filters):
params = {"city": city, **filters}
resp = requests.get(f"{BASE_URL}/search", params=params, headers=HEADERS)
resp.raise_for_status()
return resp.json()
def get_restaurant(city, place_id):
resp = requests.get(
f"{BASE_URL}/places/{place_id}",
params={"city": city},
headers=HEADERS,
)
resp.raise_for_status()
return resp.json()
# Example: Find the best sushi in New York
results = search_restaurants("new-york", dish="sushi", minRating=4.5)
print(f"Found {results['total']} sushi restaurants")
for r in results["results"]:
print(f" {r['rank']}. {r['name']} ({r['rating']}) - {r['area']}")
# Get details for the top result
if results["results"]:
top = results["results"][0]
detail = get_restaurant("new-york", top["id"])
print(f"\nTop dishes: {', '.join(detail['top_dishes'])}")
print(f"Highlights: {', '.join(detail['highlights'])}")MCP Server
TopTable provides a Model Context Protocol (MCP) server that lets AI assistants like Claude, ChatGPT, and Cursor search restaurants directly. The MCP server wraps the same REST API documented above.
Installation
npx @toptable/mcpClaude Desktop Setup
Add this to your Claude Desktop configuration file (claude_desktop_config.json):
{
"mcpServers": {
"toptable": {
"command": "npx",
"args": ["@toptable/mcp"]
}
}
}Cursor Setup
Add to your .cursor/mcp.json:
{
"mcpServers": {
"toptable": {
"command": "npx",
"args": ["@toptable/mcp"]
}
}
}Available MCP Tools
search_restaurants
Search for restaurants with filters for cuisine, price, neighborhood, vibe, specific dishes, and more. Returns up to 20 results ranked by quality.
Parameters: city (required), cuisine, minRating, price, area, vibe, dish, features, openNow, page
get_restaurant_details
Get detailed information about a specific restaurant including hours, top dishes, curated highlights, photos, and reservation/menu links.
Parameters: city (required), id (required)
list_cities
List all available cities with neighborhoods, coordinates, and timezone. Use this to discover valid city and area values for search.
No parameters required.
Contact
Found a bug, have a feature request, or need a higher rate limit? Let us know.