# England, Wales & Northern Ireland Meat Audit Change Signals (`starshaped_bullsnake/england-wales-northern-ireland-meat-audit-change-signals`) Actor

Monitor official FSA approved meat establishment audit outcomes across England, Wales, and Northern Ireland.

- **URL**: https://apify.com/starshaped\_bullsnake/england-wales-northern-ireland-meat-audit-change-signals.md
- **Developed by:** [Starshape Tools](https://apify.com/starshaped_bullsnake) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 meat audit change signals

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## England, Wales & Northern Ireland Meat Audit Change Signals

Monitor official Food Standards Agency audit outcomes for approved meat establishments in England, Wales, and Northern Ireland. This is separate from Food Hygiene Ratings and from the approved-establishment lifecycle monitor.

### Signals and precedence

Exactly one Dataset record represents one entity transition. Precedence is:

1. `URGENT_IMPROVEMENT_ENTERED`
2. `URGENT_IMPROVEMENT_CLEARED`
3. `AUDIT_OUTCOME_DETERIORATED` or `AUDIT_OUTCOME_IMPROVED`
4. `OUTCOME_CHANGED_UNCLASSIFIED`
5. `NEW_AUDIT_PUBLISHED`

For example, moving from `Improvement Necessary` to `Urgent Improvement Necessary` emits only `URGENT_IMPROVEMENT_ENTERED`. The record contains compact before/after outcome, severity, audit date, and relevant metadata.

Severity is exact: Good `0`, Generally Satisfactory `1`, Improvement Necessary `2`, and Urgent Improvement Necessary `3`. Unknown outcomes remain `UNKNOWN`; severity is never guessed. Audit dates support only `YYYY-MM-DD` and `DD/MM/YYYY`, normalized to `YYYY-MM-DD` without locale-dependent parsing.

### Source, keys, and safety

Each live run resolves the newest resource whose title starts `Meat Establishment Audits as at`, requires CSV format, and explicitly ignores the Audit Questions Excel workbook. Source: [FSA Meat Establishment Audits](https://data.food.gov.uk/catalog/datasets/77b34073-f34e-4a6a-a16e-97aed1711014).

The stable key alias priority is `ApprovalNumber`, then `EstablishmentNumber`, then `AppNo`. Blank keys fail the full cycle. Duplicate-key groups are compared across every parsed source column after only surrounding-whitespace, line-ending, and BOM normalization. Fully identical publication duplicates collapse to one source row without creating a business signal. Any differing column causes a source-wide key anomaly, zero signals, and no snapshot mutation; there is no fuzzy fallback or per-key quarantine.

Expected geography is exactly England, Wales, and Northern Ireland. Unexpected or blank Country values fail closed. Based on the current empirical source, invalid AuditDate and unknown Outcome rates are each guarded at 0.1%; at the current scale, a single unexpected value exceeds that threshold. A major row-count collapse also fails closed.

The first valid live run stores a baseline and emits zero signals (`BASELINE_INITIALIZED`). `maxItems` limits Dataset emission only. Dataset and `OUTPUT` persistence complete before snapshot commit.

### Sample mode

Use `{ "mode": "sample", "maxItems": 30 }` for a deterministic, non-empty demonstration through production date, severity, and diff logic. Sample mode performs zero external HTTP requests, never opens the production named key-value store, and never mutates its snapshot.

### Licence

Contains Food Standards Agency information licensed under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

# Actor input Schema

## `mode` (type: `string`):

Live official comparison or isolated sample demonstration.

## `signalTypes` (type: `array`):

Optional signal-type filter.

## `approvalNumbers` (type: `array`):

Optional normalized approval-number filter.

## `baselineOnly` (type: `boolean`):

Refresh the full validated baseline without emitting business signals.

## `maxItems` (type: `integer`):

Dataset output limit only; acquisition, validation, and snapshot remain complete.

## Actor input object example

```json
{
  "mode": "sample",
  "baselineOnly": false,
  "maxItems": 30
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `OUTPUT` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "sample",
    "maxItems": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("starshaped_bullsnake/england-wales-northern-ireland-meat-audit-change-signals").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "sample",
    "maxItems": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("starshaped_bullsnake/england-wales-northern-ireland-meat-audit-change-signals").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "sample",
  "maxItems": 30
}' |
apify call starshaped_bullsnake/england-wales-northern-ireland-meat-audit-change-signals --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,starshaped_bullsnake/england-wales-northern-ireland-meat-audit-change-signals"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/1tEIpmGyQWS51ZHGL/builds/W608N1lNKXKfImnDj/openapi.json
