Skip to content

About

OpenTable scraper API: OpenTable Restaurant Details, OpenTable Restaurant Search as clean JSON. Python examples with requests, Scrapy, asyncio and the DataGuru SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

OpenTable Scraper API

Scrape OpenTable with a JSON API. This repo has working Python examples for DataGuru's OpenTable scraper APIs: OpenTable Restaurant Details and OpenTable Restaurant Search.

DataGuru runs the scraping, proxies, retries and parsing, and returns clean JSON. You pay only for successful requests, from $0.02 per request, out of a prepaid balance: no subscription. New accounts get $1.00 of free credit.

OpenTable APIs

API What it returns Price Page
OpenTable Restaurant Details Get an OpenTable restaurant from its URL, including cuisine, price band, detailed diner ratings, review summary, recent reviews, address and coordinates, contact details, hours, dress code, amenities, menus, experiences, popular dishes, photos, private dining and FAQs. $0.02 https://dataguru.cc/apis/opentable-restaurant-details/
OpenTable Restaurant Search Search OpenTable restaurants by cuisine, name or keyword in a city and get matching restaurants with cuisine, price band, diner ratings, review counts, neighborhood, address, coordinates, phone, photos and takeout options. $0.02 https://dataguru.cc/apis/opentable-restaurant-search/

Quick start

  1. Create a free account and an API key at dashboard.dataguru.cc.
  2. Install and run:
git clone https://github.com/dataguru-cc/opentable-scraper-api.git
cd opentable-scraper-api
pip install -r requirements.txt
export DATAGURU_API_KEY="your key"
python examples/sdk_example.py opentable-restaurant-details

Examples

Every example covers all 2 OpenTable APIs. Pass an API name to run just one; with no name each script runs them all, and each call is billed at the price above.

File Style Run
examples/sdk_example.py DataGuru Python SDK (pip install dataguru-sdk), one function per API, saves JSON to output/ python examples/sdk_example.py
examples/requests_example.py Plain requests, synchronous python examples/requests_example.py
examples/async_example.py asyncio + httpx, concurrent with a limit python examples/async_example.py
examples/scrapy_spider.py Scrapy spider, items to JSON/CSV scrapy runspider examples/scrapy_spider.py -O opentable.json

All requests use the header Authorization: Api-Key YOUR_API_KEY. Errors return {"success": false, "error": {"code", "message", "request_id"}}, with HTTP 402 when the balance runs out and 429 (with Retry-After) when rate limited. Failed requests are not charged.

API reference

OpenTable Restaurant Details

Get an OpenTable restaurant from its URL, including cuisine, price band, detailed diner ratings, review summary, recent reviews, address and coordinates, contact details, hours, dress code, amenities, menus, experiences, popular dishes, photos, private dining and FAQs.

Parameter Type Required Description
restaurant_url string yes Full OpenTable restaurant URL (e.g. https://www.opentable.com/r/the-original-ivy-west-end-london).

Response fields: restaurant_id, name, url, permanently_closed, cuisine, cuisines, dining_style, price_band, price_level, currency_symbol, description, review_summary, rating, ratings, rating_distribution, rated_review_count, review_count, recent_bookings, review_tags, awards, address, neighborhood, metro, cross_street, latitude, longitude, time_zone, phone, website, facebook_url, hours, dress_code, parking, parking_details, public_transit, executive_chef, entertainment, catering, amenities, payment_options, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/opentable/restaurants/details" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"restaurant_url": "https://www.opentable.com/r/the-original-ivy-west-end-london"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "restaurant_id": 0,
  "name": "string",
  "url": "https://example.com/...",
  "permanently_closed": false,
  "cuisine": "string",
  "cuisines": [
    "string"
  ],
  "dining_style": "string",
  "price_band": "string",
  "price_level": 0,
  "currency_symbol": "string",
  "description": "string",
  "review_summary": "string",
  "rating": 0.0,
  "ratings": {
    "overall": 0.0,
    "food": 0.0,
    "service": 0.0,
    "ambience": 0.0,
    "value": 0.0,
    "noise": 0.0
  },
  "rating_distribution": {},
  "rated_review_count": 0,
  "review_count": 0,
  "recent_bookings": 0,
  "review_tags": [
    "string"
  ],
  "awards": [
    "string"
  ],
  "address": {
    "full": "string",
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "postal_code": "string",
    "country": "string"
  },
  "neighborhood": "string",
  "metro": "string",
  "cross_street": "string",
  "latitude": 0.0,
  "longitude": 0.0,
  "time_zone": "string",
  "phone": "string",
  "website": "string",
  "facebook_url": "https://example.com/...",
  "hours": [
    "string"
  ],
  "dress_code": "string",
  "parking": "string",
  "parking_details": "string",
  "public_transit": "string",
  "executive_chef": "string",
  "entertainment": "string",
  "catering": "string",
  "amenities": [
    "string"
  ],
  "payment_options": [
    "string"
  ],
  "outdoor_seating": false,
  "bar_seating": false,
  "max_party_size": 0,
  "booking_window_days": 0,
  "takeout": false,
  "order_online_url": "https://example.com/...",
  "delivery_partners": [
    {
      "name": "string",
      "url": "https://example.com/..."
    }
  ],
  "private_dining": {
    "available": false,
    "description": "string",
    "phone": "string",
    "largest_capacity": 0,
    "rooms": [
      {
        "name": "string",
        "description": "string",
        "max_capacity": 0
      }
    ]
  },
  "profile_photo": "string",
  "photos": [
    {
      "url": "https://example.com/...",
      "category": "string",
      "source": "string",
      "width": 0,
      "height": 0
    }
  ],
  "photo_count": 0,
  "popular_dishes": [
    {
      "name": "string",
      "description": "string",
      "review_count": 0,
      "photo": "string"
    }
  ],
  "experiences": [
    {
      "experience_id": 0,
      "name": "string",
      "type": "string",
      "description": "string",
      "price_from": 0.0,
      "currency": "USD",
      "price_type": "string",
      "start_date": "2026-01-01T12:00:00Z",
      "end_date": "2026-01-01T12:00:00Z",
      "bookable": false,
      "sold_out": false
    }
  ],
  "menus": [
    {
      "title": "string",
      "currency": "USD",
      "sections": [
        {
          "title": "string",
          "description": "string",
          "items": [
            {
              "name": "string",
              "description": "string",
              "price": 0.0
            }
          ]
        }
      ]
    }
  ],
  "reviews": [
    {
      "review_id": "1234567890",
      "text": "string",
      "rating": 0.0,
      "food": 0.0,
      "service": 0.0,
      "ambience": 0.0,
      "value": 0.0,
      "noise": "string",
      "author": "string",
      "author_metro": "string",
      "author_review_count": 0,
      "submitted_at": "2026-01-01T12:00:00Z",
      "dined_at": "2026-01-01T12:00:00Z",
      "helpful_votes": 0,
      "restaurant_reply": "string",
      "photos": [
        "string"
      ]
    }
  ],
  "faqs": [
    {
      "question": "string",
      "answer": "string"
    }
  ],
  "featured_in": [
    {
      "title": "string",
      "url": "https://example.com/...",
      "summary": "string"
    }
  ],
  "time_taken": 0.0,
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "OpenTable Restaurant Details",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

OpenTable Restaurant Search

Search OpenTable restaurants by cuisine, name or keyword in a city and get matching restaurants with cuisine, price band, diner ratings, review counts, neighborhood, address, coordinates, phone, photos and takeout options.

Parameter Type Required Description
limit integer no Maximum number of restaurants to return (1-100). Default: 50.
query string yes What to search for, including the city, e.g. "italian new york", "steakhouse chicago" or "London".

Response fields: query, keywords, metro_id, search_latitude, search_longitude, total_results, count, search_url, restaurants, time_taken, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/opentable/restaurants/search" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "italian new york"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "query": "string",
  "keywords": "string",
  "metro_id": 0,
  "search_latitude": 0.0,
  "search_longitude": 0.0,
  "total_results": 0,
  "count": 0,
  "search_url": "https://example.com/...",
  "restaurants": [
    {
      "position": 0,
      "restaurant_id": 0,
      "name": "string",
      "url": "https://example.com/...",
      "cuisine": "string",
      "dining_style": "string",
      "price_band": "string",
      "price_level": 0,
      "currency_symbol": "string",
      "rating": 0.0,
      "review_count": 0,
      "recent_bookings": 0,
      "neighborhood": "string",
      "address": {
        "full": "string",
        "line1": "string",
        "line2": "string",
        "city": "string",
        "state": "string",
        "postal_code": "string",
        "country": "string"
      },
      "latitude": 0.0,
      "longitude": 0.0,
      "phone": "string",
      "description": "string",
      "review_highlight": "string",
      "photos": [
        "string"
      ],
      "outdoor_seating": false,
      "bar_seating": false,
      "max_party_size": 0,
      "private_dining": false,
      "takeout": false,
      "order_online_url": "https://example.com/...",
      "delivery_partners": [
        {
          "name": "string",
          "url": "https://example.com/..."
        }
      ],
      "awards": [
        "string"
      ],
      "offers": [
        "string"
      ],
      "just_added": false
    }
  ],
  "time_taken": 0.0,
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "OpenTable Restaurant Search",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

More

License

The example code is MIT licensed. Use of the DataGuru API is subject to the terms of service.

About

OpenTable scraper API: OpenTable Restaurant Details, OpenTable Restaurant Search as clean JSON. Python examples with requests, Scrapy, asyncio and the DataGuru SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors