{
  "openapi": "3.0.1",
  "info": {
    "title": "UK New Food Business Leads - FHRS Hygiene Ratings",
    "description": "From $0.50 per 1,000 establishments, no start fee. Newly rated and newly registered UK food businesses from the FSA FHRS register, by date window: name, address, postcode, rating, sub-scores, geocode, council. All 363 councils, 613,379 premises, no API key. No business email or phone in this source.",
    "version": "0.1",
    "x-build-id": "fZBuMaYy2dlBUNAcz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~fhrs-food-hygiene-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-fhrs-food-hygiene-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/scrapersdelight~fhrs-food-hygiene-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-fhrs-food-hygiene-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/scrapersdelight~fhrs-food-hygiene-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-fhrs-food-hygiene-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": {
          "lookbackDays": {
            "title": "Rated in the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "The main control. Returns establishments whose rating date falls in the last N days. Measured yield across the whole UK: about 1,270 in 7 days, 8,300 in 30 days, 43,500 in 90 days. Set 0 for no date filter at all (the entire register in scope - 613,379 rows). Ignored if you set explicit dates below.",
            "default": 30
          },
          "ratedFrom": {
            "title": "Rated from (optional)",
            "type": "string",
            "description": "Explicit start of the rating-date window, YYYY-MM-DD. Overrides 'Rated in the last N days'. Leave empty to use the rolling window.",
            "default": ""
          },
          "ratedTo": {
            "title": "Rated to (optional)",
            "type": "string",
            "description": "Explicit end of the rating-date window, YYYY-MM-DD, inclusive. Overrides 'Rated in the last N days'.",
            "default": ""
          },
          "includeNewlyRegistered": {
            "title": "Also include businesses awaiting their first inspection",
            "type": "boolean",
            "description": "These are newly registered food businesses the council has not yet inspected - the freshest lead in the register. They carry a 1901-01-01 placeholder instead of a rating date, so they cannot be date-filtered and are included as a segment (ratingStatus = awaiting-inspection). Measured 6.78% of the register, but publication is council-dependent: Liverpool 1,159, Bristol 595, and Birmingham, Leeds and Manchester zero.",
            "default": true
          },
          "localAuthorities": {
            "title": "Councils",
            "type": "array",
            "description": "Council name ('Birmingham'), FSA slug ('aberdeen-city'), council code ('760') or numeric id. LEAVE EMPTY to sweep all 363 UK councils (376 requests, several minutes, ~480 MB read from the API).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Restrict to whole FSA regions. Combine with Councils to search within a region. Empty = every region.",
            "items": {
              "type": "string",
              "enum": [
                "East Counties",
                "East Midlands",
                "London",
                "North East",
                "North West",
                "Northern Ireland",
                "Scotland",
                "South East",
                "South West",
                "Wales",
                "West Midlands",
                "Yorkshire and Humberside"
              ]
            },
            "default": []
          },
          "businessTypes": {
            "title": "Business types",
            "type": "array",
            "description": "The FSA uses exactly these 14 categories. Empty = all of them.",
            "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",
                "Caring Premises",
                "School/college/university",
                "Manufacturers/packers",
                "Distributors/Transporters",
                "Farmers/growers",
                "Importers/Exporters"
              ]
            },
            "default": []
          },
          "ratingValues": {
            "title": "Rating values",
            "type": "array",
            "description": "Keep only these ratings. England/Wales/NI use 0-5; Scotland uses Pass, Improvement Required, Pass and Eat Safe. Spacing is ignored, so 'Awaiting Inspection' also matches the FHRS spelling 'AwaitingInspection'. For the remedial-work lead list use: 0, 1, 2, Improvement Required (measured 3.21% of the register). Empty = every rating.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "schemeType": {
            "title": "Scheme",
            "enum": [
              "any",
              "FHRS",
              "FHIS"
            ],
            "type": "string",
            "description": "FHRS is England, Wales and Northern Ireland (0-5 ratings with sub-scores). FHIS is Scotland (Pass / Improvement Required, and it publishes no sub-scores at all).",
            "default": "any"
          },
          "onlyNewSinceLastRun": {
            "title": "Only what this Actor has not delivered before",
            "type": "boolean",
            "description": "Monitor mode. Suppresses any establishment a previous run of this Actor already delivered to you, using a named key-value store that survives between runs. The first run has no baseline, so it delivers everything in scope. This is the only way to get a true 'newly registered' feed, because the register does not publish a registration date.",
            "default": false
          },
          "maxEstablishments": {
            "title": "Max establishments",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on rows delivered - and therefore charged. 0 means no cap. A whole-UK 30-day window returns about 8,300 rows, so raise this before a national run.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Concurrent requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Measured against the live API on 2026-09-16: 4 and 5 in flight returned 72 of 72 requests clean; 8 in flight had half come back HTTP 429 with a 'CPU intensive query' message. The Actor backs off and retries either way. Do not raise this expecting it to be faster.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Datacenter is right for this source - it has no anti-bot of any kind, and a whole-UK sweep reads about 480 MB, which would be expensive over residential.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}