{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Food Business Leads: FSA Hygiene Ratings + Companies House",
    "description": "Restaurants, cafés, takeaways, pubs and food shops in any UK council or postcode district, from official FSA food hygiene data, matched to Companies House. Find new openings, low ratings and limited companies. Monitor mode. OGL, no scraping.",
    "version": "1.0",
    "x-build-id": "1DfNCeXbEdIFzUbdg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ukdatakit~uk-food-business-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ukdatakit-uk-food-business-leads",
        "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/ukdatakit~uk-food-business-leads/runs": {
      "post": {
        "operationId": "runs-sync-ukdatakit-uk-food-business-leads",
        "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/ukdatakit~uk-food-business-leads/run-sync": {
      "post": {
        "operationId": "run-sync-ukdatakit-uk-food-business-leads",
        "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": "Mode",
            "enum": [
              "search",
              "new"
            ],
            "type": "string",
            "description": "Search returns every matching food business, newest registrations first. New openings monitor saves a snapshot and, on later runs, returns only new listings, rating changes and removals. The first monitor run returns businesses awaiting their first inspection (usually new openings or new owners). Schedule it weekly.",
            "default": "search"
          },
          "localAuthorities": {
            "title": "Councils (local authorities)",
            "type": "array",
            "description": "Council names as used by the FSA, e.g. Bristol, Leeds, Westminster, Glasgow City. Partial names match every council containing the text. Ignored if you enter postcode districts.",
            "default": [
              "Bristol"
            ],
            "items": {
              "type": "string"
            }
          },
          "postcodeDistricts": {
            "title": "Postcode districts",
            "type": "array",
            "description": "Optional. Postcode districts such as BS1, M4 or EH1. If you fill this in, it replaces the council list, so you can target a few districts precisely.",
            "items": {
              "type": "string"
            }
          },
          "businessTypes": {
            "title": "Business types",
            "type": "array",
            "description": "Leave empty for all types. Default: restaurants/cafés and takeaways.",
            "items": {
              "type": "string",
              "enum": [
                "Restaurant/Cafe/Canteen",
                "Takeaway/sandwich shop",
                "Pub/bar/nightclub",
                "Hotel/bed & breakfast/guest house",
                "Mobile caterer",
                "Other catering premises",
                "Retailers - other",
                "Retailers - supermarkets/hypermarkets",
                "Manufacturers/packers",
                "Distributors/Transporters",
                "Importers/Exporters",
                "Farmers/growers",
                "School/college/university",
                "Hospitals/Childcare/Caring Premises"
              ]
            },
            "default": [
              "Restaurant/Cafe/Canteen",
              "Takeaway/sandwich shop"
            ]
          },
          "ratings": {
            "title": "Ratings",
            "type": "array",
            "description": "Leave empty for all. AwaitingInspection = registered but not yet inspected (often a new opening). 0–2 = improvement needed. Pass / Improvement Required are Scottish (FHIS) results.",
            "items": {
              "type": "string",
              "enum": [
                "5",
                "4",
                "3",
                "2",
                "1",
                "0",
                "AwaitingInspection",
                "AwaitingPublication",
                "Exempt",
                "Pass",
                "Improvement Required"
              ]
            }
          },
          "nameContains": {
            "title": "Name contains",
            "type": "array",
            "description": "Optional. Keep only businesses whose name contains any of these words, e.g. pizza, coffee, bakery.",
            "items": {
              "type": "string"
            }
          },
          "matchCompaniesHouse": {
            "title": "Match to Companies House",
            "type": "boolean",
            "description": "Look up each business on Companies House to find the limited company behind it (company number, type, incorporation date). Adds about half a second per business.",
            "default": true
          },
          "onlyLimitedCompanies": {
            "title": "Only limited companies",
            "type": "boolean",
            "description": "Keep only businesses confidently matched to an active limited company, plc or LLP. Use this if you plan to email them: under PECR you can send B2B marketing to corporate subscribers with an opt-out, but sole traders and partnerships count as individuals.",
            "default": false
          },
          "excludeWithheldAddresses": {
            "title": "Skip businesses with no published address",
            "type": "boolean",
            "description": "Businesses run from a private home have their street address withheld by the FSA (only a partial postcode is shown). Skipping them keeps personal data out of your list.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum rows to return (0 = no limit). Each row is one charged event.",
            "default": 50
          },
          "watchlistName": {
            "title": "Watchlist name (monitor mode)",
            "type": "string",
            "description": "Optional label for the monitor snapshot. The snapshot is also keyed by your filters, so changing filters starts a new baseline."
          },
          "companiesHouseApiKey": {
            "title": "Your Companies House API key (optional)",
            "type": "string",
            "description": "Optional. A built-in key is used if empty. Get a free key at developer.company-information.service.gov.uk."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}