TopTable API Documentation

Search and discover restaurants across Toronto, Tel Aviv, and New York. Built for AI agents and developers.

Free — No API KeyREST + MCP25,000+ Restaurants

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.

Required header
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:

HeaderDescription
X-RateLimit-RemainingRequests remaining in the current window
Retry-AfterSeconds to wait before retrying (only on 429 responses)

Base URL

https://gettoptable.com/api/v1

All endpoints are read-only (GET only). Responses are JSON with Content-Type: application/json. CORS is enabled for all origins.

Endpoints

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

ParameterTypeDescription
cityrequiredstringCity to search. One of: toronto, tel-aviv, new-york
cuisinestringFilter by cuisine type, e.g. italian, japanese, mexican
minRatingnumberMinimum Google rating (1.0 to 5.0)
minReviewsnumberMinimum number of Google reviews
pricestringComma-separated price levels: $, $$, $$$, $$$$
areastringNeighborhood slug, e.g. yorkville, florentin. Use the /cities endpoint to discover valid area slugs.
vibestringOccasion or atmosphere filter. One of: date_night, groups, work_outing, brunch, drinks, coffee, foodie, family, remote_work, business_lunch
dishstringSearch by dish, e.g. sushi, hummus, croissant
featuresstringComma-separated feature requirements, e.g. outdoor_seating,good_cocktails
openNowstringSet to 1 to only return currently open restaurants (uses the city’s local timezone)
bookablestringSet to 1 to only return restaurants with online reservation links
sortBystringSort order. One of: rating, reviews, newest. Default: quality-ranked
pageintegerPage number (1-5). Default: 1
limitintegerResults per page (1-20). Default: 20

Example Request

curl
curl "https://gettoptable.com/api/v1/search?city=toronto&cuisine=italian&limit=2" \
  -H "User-Agent: MyApp/1.0"

Example Response

200 OK
{
  "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

FieldTypeDescription
citystringCity slug that was searched
queryobjectEcho of the filters that were applied
results[]arrayArray of matching restaurants
.idintegerUnique restaurant ID (use with /places/:id)
.rankintegerPosition in the result set
.namestringRestaurant name
.ratingnumberGoogle rating (1.0-5.0)
.review_countintegerNumber of Google reviews
.pricestring|nullPrice level ($, $$, $$$, $$$$) or null
.cuisinestringPrimary cuisine type
.areastring|nullNeighborhood name
.addressstring|nullFull street address
.coordinatesobject{ lat, lng } for mapping
.open_nowboolean|nullWhether the restaurant is currently open (null if unknown)
.urlstringTopTable page URL for this restaurant
totalintegerTotal matching restaurants across all pages
pageintegerCurrent page number
per_pageintegerNumber of results returned on this page
pagesintegerTotal 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

ParameterTypeDescription
idrequiredintegerRestaurant ID (from search results)

Query Parameters

ParameterTypeDescription
cityrequiredstringCity the restaurant is in. One of: toronto, tel-aviv, new-york

Example Request

curl
curl "https://gettoptable.com/api/v1/places/10516?city=toronto" \
  -H "User-Agent: MyApp/1.0"

Example Response

200 OK
{
  "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)

FieldTypeDescription
hoursobject|nullWeekly schedule, e.g. { "monday": "11:00-22:00" }. Days may be omitted if unknown.
top_dishesstring[]Up to 5 dishes this restaurant is known for
highlightsstring[]Up to 5 curated feature highlights (e.g. “Romantic Date Night Spot”, “Beautiful Patio”)
photosstring[]Up to 3 photo URLs
reservation_urlstring|nullLink to book a reservation (OpenTable, Resy, etc.)
menu_urlstring|nullLink 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
curl "https://gettoptable.com/api/v1/cities" \
  -H "User-Agent: MyApp/1.0"

Example Response (truncated)

200 OK
{
  "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 StatusError CodeDescription
400MISSING_USER_AGENTUser-Agent header is required
400INVALID_CITYCity parameter is missing or not a supported city
400INVALID_PAGEPage number is out of range (1-5)
404NOT_FOUNDRestaurant with the given ID was not found
429RATE_LIMITEDRate limit exceeded (5 req/min). Check Retry-After header.
500INTERNAL_ERRORServer error

Error Response Example

400 Bad Request
{
  "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

Search for date-night Italian restaurants in Toronto
curl "https://gettoptable.com/api/v1/search?city=toronto&cuisine=italian&vibe=date_night" \
  -H "User-Agent: MyApp/1.0"
Get restaurant details
curl "https://gettoptable.com/api/v1/places/10516?city=toronto" \
  -H "User-Agent: MyApp/1.0"

JavaScript (fetch)

search.js
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)

search.py
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

Run via npx
npx @toptable/mcp

Claude Desktop Setup

Add this to your Claude Desktop configuration file (claude_desktop_config.json):

claude_desktop_config.json
{
  "mcpServers": {
    "toptable": {
      "command": "npx",
      "args": ["@toptable/mcp"]
    }
  }
}

Cursor Setup

Add to your .cursor/mcp.json:

.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.