# UK GCA Supermarket Compliance Monitor (`hllerdgn80/uk-gca-supermarket-compliance-monitor`) Actor

Track everything the Groceries Code Adjudicator (GCA) publishes on GOV.UK — investigations, compliance rulings, annual supplier surveys, guidance and news about how the UK's largest supermarkets treat their suppliers. Official GOV.UK Search API, no login, no scraping.

- **URL**: https://apify.com/hllerdgn80/uk-gca-supermarket-compliance-monitor.md
- **Developed by:** [Halil Erdogan](https://apify.com/hllerdgn80) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

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

## UK GCA Supermarket Compliance Monitor

Tracks everything the **Groceries Code Adjudicator (GCA)** — the UK regulator that polices
how the country's largest supermarkets treat their food and drink suppliers — publishes on
GOV.UK: investigation findings, compliance/enforcement rulings, the annual supplier survey,
guidance on the Groceries Supply Code of Practice, and news.

The GCA is the only body that formally grades supermarkets (Tesco, Sainsbury's, Asda,
Morrisons, Co-op, Aldi, Lidl, Waitrose, Marks & Spencer, Iceland, Ocado, Amazon) on whether
they pay suppliers on time, give reasonable notice of delisting, and follow the statutory
Code. Its findings feed directly into supplier-relations and food-supply-chain journalism,
and into compliance research for anyone selling into UK grocery retail.

### What it does

The Actor queries the **official GOV.UK Search API**
(`https://www.gov.uk/api/search.json`), filtered to the GCA organisation. This is the same
public, keyless, documented JSON endpoint that powers the "Latest from Groceries Code
Adjudicator" list on GCA's own GOV.UK pages — no scraping, no login, no bot-detection to
work around.

For every matching publication it returns the title, description/summary, the GOV.UK
content type (news story, publication, transparency data, guidance, corporate report,
consultation), the live GOV.UK URL, and the publish date.

### Input

| Field | Type | Description |
|---|---|---|
| `query` | string | Optional keyword, e.g. a retailer name (`Tesco`) or topic (`investigation`, `annual survey`). Leave empty for everything GCA has published. |
| `dateFrom` | string | `YYYY-MM-DD`. Only items published on/after this date. |
| `dateTo` | string | `YYYY-MM-DD`. Only items published on/before this date. |
| `formats` | array | Optional GOV.UK content-format filter (`news_story`, `publication`, `transparency`, `guidance`, `corporate_report`, `consultation`, `about`, `organisation`). |
| `watchLabel` | string | Tag copied onto every output row, useful when running several saved/scheduled searches. |
| `maxItems` | integer | Stops paging once this many rows are collected (default 100, max 2000). |

### Output (one dataset row per publication)

```json
{
  "watch_label": "GCA watch",
  "status": "ok",
  "title": "GCA publishes findings of Tesco compliance review",
  "description": "The Adjudicator's review found Tesco compliant with the Groceries Supply Code of Practice.",
  "document_type": "Press release",
  "content_format": "news_story",
  "url": "https://www.gov.uk/government/news/...",
  "date_published": "2026-06-12T09:15:00Z",
  "fetched_at": "2026-09-28T00:00:00+00:00",
  "error": null
}
```

If the request fails or the input is invalid, a single row is pushed with `status` set to
`invalid_input`, `http_error`, `network_error` or `parse_error`, and the reason in `error`.

### Pay-per-event

Only rows with `status: "ok"` are charged, on the `gca-item-found` event. Error/empty-result
rows are free.

### Suggested use

- Schedule a run every morning with no filters to catch anything new the GCA has published
  in the last 24 hours (combine with `dateFrom` set to yesterday).
- Run one watch per retailer name (`query: "Aldi"`, `query: "Sainsbury's"`, …) to build a
  compliance timeline per supermarket.
- Filter `formats: ["transparency"]` to pull only the annual supplier survey and levy data
  releases.

### Notes

- Data source: GOV.UK Search API, `https://www.gov.uk/api/search.json`, a free public JSON
  API documented at `https://docs.publishing.service.gov.uk/repos/search-api.html`. No
  authentication, no scraping, respects GOV.UK's `robots.txt` (the endpoint is not under
  `/search/all`, the only disallowed search path).
- Results are limited to content tagged to the `groceries-code-adjudicator` GOV.UK
  organisation, i.e. GCA's own publications — not general supermarket news.

# Actor input Schema

## `query` (type: `string`):

Free text to narrow results, e.g. a retailer name ('Tesco', 'Co-op', 'Asda') or a topic ('investigation', 'annual survey', 'delisting'). Leave empty to fetch everything GCA has published.

## `dateFrom` (type: `string`):

YYYY-MM-DD. Only items first published on or after this date.

## `dateTo` (type: `string`):

YYYY-MM-DD. Only items first published on or before this date.

## `formats` (type: `array`):

Restrict to one or more GOV.UK content formats. Leave empty for all. 'news_story' = news items; 'publication' / 'transparency' = investigation reports, surveys, levy data; 'guidance' = the Groceries Supply Code of Practice and how-to-complain guides; 'corporate_report' = annual reports/accounts.

## `watchLabel` (type: `string`):

Tag copied onto every output row (e.g. 'GCA - Tesco watch') so several scheduled watches can be told apart in one dataset or across runs.

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

Stops paging through the GOV.UK Search API once this many rows have been collected.

## Actor input object example

```json
{
  "maxItems": 100
}
```

# Actor output Schema

## `results` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("hllerdgn80/uk-gca-supermarket-compliance-monitor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("hllerdgn80/uk-gca-supermarket-compliance-monitor").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 '{}' |
apify call hllerdgn80/uk-gca-supermarket-compliance-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hllerdgn80/uk-gca-supermarket-compliance-monitor"
        }
    }
}
```

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/kftEpsASu3GDtYEK6/builds/8XNNeVncf1du80zoa/openapi.json
