{
  "openapi": "3.0.1",
  "info": {
    "title": "Demae-can Restaurant & Menu Scraper - Japan",
    "description": "Scrape Demae-can (出前館) food delivery in Japan: restaurants by postal code, area, chain or URL with genre, rating, delivery fee, minimum order, hours, address and coordinates, or full menus with JPY prices, stock, sizes and option groups.",
    "version": "0.1",
    "x-build-id": "bW2g8hYd9I6ZaOXO1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teodor_banea~demae-can-restaurant-menu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teodor_banea-demae-can-restaurant-menu-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/teodor_banea~demae-can-restaurant-menu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-teodor_banea-demae-can-restaurant-menu-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/teodor_banea~demae-can-restaurant-menu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-teodor_banea-demae-can-restaurant-menu-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": "What to scrape",
            "enum": [
              "menus",
              "restaurants"
            ],
            "type": "string",
            "description": "Choose \"Full menus\" for one row per menu item with JPY prices, labels and stock. Choose \"Restaurants\" for one row per restaurant (genre, rating, delivery fee, minimum order, delivery time, hours, address, coordinates). A typical Demae-can menu has 20–230 items, so menus multiply the result count.",
            "default": "menus"
          },
          "postalCodes": {
            "title": "Postal codes",
            "type": "array",
            "description": "Enter Japanese postal codes (7 digits, with or without the hyphen, e.g. \"1060045\" or \"530-0001\"). The restaurants that deliver to that address are listed in the site's own order.",
            "items": {
              "type": "string"
            }
          },
          "allBlocksOfPostalCode": {
            "title": "All areas of a postal code",
            "type": "boolean",
            "description": "A postal code can cover several address areas (chome). Off: the first area only — neighbouring areas list almost the same restaurants (84 of the first 91 were shared in a Tokyo test). On: every area of the postal code (more list reads, a few more restaurants).",
            "default": false
          },
          "areaUrls": {
            "title": "Area pages",
            "type": "array",
            "description": "Enter Demae-can area result pages (https://demae-can.com/search/delivery/<area code>, optionally with a genre at the end) or bare 11-digit area codes — the page you see after entering an address on the site.",
            "items": {
              "type": "string"
            }
          },
          "chainUrls": {
            "title": "Chain pages",
            "type": "array",
            "description": "Enter Demae-can chain pages (https://demae-can.com/chain/top/<chain id>) or chain ids. Restaurants mode lists every branch in Japan. Menus mode reads one branch per chain (all branches share one menu) unless \"Group chain branches\" is off.",
            "items": {
              "type": "string"
            }
          },
          "restaurantUrls": {
            "title": "Restaurant URLs",
            "type": "array",
            "description": "Enter Demae-can restaurant pages (https://demae-can.com/shop/menu/<id> or https://demae-can.com/shopDetail/<id>). Each costs one read. For option groups of these restaurants, also enter a postal code where they deliver.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "keyword": {
            "title": "Search keyword",
            "type": "string",
            "description": "Search the restaurants of each postal code / area with the site's own keyword search (Japanese works best, e.g. \"ピザ\" or \"寿司\"). Leave empty for the full list."
          },
          "genres": {
            "title": "Genres",
            "type": "array",
            "description": "Keep only restaurants of these genres (the site's own genre lists; each genre is read as its own list). Not combined with a keyword.",
            "items": {
              "type": "string",
              "enum": [
                "98",
                "02",
                "61",
                "03",
                "04",
                "12",
                "01",
                "11",
                "62",
                "18",
                "59",
                "50",
                "06",
                "112",
                "45",
                "96",
                "07",
                "051",
                "97",
                "08",
                "19",
                "09",
                "67",
                "10",
                "52",
                "60",
                "15",
                "55",
                "100"
              ],
              "enumTitles": [
                "Fast food (ファストフード)",
                "Pizza (ピザ)",
                "Ramen (ラーメン)",
                "Sushi & seafood (寿司・海鮮)",
                "Chinese (中華)",
                "Sweets (スイーツ)",
                "Bento (弁当)",
                "Curry rice (カレーライス)",
                "Rice bowls (丼)",
                "Burgers & sandwiches (バーガー・サンドイッチ)",
                "Cafe & drinks (カフェ・ドリンク)",
                "Western (洋食)",
                "Soba & udon (そば・うどん)",
                "Indian curry (インドカレー)",
                "Fried chicken (フライドチキン・唐揚げ)",
                "Family restaurants (ファミレス)",
                "Japanese (和食)",
                "Hamburg steak & steak (ハンバーグ・ステーキ)",
                "Korean (韓国料理)",
                "Tonkatsu & tempura (とんかつ・天ぷら)",
                "Convenience store (コンビニ)",
                "Takoyaki & okonomiyaki (たこ焼き・お好み焼き)",
                "Pasta & Italian (パスタ・イタリアン)",
                "Yakiniku & shabu-shabu (焼肉・しゃぶしゃぶ)",
                "Healthy (ヘルシー料理)",
                "Ethnic (エスニック)",
                "Alcohol (お酒)",
                "Party & catering (パーティー・ケータリング)",
                "In-store prices (お店価格)"
              ]
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "recommended",
              "rating",
              "reviewCount",
              "deliveryTime",
              "minimumOrder"
            ],
            "type": "string",
            "description": "Order of the restaurant lists (the site's own sort). Limits take the first restaurants in this order.",
            "default": "recommended"
          },
          "onlyOpen": {
            "title": "Only restaurants open now",
            "type": "boolean",
            "description": "Keep only restaurants that take orders at the time of the run (Japan time).",
            "default": false
          },
          "onlyFreeDelivery": {
            "title": "Only free delivery",
            "type": "boolean",
            "description": "Keep only restaurants with a delivery fee of 0 yen.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep only restaurants rated at least this (1–5). Restaurants without reviews are left out when this is set. Empty = no rating filter."
          },
          "groupChainBranches": {
            "title": "Group chain branches",
            "type": "boolean",
            "description": "On (recommended): one branch per chain per area, as the site's own list shows it — chain branches repeat the same menu. Off: every branch separately, which multiplies menu rows (and the bill) for big chains.",
            "default": true
          },
          "maxRestaurants": {
            "title": "Maximum restaurants",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Limit the restaurants for the whole run: restaurant rows (restaurants mode) or restaurants whose menus are read (menus mode). It also limits how many restaurant URLs are read. Restaurants without a menu are skipped without counting. 0 = no limit (restaurants: up to 10,000; menus: up to 2,000).",
            "default": 50
          },
          "maxItemsPerRestaurant": {
            "title": "Maximum items per restaurant",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "In menus mode, keep only the first N menu items of each restaurant (in menu order). 0 = the whole menu.",
            "default": 0
          },
          "maxItemsTotal": {
            "title": "Maximum results",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Set a hard ceiling on returned rows for the whole run. 0 = no ceiling (still capped at 50,000 rows). The run stops as soon as it is reached.",
            "default": 0
          },
          "includeModifiers": {
            "title": "Include option groups and sizes",
            "type": "boolean",
            "description": "In menus mode, add each item's option groups (toppings, sets, choices) with extra prices in JPY and stock, and one row per size or variant. Off by default: Demae-can sends options one item at a time, so this adds one read per item and size and makes a run several times slower (about 1,030 extra reads and 10 minutes per 1,000 rows).",
            "default": false
          },
          "includeDetails": {
            "title": "Include restaurant details",
            "type": "boolean",
            "description": "In restaurants mode, read each restaurant's details (address, coordinates, hours, closing days, minimum order, genre, payment methods, review summary) — one small extra read per restaurant. Off: only the facts of the area list (name, rating, delivery fee and time, status, campaigns). Menus mode always includes them in the restaurant records.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}