{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Food Hygiene Ratings Scraper · FSA Register",
    "description": "Search the official UK food hygiene register: 600,000+ restaurants, takeaways, pubs, hotels, shops and caterers across England, Wales, Scotland and NI. Filter by rating, council, business type or map radius. Addresses, geocodes, scores and inspection dates. Pay only for results.",
    "version": "0.1",
    "x-build-id": "K5uWXlGVTd6r9rCzr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~uk-food-hygiene-ratings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-uk-food-hygiene-ratings-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/automation_craft~uk-food-hygiene-ratings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-uk-food-hygiene-ratings-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/automation_craft~uk-food-hygiene-ratings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-uk-food-hygiene-ratings-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": {
          "name": {
            "title": "Business name",
            "type": "string",
            "description": "Match against business names, e.g. `pizza`, `Greggs`, `Costa`. Combine freely with the other filters."
          },
          "address": {
            "title": "Address / postcode",
            "type": "string",
            "description": "Match against the address: a postcode (`LS1 2JG`), partial postcode (`LS1`), street or town (`Manchester`)."
          },
          "localAuthorities": {
            "title": "Local authorities (councils)",
            "type": "array",
            "description": "Restrict to one or more councils, by name (`Leeds`, `Bath and North East Somerset`) or numeric id. One API query is run per council — great for pulling every establishment a council covers.",
            "items": {
              "type": "string"
            }
          },
          "ratings": {
            "title": "Hygiene ratings",
            "type": "array",
            "description": "Only return establishments with these ratings. England/Wales/NI use `0`–`5` (FHRS); Scotland uses `Pass` / `ImprovementRequired` (FHIS). Also valid: `AwaitingInspection`, `AwaitingPublication`, `Exempt`. Leave empty for all ratings.",
            "items": {
              "type": "string",
              "enum": [
                "5",
                "4",
                "3",
                "2",
                "1",
                "0",
                "Pass",
                "ImprovementRequired",
                "AwaitingInspection",
                "AwaitingPublication",
                "Exempt"
              ],
              "enumTitles": [
                "5 — Very good",
                "4 — Good",
                "3 — Generally satisfactory",
                "2 — Improvement necessary",
                "1 — Major improvement necessary",
                "0 — Urgent improvement required",
                "Pass (Scotland)",
                "Improvement Required (Scotland)",
                "Awaiting inspection",
                "Awaiting publication",
                "Exempt"
              ]
            }
          },
          "businessTypes": {
            "title": "Business types",
            "type": "array",
            "description": "Only return these kinds of businesses. Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "Restaurant/Cafe/Canteen",
                "Takeaway/sandwich shop",
                "Pub/bar/nightclub",
                "Hotel/bed & breakfast/guest house",
                "Mobile caterer",
                "Retailers - supermarkets/hypermarkets",
                "Retailers - other",
                "School/college/university",
                "Hospitals/Childcare/Caring Premises",
                "Other catering premises",
                "Manufacturers/packers",
                "Farmers/growers",
                "Importers/Exporters",
                "Distributors/Transporters"
              ]
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "England",
              "Northern Ireland",
              "Scotland",
              "Wales"
            ],
            "type": "string",
            "description": "Restrict to one UK country."
          },
          "latitude": {
            "title": "Latitude (map search)",
            "type": "string",
            "description": "Center latitude for a radius search, e.g. `53.801` (Leeds). Needs `longitude` too; results get a `distanceMiles` field and sort nearest-first."
          },
          "longitude": {
            "title": "Longitude (map search)",
            "type": "string",
            "description": "Center longitude for a radius search, e.g. `-1.549` (Leeds)."
          },
          "radiusMiles": {
            "title": "Radius (miles)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Radius for the map search in miles (default 2, max 30)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "rating (low to high)",
              "rating (high to low)",
              "name (A-Z)",
              "name (Z-A)",
              "distance"
            ],
            "type": "string",
            "description": "Result order. `distance` needs a map search; map searches default to `distance` automatically."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on establishments returned (and charged). Default 500."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}