# OpenTable (Canada) — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and discover restaurants on OpenTable, view detailed information like menus and reviews, and check real-time dining availability across metro areas. Find top-rated restaurants in your location and instantly see which tables are open for your preferred date and time.

**Category:** Food & Dining | **Website:** [opentable.ca/](https://opentable.ca/) | **Docs:** [parse.bot/marketplace/d67a3066-cba5-4c1f-897f-be62279a1059/opentable-ca-api](https://parse.bot/marketplace/d67a3066-cba5-4c1f-897f-be62279a1059/opentable-ca-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-opentable-ca-api-d67a3066/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_booking_count

Get the 'Booked N times today' statistic for a specific restaurant. Accepts one of three mutually exclusive identifiers: slug, restaurant_id, or name. Returns the booking count and raw label text.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | No | Full restaurant name as a search term. Resolves by searching and matching the top result. |
| `restaurant_id` | integer | No | Numeric restaurant ID from search_restaurants results (restaurantId field). |
| `slug` | string | No | Restaurant URL slug (e.g., general-public-toronto). The path segment after /r/ in an OpenTable URL. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-opentable-ca-api-d67a3066/get_booking_count \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"<string>","restaurant_id":"<integer>","slug":"<string>"}'
```

### get_metro_areas

List supported metro areas and regions available on OpenTable Canada. Returns national metro links with names and landmark links. Use metro names as input to get_top_restaurants.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-opentable-ca-api-d67a3066/get_metro_areas \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_restaurant_availability

Get real-time available time slots for one or more restaurants on a given date and time. Returns slot details including time offsets from the requested time, availability tokens, seating types, and experience information. Requires restaurant IDs from search_restaurants results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | Yes | Booking date in YYYY-MM-DD format (e.g., 2026-06-25). |
| `party_size` | integer | No | Number of people. |
| `restaurant_ids` | string | Yes | Comma-separated list of numeric restaurant IDs (e.g., 1339783,251059). IDs are found in search_restaurants results as restaurantId. |
| `time` | string | Yes | Booking time in HH:MM format (e.g., 19:00). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-opentable-ca-api-d67a3066/get_restaurant_availability \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"<string>","party_size":"<integer>","restaurant_ids":"<string>","time":"<string>"}'
```

### get_restaurant_details

Fetch comprehensive details for a specific restaurant by its slug. Returns the full restaurant profile including description, dining style, hours, reviews, gallery photos, menus, editorial lists, private dining info, and availability state. The slug is the last segment of the restaurant's OpenTable profile URL (e.g., general-public-toronto from /r/general-public-toronto).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Restaurant slug from search results (e.g., general-public-toronto). Found in restaurant profile URLs after /r/. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-opentable-ca-api-d67a3066/get_restaurant_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_top_restaurants

Retrieve curated top-rated and featured restaurants for a specific city or metro area. Returns module lists organized by category (e.g., mealtime, premium marketplace, top booked). Each module contains restaurant listings with full details. Also returns FAQs about the metro area.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city` | string | Yes | City or metro name (e.g., Toronto, Vancouver, Montreal). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-opentable-ca-api-d67a3066/get_top_restaurants \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"city":"<string>"}'
```

### search_restaurants

Full-text search for restaurants by location, keyword, date, and party size. Returns restaurant listings with name, cuisine, rating, price band, neighborhood, address, coordinates, and photos. Results are server-paginated but this endpoint returns the first page. Each restaurant carries a restaurantId usable for availability lookups and a slug (from the profile URL) for detail fetches.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `covers` | integer | No | Number of people in the party. |
| `date_time` | string | No | Preferred date and time in ISO format (e.g., 2026-06-20T19:00:00). Omitting returns results for the current time. |
| `term` | string | Yes | Search term — a city name, neighborhood, cuisine, or restaurant name. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-opentable-ca-api-d67a3066/search_restaurants \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"covers":"<integer>","date_time":"<string>","term":"<string>"}'
```
