{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenTable Availability Scraper & Table Alert Monitor",
    "description": "Open OpenTable tables for any date, party size and time window: search a city by cuisine, watch restaurants for new tables, or map which days are open.",
    "version": "0.0",
    "x-build-id": "Cop9jDaLdV0gFR3Yp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapebench~opentable-availability-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapebench-opentable-availability-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/scrapebench~opentable-availability-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapebench-opentable-availability-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/scrapebench~opentable-availability-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapebench-opentable-availability-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "watch"
            ],
            "type": "string",
            "description": "Search: OpenTable restaurants in a city or near a point, each with its open tables for the date. Watch: the OpenTable restaurants you list, checked for open tables on your dates; schedule it to get an alert when a table opens.",
            "default": "search"
          },
          "locations": {
            "title": "Cities or points (Search)",
            "type": "array",
            "description": "One per line: a city or area as you would type it on OpenTable (New York, Chicago, IL, London, River North), or \"latitude,longitude\" for the area around a venue or hotel (for example 40.7505,-73.9934 for Madison Square Garden). Each is searched on its own.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "City or point (single)",
            "type": "string",
            "description": "One city or \"latitude,longitude\", for saved tasks and API calls that send a single value. Use the list above for several."
          },
          "venues": {
            "title": "Restaurants to watch (Watch)",
            "type": "array",
            "description": "One per line: the restaurant's OpenTable link (https://www.opentable.com/r/little-owl-new-york or https://www.opentable.com/restaurant/profile/8033) or its numeric OpenTable id (8033). The numeric id is exact; a /r/ link is matched by name and the row says which restaurant was used.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "venue": {
            "title": "Restaurant to watch (single)",
            "type": "string",
            "description": "One OpenTable link or id, for saved tasks and API calls that send a single value."
          },
          "startUrls": {
            "title": "OpenTable restaurant links (Watch)",
            "type": "array",
            "description": "Optional. The same as Restaurants to watch, as a list of links (for tools that send startUrls). Each is checked like a watched restaurant.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "date": {
            "title": "Date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "YYYY-MM-DD. Empty means today. With \"Until date\" it is the first day of a range."
          },
          "dates": {
            "title": "More dates",
            "type": "array",
            "description": "Extra days to check, YYYY-MM-DD, one per line. Past dates are skipped with a free note.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "dateTo": {
            "title": "Until date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "YYYY-MM-DD. Check every day from Date to this one (up to 90 days). In Watch mode OpenTable's calendar is read once per 14 days and days it does not book yet (or is closed) are not opened, so a long range stays fast."
          },
          "daysAhead": {
            "title": "Next N days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Check every day from today for this many days (up to 90), instead of fixed dates. Best for a scheduled watch: the dates move with the calendar, so a saved task never goes stale."
          },
          "partySize": {
            "title": "Party size",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of guests (1 to 20). Only tables for this many are returned; a restaurant that cannot seat that many online says so in calendar_status.",
            "default": 2
          },
          "timeFrom": {
            "title": "Earliest time",
            "type": "string",
            "description": "HH:MM, 24-hour (18:00). Only tables from this time on. Empty means any time. OpenTable shows times within 3.5 hours of the asked time, so the actor asks for the middle of your window (19:00 when no window is given)."
          },
          "timeTo": {
            "title": "Latest time",
            "type": "string",
            "description": "HH:MM, 24-hour (21:30). Only tables up to this time. Empty means any time."
          },
          "onlyNew": {
            "title": "Flag tables that are new since the last run (Watch)",
            "type": "boolean",
            "description": "Remembers what was open on this watch's last run and fills new_slots and has_new_slots, so a scheduled run plus a webhook alerts only when a table opens. The first run counts every open table as new.",
            "default": false
          },
          "queries": {
            "title": "Cuisines or names (Search)",
            "type": "array",
            "description": "Optional, one per line: words OpenTable matches against cuisine and name (italian, sushi, steakhouse, a restaurant name). Each is searched and a restaurant found twice is returned once. Empty means every restaurant.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Cuisine or name (single)",
            "type": "string",
            "description": "One cuisine or name, for saved tasks and API calls that send a single value."
          },
          "priceRanges": {
            "title": "Price ranges (Search)",
            "type": "array",
            "description": "Keep only these OpenTable price bands, 1 ($) to 4 ($$$$); each row's extras.price_band_label gives the band's own wording (\"$30 and under\"). Empty keeps all.",
            "default": []
          },
          "minRating": {
            "title": "Minimum rating (Search)",
            "type": "string",
            "description": "Keep only restaurants OpenTable diners rate at least this (for example 4.5). Empty keeps all."
          },
          "onlyAvailable": {
            "title": "Only restaurants with open tables (Search)",
            "type": "boolean",
            "description": "Drop restaurants with no table for your date, party size and time window.",
            "default": false
          },
          "radiusKm": {
            "title": "Radius in km (Search)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only restaurants this close to the point or city centre. Empty means OpenTable's own area for a city, 3 km for \"latitude,longitude\"."
          },
          "maxResults": {
            "title": "Maximum restaurants per city, per date (Search)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Cap for EACH city and date. OpenTable lists several thousand restaurants in New York; the order is OpenTable's own.",
            "default": 100
          },
          "includeDetails": {
            "title": "Every open time, phone and website (Search)",
            "type": "boolean",
            "description": "On by default: opens each restaurant for its full set of times around your time, its phone, website, hours, dress code and booking policies. No extra charge. Off is faster but each row then has only the 3 times nearest your time and no phone or website. Watch rows always have them.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Off by default (not needed). If a run comes back with a 'blocked' row, turning on a proxy is an option. Included in the price.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}