{
  "openapi": "3.0.1",
  "info": {
    "title": "HungerStation Restaurant & Menu Scraper (Saudi Arabia)",
    "description": "Scrape HungerStation, Saudi Arabia's largest food-delivery app: restaurants by city and district (rating, cuisines, delivery fee, minimum order, ETA, open now) and flat menu-item rows with prices in SAR, calories and images. English or Arabic. No proxy setup.",
    "version": "0.1",
    "x-build-id": "xHiydqaLyxmogCfBm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teodor_banea~hungerstation-restaurant-menu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teodor_banea-hungerstation-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~hungerstation-restaurant-menu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-teodor_banea-hungerstation-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~hungerstation-restaurant-menu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-teodor_banea-hungerstation-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 extract",
            "enum": [
              "restaurants",
              "menus"
            ],
            "type": "string",
            "description": "\"Restaurants\" returns one row per restaurant from the district lists (rating, cuisines, delivery fee, minimum order, ETA, open now). \"Menus\" opens each restaurant and returns one row per menu item (category, name, description, price in SAR, calories, image) with the restaurant's columns on every row — a menu has 50–200 items, so menus multiply the row count.",
            "default": "restaurants"
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Enter Saudi city names in English or Arabic, any case (e.g. \"Riyadh\", \"jeddah\", \"الرياض\"). HungerStation lists 115 cities. Unknown names are reported with close matches.",
            "items": {
              "type": "string"
            }
          },
          "districts": {
            "title": "Districts",
            "type": "array",
            "description": "Optionally enter district names within the cities above, in English or Arabic (e.g. \"Al Olaya\", \"al-ulaya\", \"العليا\"). Leave empty to take the first districts of each city in HungerStation's order (see Districts per city).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "HungerStation URLs",
            "type": "array",
            "description": "Optionally paste HungerStation Saudi Arabia district restaurant lists (https://hungerstation.com/sa-en/restaurants/regions/riyadh/al-ulaya) or restaurant pages (https://hungerstation.com/sa-en/restaurants/regions/riyadh/al-ulaya/example-shawarma-house-123456). English and Arabic addresses both work.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxDistrictsPerCity": {
            "title": "Districts per city",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "When no districts are entered, read this many districts of each city, in HungerStation's order. Set to 0 for every district of the city (a large city has 100+ districts; the restaurant limit still stops the run).",
            "default": 1
          },
          "maxRestaurants": {
            "title": "Maximum restaurants",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many restaurants for the whole run (restaurant rows, or restaurants whose menus are returned). A district list shows 27 restaurants per page. Set to 0 for the run maximum of 5,000.",
            "default": 50
          },
          "maxItemsPerRestaurant": {
            "title": "Maximum items per restaurant",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Menus only: keep the first N items of each menu, in menu order. Set to 0 for complete menus.",
            "default": 0
          },
          "maxItemsTotal": {
            "title": "Maximum results",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Set a hard ceiling on rows (billed results) for the whole run. Set to 0 for the run maximum of 50,000.",
            "default": 0
          },
          "onlyOpen": {
            "title": "Only restaurants open now",
            "type": "boolean",
            "description": "Keep only restaurants that HungerStation shows as open at the time of the run.",
            "default": false
          },
          "cuisines": {
            "title": "Cuisines",
            "type": "array",
            "description": "Keep only restaurants tagged with at least one of these cuisines, any case (e.g. \"Pizza\", \"Burgers\", \"Arabic\"; in Arabic mode use the Arabic tags).",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Restaurant name contains",
            "type": "string",
            "description": "Keep only restaurants whose name contains this text, any case (e.g. \"shawarma\")."
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "ar"
            ],
            "type": "string",
            "description": "Language of names, descriptions, cuisines, cities and districts in the output. Slugs stay in English; prices are in SAR either way.",
            "default": "en"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}