# Food Standards Agency API

> Food Standards Agency returns UK food hygiene ratings and inspection details as a workflow and API.

Food Standards Agency (FSA) finds food hygiene ratings by business name and town, street, or postcode. Get hygiene rating returns matching businesses, ratings, addresses, inspection dates, and available food safety standards.

- Page: https://fous.com/tools/food-standards-agency
- Handle: `@food-standards-agency`
- Category: [Food](https://fous.com/tools/category/food)
- Source website: https://ratings.food.gov.uk
- Last verified: Sep 29, 2026

## Methods

### Get hygiene rating

Operation `get_hygiene_rating`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Find UK food hygiene ratings by business name and town, street, or postcode. Results include inspection dates and plain-language scores when available; Scottish ratings generally have no component scores.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `business` | string | yes | `"Pret A Manger"` | Name of the restaurant, cafe, takeaway, or shop, for example Pret A Manger. |
| `location` | string | yes | `"Leeds"` | Town, street, or postcode, for example Leeds or LS1 4DT. |
| `max_results` | integer | no | `3` | Maximum number of matching businesses to return, for example 10. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "business",
    "location"
  ],
  "properties": {
    "business": {
      "type": "string",
      "minLength": 1,
      "description": "Name of the restaurant, cafe, takeaway, or shop, for example Pret A Manger.",
      "examples": [
        "Pret A Manger",
        "McDonalds",
        "No Such Imaginary Restaurant ZXYQ987"
      ]
    },
    "location": {
      "type": "string",
      "minLength": 1,
      "description": "Town, street, or postcode, for example Leeds or LS1 4DT.",
      "examples": [
        "Leeds",
        "Edinburgh",
        "LS1 4DT"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 10,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum number of matching businesses to return, for example 10.",
      "x-fous-developer": true,
      "examples": [
        3,
        2
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "business": "Pret A Manger",
      "location": "Leeds"
    },
    {
      "business": "McDonalds",
      "location": "Edinburgh",
      "max_results": 3
    },
    {
      "business": "Pret A Manger",
      "location": "LS1 4DT",
      "max_results": 2
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `businesses` | array |  | Matching food businesses, best match first. |
| `businesses[].rating` | string or null | `"5"` | Food hygiene rating, or Scottish inspection outcome. |
| `businesses[].fhrs_id` | integer | `877764` | Official FHRS establishment identifier. |
| `businesses[].hygiene` | string or null | `"Very good"` | Food handling standard in words. |
| `businesses[].postcode` | string or null | `"LS1 4DT"` | Business postcode. |
| `businesses[].structure` | string or null | `"Good"` | Premises and facilities standard in words. |
| `businesses[].full_address` | string | `"New Station Street, Leeds, LS1 4DT"` | Full street address including postcode. |
| `businesses[].business_name` | string | `"Pret A Manger"` | Name of the business. |
| `businesses[].business_type` | string or null | `"Other catering premises"` | Type of food business. |
| `businesses[].rating_meaning` | string or null | `"5 - Very good"` | Rating and its meaning in words. |
| `businesses[].local_authority` | string or null | `"Leeds"` | Authority that inspected the business. |
| `businesses[].rating_page_url` | string | `"https://ratings.food.gov.uk/business/877764"` | Official business rating page. |
| `businesses[].last_inspection_date` | string or null | `"2021-07-14"` | Date of the latest published inspection. |
| `businesses[].confidence_in_management` | string or null | `"Good"` | Food safety management standard in words. |

**Example input**

```json
{
  "business": "Pret A Manger",
  "location": "Leeds"
}
```

**Example output**

```json
{
  "businesses": [
    {
      "rating": "5",
      "fhrs_id": 877764,
      "hygiene": "Very good",
      "postcode": "LS1 4DT",
      "structure": "Good",
      "full_address": "New Station Street, Leeds, LS1 4DT",
      "business_name": "Pret A Manger",
      "business_type": "Other catering premises",
      "rating_meaning": "5 - Very good",
      "local_authority": "Leeds",
      "rating_page_url": "https://ratings.food.gov.uk/business/877764",
      "last_inspection_date": "2021-07-14",
      "confidence_in_management": "Good"
    },
    {
      "rating": "5",
      "fhrs_id": 937212,
      "hygiene": "Very good",
      "postcode": "LS2 7AR",
      "structure": "Good",
      "full_address": "Unit 20 Victoria Gate, Harewood Street, Leeds, LS2 7AR",
      "business_name": "Pret A Manger",
      "business_type": "Restaurant/Cafe/Canteen",
      "rating_meaning": "5 - Very good",
      "local_authority": "Leeds",
      "rating_page_url": "https://ratings.food.gov.uk/business/937212",
      "last_inspection_date": "2026-07-22",
      "confidence_in_management": "Very good"
    },
    {
      "rating": "5",
      "fhrs_id": 1685030,
      "hygiene": "Good",
      "postcode": "LS1 6AW",
      "structure": "Good",
      "full_address": "6 Lands Lane, Leeds, LS1 6AW",
      "business_name": "Pret A Manger Lands Lane",
      "business_type": "Restaurant/Cafe/Canteen",
      "rating_meaning": "5 - Very good",
      "local_authority": "Leeds",
      "rating_page_url": "https://ratings.food.gov.uk/business/1685030",
      "last_inspection_date": "2026-08-26",
      "confidence_in_management": "Very good"
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@food-standards-agency",
  "visibility": "public",
  "operation": "get_hygiene_rating",
  "version": 1,
  "input": {
    "business": "Pret A Manger",
    "location": "Leeds"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@food-standards-agency\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_hygiene_rating\",\n  \"version\": 1,\n  \"input\": {\n    \"business\": \"Pret A Manger\",\n    \"location\": \"Leeds\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@food-standards-agency",
  "visibility": "public",
  "operation": "get_hygiene_rating",
  "version": 1,
  "input": {
    "business": "Pret A Manger",
    "location": "Leeds"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/food-standards-agency`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_hygiene_rating`: Get hygiene rating. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-food-standards-agency https://api.fous.com/mcp/tools/food-standards-agency --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Compare restaurant ratings across a town
- Check a takeaway’s latest published inspection date
- Find a food shop’s rating and address
- Review available food handling and safety management standards

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Food Standards Agency tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Food Standards Agency account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from ratings.food.gov.uk when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### What is a food business’s hygiene rating?

Get hygiene rating finds a business by name and location and returns its rating or Scottish inspection outcome.

### When was a business last inspected?

Get hygiene rating returns the latest published inspection date when available.

### What food safety standards were assessed?

Get hygiene rating returns available food handling, premises and facilities, and food safety management standards.

## Related

- [Open Food Facts API](https://fous.com/tools/open-food-facts.md): Open Food Facts provides public packaged-food information, including ingredients, allergens, nutrition, and product classifications; coverage varies, and search results favor popular products.
- [Companies House API](https://fous.com/tools/companies-house.md): Companies House returns UK public-register company details, officers, people with significant control and recent filings; records may be incomplete, and ceased entries are optional.
- [Uber Eats API](https://fous.com/tools/uber-eats.md): Uber Eats shows restaurants and delivery options, with menus, prices, ratings, and delivery details; fees may reflect guest promotions and rating counts may be rounded.
- [McDonald's API](https://fous.com/tools/mcdonalds.md): McDonald’s provides menu-item food information for US, UK and Canadian items, plus nearby US restaurants and listed hours today, which may miss unexpected closures.
- [BBC Good Food API](https://fous.com/tools/bbc-good-food.md): BBC Good Food returns searchable web recipes, excluding app-only recipes, and full recipe ingredients, steps, and per-serving nutrition when available.
- [NHS API](https://fous.com/tools/nhs.md): NHS provides condition and medicine guidance, with condition dates reflecting the latest pages used, and nearby England service listings ordered by distance; availability details may be missing.
- [FDA API](https://fous.com/tools/fda.md): FDA provides drug safety data, latest matching drug labels, common reported side effects, and newest-first drug, food, and device recalls; recent drug and device recalls may be missing, and weekly food statuses may lag.
- [Tripadvisor API](https://fous.com/tools/tripadvisor.md): Tripadvisor provides traveler-ranked first-page city listings of attractions, restaurants and hotels, plus latest reviews; hotel prices and booking sites depend on supplied stay dates and availability.
- [All Food tools](https://fous.com/tools/category/food)
