# BRAINIAC Food Safety Search API

> BRAINIAC Food Safety Search API is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-17).

Searches UK food hygiene and safety ratings for restaurants and food businesses by name, location, or postcode with optional filtering by rating and business type

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/food-safety/search?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-food-safety-search-api-5607b436
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YWy8ETY69uVazmbgd3Gjy

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability brainiac-food-safety-search-api-5607b436 -d '<json body>'
```

Example prompt: Can you search for food businesses called 'Nando's' within 5km of latitude 51.5074, longitude -0.1278, and only show me places with a hygiene rating of 5?

## When to prefer this

Use this endpoint when you need to query UK food hygiene ratings and inspection data for restaurants, takeaways, or other food businesses — especially when searching by name, geographic coordinates, or postcode. It is ideal for agents that need to surface food safety information to consumers or for compliance checking in the UK. Prefer this over general web search when you need structured, paginated, filterable food safety data from the FSA.

## Known failure modes

- Empty results if query string matches no known businesses
- Validation error if latitude or longitude are out of range
- Pagination out of bounds if page exceeds available results
- Rate or payment failure if USDC payment on Base is not completed via x402
- Invalid businessTypeId or localAuthorityId returns empty or error response

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

Returns a paginated JSON list of food establishments matching the search criteria, including business names, addresses, hygiene/food safety ratings, business type, and local authority information as sourced from the UK Food Standards Agency database.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "page": {
   "type": "integer",
   "default": 1,
   "maximum": 9007199254740991,
   "minimum": 1
  },
  "limit": {
   "type": "integer",
   "default": 20,
   "maximum": 100,
   "minimum": 1
  },
  "query": {
   "type": "string",
   "maxLength": 200,
   "minLength": 1
  },
  "latitude": {
   "type": "number",
   "maximum": 90,
   "minimum": -90
  },
  "postcode": {
   "type": "string",
   "maxLength": 20
  },
  "longitude": {
   "type": "number",
   "maximum": 180,
   "minimum": -180
  },
  "maxDistance": {
   "type": "number",
   "maximum": 100,
   "minimum": 0
  },
  "ratingValue": {
   "type": "string",
   "maxLength": 50
  },
  "businessTypeId": {
   "type": "integer",
   "maximum": 10000,
   "minimum": 1
  },
  "localAuthorityId": {
   "type": "string",
   "maxLength": 10
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "page": 1,
  "query": "Tesco",
  "results": [
   {
    "fsaId": 191950,
    "phone": "",
    "fsaUrl": "https://api.ratings.food.gov.uk/establishments?name=Tesco&ratingValue=5&postcode=PE13&pageSize=20&pageNumber=1",
    "rating": {
     "key": "fhrs_5_en-gb",
     "date": "2025-07-07T00:00:00",
     "value": "5",
     "pending": false
    },
    "scores": {
     "hygiene": 0,
     "structural": 5,
     "confidenceInManagement": 0
    },
    "address": {
     "line1": "",
     "line2": "500-504 Anlaby Road",
     "line3": "Kingston Upon Hull",
     "line4": "",
     "postcode": "HU3 6TA"
    },
    "geocode": {
     "latitude": "53.7440257",
     "longitude": "-0.3825706"
    },
    "distance": null,
    "schemeType": "FHRS",
    "retrievedAt": "2026-11-07T12:08:54.169Z",
    "businessName": "Tesco",
    "businessType": "Retailers - supermarkets/hypermarkets",
    "rightToReply": "",
    "businessTypeId": 7840,
    "localAuthority": {
     "code": "866",
     "name": "Hull City",
     "email": "foodandhealth&safety@hullcc.gov.uk",
     "website": "http://www.hull.gov.uk"
    },
    "changesByServerId": 0,
    "localAuthorityBusinessId": "24991"
   },
   {
    "fsaId": 1861784,
    "phone": "",
    "fsaUrl": "https://api.ratings.food.gov.uk/establishments?name=Tesco&ratingValue=5&postcode=PE13&pageSize=20&pageNumber=1",
    "rating": {
     "key": "fhrs_5_en-gb",
     "date": "2023-11-11T00:00:00",
     "value": "5",
     "pending": false
    },
    "scores": {
     "hygiene": 0,
     "structural": 5,
     "confidenceInManagement": 0
    },
    "address": {
     "line1": "Tesco Stores Ltd Craven Street",
     "line2": "",
     "line3": "",
     "line4": "Skipton",
     "postcode": "BD23 2AG"
    },
    "geocode": {
     "latitude": null,
     "longitude": null
    },
    "distance": null,
    "schemeType": "FHRS",
    "retrievedAt": "2026-11-07T12:08:54.169Z",
    "businessName": "Tesco",
    "businessType": "Retailers - supermarkets/hypermarkets",
    "rightToReply": "",
    "businessTypeId": 7840,
    "localAuthority": {
     "code": "250",
     "name": "North Yorkshire",
     "email": "regsupport@northyorks.gov.uk",
     "website": "https://www.northyorks.gov.uk/"
    },
    "changesByServerId": 0,
    "localAuthorityBusinessId": "Cx11855"
   },
   "…"
  ],
  "sources": [
   {
    "url": "https://api.ratings.food.gov.uk/establishments?name=Tesco&ratingValue=5&postcode=PE13&pageSize=20&pageNumber=1",
    "source": "FSA",
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-food-safety-search-api-5607b436/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
