{
  "openapi": "3.0.1",
  "info": {
    "title": "Foodhub Scraper — UK Takeaways, Menus & Prices",
    "description": "Scrape Foodhub (foodhub.co.uk), the UK takeaway app with 15,000+ takeaways: takeaways by town or postcode with ratings, reviews, delivery and collection times, offers, fees and hours, plus full menus with GBP prices and option groups. No proxy setup.",
    "version": "0.1",
    "x-build-id": "tIgT0btPqZxQqulga"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teodor_banea~foodhub-restaurant-menu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teodor_banea-foodhub-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~foodhub-restaurant-menu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-teodor_banea-foodhub-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~foodhub-restaurant-menu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-teodor_banea-foodhub-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": [
              "restaurants",
              "menus"
            ],
            "type": "string",
            "description": "Choose \"Takeaways\" for one row per takeaway (rating, reviews, delivery and collection times, open now, offers). Choose \"Full menus\" for one row per menu item with its price in GBP and option groups; a typical takeaway has 150–450 items, so menus multiply the result count.",
            "default": "restaurants"
          },
          "locations": {
            "title": "Towns or postcodes",
            "type": "array",
            "description": "Enter UK towns (\"Reading\", \"Stoke-on-Trent\", \"Newcastle upon Tyne\"), full postcodes (\"RG2 0ER\"), postcode districts (\"ST6\") or \"latitude,longitude\" points. A town returns every takeaway Foodhub lists for it; a postcode returns the takeaways near that address.",
            "items": {
              "type": "string"
            }
          },
          "restaurantUrls": {
            "title": "Takeaway URLs",
            "type": "array",
            "description": "Enter Foodhub takeaway pages, e.g. https://foodhub.co.uk/reading/example-tandoori/610/ordernow. They are scraped in addition to the towns and postcodes.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "businessType": {
            "title": "Business type",
            "enum": [
              "takeaways",
              "grocery",
              "all"
            ],
            "type": "string",
            "description": "Choose takeaways and restaurants, grocery and convenience shops, or both.",
            "default": "takeaways"
          },
          "searchQuery": {
            "title": "Search takeaways",
            "type": "string",
            "description": "Keep only takeaways whose name or brand contains this text (case ignored)."
          },
          "cuisines": {
            "title": "Cuisines",
            "type": "array",
            "description": "Keep only takeaways with one of these cuisines, written as Foodhub shows them (e.g. \"Pizza\", \"Indian\", \"Kebab\", \"Chinese\"). Case is ignored. Unknown names are listed in the log with the cuisines available there.",
            "items": {
              "type": "string"
            }
          },
          "onlyOpen": {
            "title": "Only takeaways open now",
            "type": "boolean",
            "description": "Keep only takeaways taking delivery or collection orders right now.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "enum": [
              "3.5",
              "4",
              "4.5"
            ],
            "type": "string",
            "description": "Keep only takeaways rated at least this much. Takeaways without reviews are dropped when this is set."
          },
          "sortBy": {
            "title": "Sort takeaways by",
            "enum": [
              "platform",
              "rating",
              "reviews",
              "name"
            ],
            "type": "string",
            "description": "Order in which takeaways are taken before the limits apply. \"Foodhub order\" keeps the order of Foodhub's own list.",
            "default": "platform"
          },
          "maxRestaurants": {
            "title": "Maximum takeaways per location",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Limit the takeaways returned (takeaways mode) or the takeaways whose menus are read (menus mode) for each town or postcode; your takeaway URLs form one more group with the same limit. 0 = no cap per location (menus mode: still capped at 2,000 takeaways per location). Takeaways with an empty menu are skipped without counting. Use Maximum results for a ceiling on the whole run.",
            "default": 50
          },
          "maxItemsPerRestaurant": {
            "title": "Maximum items per takeaway",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "In menus mode, keep only the first N menu items of each takeaway (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, across all locations. 0 = no ceiling (still capped at 50,000 rows). The run stops at once when it is reached; locations not reached are listed in the log and the final status.",
            "default": 0
          },
          "includeModifiers": {
            "title": "Include option groups",
            "type": "boolean",
            "description": "In menus mode, add each item's option groups (sizes, toppings, sauces, meal-deal choices) with option prices. Some takeaways have very large option lists; switching this off makes runs lighter and faster.",
            "default": true
          },
          "includeDetails": {
            "title": "Include takeaway details",
            "type": "boolean",
            "description": "In takeaways mode, also read each takeaway's page facts: street address, business phone, minimum order, delivery fee, service fee, payment methods and weekly opening hours. Takeaway URLs always get these details.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}