How to Scrape OpenTable Data: Complete Guide for 2026
Tutorials

How to Scrape OpenTable Data: Complete Guide for 2026

Learn how to scrape OpenTable for restaurant data using Python and Node.js with AlterLab's API. Handle anti-bot, extract structured data, and scale responsibly.

3 min read
3 views

AlterLab handles this automaticallyscrape any URL with one API call. No infrastructure required.

Try it free

This guide covers extracting publicly accessible data. Always review a site's robots.txt and Terms of Service before scraping.

TL;DR

Scrape OpenTable restaurant data using AlterLab's API with Python or Node.js. Start at T1 tier, let the API auto-escalate for anti-bot protection, and extract structured JSON via Cortex. Costs range from $0.20-$4.00 per 1,000 requests depending on required rendering level.

Why collect food data from OpenTable?

  • Market research: Analyze restaurant density, cuisine types, and price points across neighborhoods for competitive positioning.
  • Price monitoring: Track menu item prices and reservation fees over time to identify inflation trends or promotional patterns.
  • Data enrichment: Combine OpenTable data with review scores or delivery times to build comprehensive dining recommendation engines.

Technical challenges

OpenTable implements standard anti-bot measures including rate limiting per IP, user-agent checks, and JavaScript-based bot detection. Raw HTTP requests often receive challenge pages or empty responses. AlterLab's Smart Rendering API automatically handles these by escalating through rendering tiers until successful access is achieved, managing proxy rotation and header optimization behind the scenes.

Quick start with AlterLab API

See the Getting started guide for SDK installation. Below are examples for scraping a public OpenTable restaurant page.

Python
import alterlab

client = alterlab.Client("YOUR_API_KEY")
response = client.scrape("https://opentable.com/restaurant/example-bistro")
print(response.text[:500])  # First 500 chars of HTML
JAVASCRIPT
import { AlterLab } from "alterlab";

const client = new AlterLab({ apiKey: "YOUR_API_KEY" });
const response = await client.scrape("https://opentable.com/restaurant/example-bistro");
console.log(response.text.slice(0, 500));
Bash
curl -X POST https://api.alterlab.io/v1/scrape \
  -H "X-API-Key: YOUR_KEY" \
  -d '{"url": "https://opentable.com/restaurant/example-bistro"}'

Extracting structured data

OpenTable's restaurant pages display consistent data points. Use browser dev tools to identify selectors:

  • Restaurant name: h1[data-test="restaurant-header-title"]
  • Cuisine type: .cuisine-types
  • Price range: .price-range
  • Rating: .rating-value
  • Address: .restaurant-address

Example extraction with Python:

Python
import alterlab
from parsel import Selector

client = alterlab.Client("YOUR_API_KEY")
html = client.scrape("https://opentable.com/restaurant/example-bistro").text
selector = Selector(text=html)

data = {
    "name": selector.css('h1[data-test="restaurant-header-title"]::text').get(),
    "cuisine": selector.css('.cuisine-types::text').getall(),
    "price_range": selector.css('.price-range::text').get(),
    "rating": selector.css('.rating-value::text').get(),
    "address": selector.css('.restaurant-address::text').get()
}
print(data)

Structured JSON extraction with Cortex

For typed output without manual parsing, use AlterLab's Cortex AI extraction. Define a JSON schema for the data you need:

Python
import alterlab

client = alterlab.Client("YOUR_API_KEY")
result = client.extract(
    url="https://opentable.com/restaurant/example-bistro",
    schema={
        "type": "object",
        "properties": {
            "name": {"type": "string"},
            "cuisine_types": {"type": "array", "items": {"type": "string"}},
            "price_range": {"type": "string"},
            "rating": {"type": "number"},
            "address": {"type": "string"},
            "menu_items": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "name": {"type": "string"},
                        "price": {"type": "number"},
                        "description": {"type": "string"}
                    }
                }
            }
        }
    }
)
print(result.data)  # Validated JSON matching schema

Cost breakdown

AlterLab's pricing scales with rendering complexity. For OpenTable, most pages require T2-T3 tiers due to anti-bot measures but rarely need full browser rendering (T4) unless encountering JavaScript challenges.

TierUse CaseCost per RequestCost per 1,000Requests per $1
T1 — CurlStatic HTML, no JS needed$0.0002$0.205,000
T2 — HTTPStandard pages with headers$0.0003$0.303,333
T3 — StealthProtected pages, anti-bot active$0.002$2.00500
T4 — BrowserFull JS rendering required$0.004$4.00250
T5 — CAPTCHACAPTCHA solving + JS rendering$0.02$20.0050

View full pricing for volume discounts and team plans. AlterLab auto-escalates tiers — start at T1 and pay only for the tier that succeeds.

99.2%Success Rate
1.2sAvg Response
Share

Was this article helpful?

Frequently Asked Questions

Scraping publicly accessible data from OpenTable is generally legal under precedents like hiQ v. LinkedIn, but you must review OpenTable's robots.txt and Terms of Service, implement rate limiting, and avoid scraping private or login-protected information. Users are responsible for compliance.
OpenTable employs standard anti-bot protections including rate limiting, IP blocking, and JavaScript challenges. AlterLab handles these via automatic tier escalation, proxy rotation, and headless browser rendering when needed.
Costs range from $0.0002 per request for static content (T1) to $0.004 for full browser rendering (T4), with AlterLab's auto-escalation ensuring you only pay for the successful tier. For OpenTable, expect T2-T3 tiers for most pages.