{
  "openapi": "3.0.1",
  "info": {
    "title": "Tabelog Restaurant Scraper (Japan)",
    "description": "Scrapes restaurants from Tabelog — Japan's #1 restaurant review site. Search any Japanese area by prefecture, district or neighbourhood with 35 cuisine genres; returns name, rating, review count, nearest station, budget, feature tags, address, GPS coordinates and phone number.",
    "version": "0.1",
    "x-build-id": "4fbzBlH9D4RKXCpZg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapyx~tabelog-restaurants-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapyx-tabelog-restaurants-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/scrapyx~tabelog-restaurants-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapyx-tabelog-restaurants-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/scrapyx~tabelog-restaurants-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapyx-tabelog-restaurants-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": {
          "areas": {
            "title": "Areas",
            "type": "array",
            "description": "Tabelog area paths — one search per entry, each with its own SEARCH_SUMMARY row. Areas are hierarchical and every depth works:\n\n• `tokyo` — the whole prefecture (139,211 restaurants)\n• `tokyo/A1301` — Ginza & Shimbashi & Yurakucho (6,260)\n• `tokyo/A1301/A130101` — Ginza (2,669)\n\nA full list URL works too (https://tabelog.com/en/tokyo/A1301/A130101/rstLst/) — the easiest way to get one is to browse to the area on tabelog.com and copy the address.\n\nIf an area CODE is wrong, Tabelog does NOT error: it silently searches the parent area instead. The actor detects that via Tabelog's own breadcrumb, refuses to page it, and reports areaApplied: false. (A wrong prefecture returns a clean 404.)\n\nBecause each query caps at 1,200 rows, several narrow areas return far more data than one broad one.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "genre": {
            "title": "Genre",
            "enum": [
              "",
              "bar",
              "bistro",
              "cafe",
              "cake",
              "chinese",
              "curry",
              "gyouza",
              "hamburger",
              "hamburgersteak",
              "izakaya",
              "japanese",
              "kushiage",
              "monjya",
              "motsu",
              "nabe",
              "okonomiyaki",
              "pan",
              "pasta",
              "ramen",
              "ryokan",
              "seafood",
              "soba",
              "steak",
              "sushi",
              "sweets",
              "syabusyabu",
              "teishoku",
              "tempura",
              "tonkatsu",
              "udon",
              "unagi",
              "viking",
              "washoku",
              "yakiniku",
              "yakitori"
            ],
            "type": "string",
            "description": "Restrict to one cuisine/genre. An unrecognised slug returns a clean HTTP 404 (no silent-widen risk here), and every value below was verified to genuinely narrow the results.",
            "default": ""
          },
          "sortByRating": {
            "title": "Sort by rating",
            "type": "boolean",
            "description": "Return the highest-rated restaurants first instead of Tabelog's default order. This is the only sort Tabelog actually honours — review-count and budget sorts were tested and are silently ignored, so they are not offered.",
            "default": false
          },
          "restaurantUrls": {
            "title": "Restaurant URLs (direct mode)",
            "type": "array",
            "description": "Scrape specific restaurants directly, skipping the area search. Accepts full Tabelog restaurant URLs (https://tabelog.com/en/tokyo/A1301/A130101/13277198/). Can be combined with an area search in the same run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max restaurants per area",
            "minimum": 0,
            "type": "integer",
            "description": "Stop paginating an area after this many restaurants. Set to 0 for unlimited — note Tabelog itself stops at 1,200 rows per query (60 pages × 20) however many results it reports. Use a deeper area code or a genre to reach the rest.",
            "default": 100
          },
          "includeRestaurantDetails": {
            "title": "Fetch full restaurant details",
            "type": "boolean",
            "description": "Fetch each restaurant's Schema.org record via one extra request: exact street address, postal code, GPS coordinates, phone number, price range and cuisine. Turn this off for a fast list-only crawl — list rows already carry name, rating, review count, nearest station, genre, dinner/lunch budget and feature tags.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many requests may be in flight at once. This absorbs latency variance; it is NOT the throttle — the crawl rate is set by 'Minimum interval between requests' below. Raising this past ~5 will not speed up a run on its own.",
            "default": 5
          },
          "minRequestInterval": {
            "title": "Minimum interval between requests (seconds)",
            "minimum": 0.05,
            "maximum": 10,
            "type": "number",
            "description": "The actual speed control: the shortest gap between two requests to Tabelog, across all workers. 0.4s (default) ≈ 2.5 requests/second. Lower it to finish faster, raise it to be gentler.\n\nTabelog serves no bot challenge at all, which is worth preserving — an unthrottled crawl is how a WAF-free site stops being WAF-free. Values below 0.05s are clamped.",
            "default": 0.4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Tabelog runs no bot challenge at all (8/8 TLS profiles clean), but Residential pinned to Japan is the cloud default — container egress is a different posture than a home connection, and a JP exit gets the same regional content a real visitor sees.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "JP"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}