# UK ASA Ad Rulings Watchdog (`hllerdgn80/uk-asa-ad-rulings-watchdog`) Actor

Watch the ASA/CAP public rulings register for UK ad complaints - advertiser, medium, date, Upheld/Not upheld outcome and summary. Free public search form, no login, no scraping of blocked pages.

- **URL**: https://apify.com/hllerdgn80/uk-asa-ad-rulings-watchdog.md
- **Developed by:** [Halil Erdogan](https://apify.com/hllerdgn80) (community)
- **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 ASA Ad Rulings Watchdog

Watches the Advertising Standards Authority's (ASA/CAP) public **rulings
register** - the official, public record of every UK advertising complaint
that reached a formal, published decision.

Every entry gives you:

- **Advertiser** (company / brand, exactly as the ASA names it)
- **Outcome** - Upheld / Not upheld / Partially upheld (when the register shows one)
- **Medium** - TV, radio, paid search, paid social, influencer post, poster, etc.
- **Date published**
- **Plain-English summary** of what was complained about
- **Link to the full ruling** (the ASA's own reasoning, evidence considered, and any action required of the advertiser)

### Why this is useful

Marketing, legal, compliance and PR teams routinely need to know: *has this
advertiser (or my competitor, or my own client) had an ASA ruling against
them?* Brand-safety and compliance monitoring, competitor intelligence, and
legal/regulatory teams checking a sector (gambling, weight loss, crypto,
finance, alcohol, influencer marketing) all use this register manually today.
This Actor turns the ASA's own public search into structured, scheduled,
diffable data.

### How it works

The ASA publishes its rulings at `asa.org.uk/codes-and-rulings/rulings.html`, with its own free, public search form
(`q=`, `sort_order=`, `date_period=`/`from_date=`/`to_date=`, `page=`).
`robots.txt` on asa.org.uk explicitly allows this path (it only disallows
two unrelated paths: `/type/*/code_rule/*` and `/account/*`). This Actor
sends the same GET requests a browser would, reads the same public HTML
the ASA already serves to anyone, and parses the listing into rows. No
login, no API key, no paywall, no rate-limit bypass.

### Input

| Field | Description |
|---|---|
| `query` | Free text (advertiser, brand, sector keyword, issue). Leave empty for the newest rulings on any topic. |
| `sortOrder` | `recent` (default, newest first) or `relevant`. |
| `datePeriod` | `past_week` / `past_month` / `past_year`, or leave empty. |
| `fromDate` / `toDate` | UK format `DD/MM/YYYY`, used only when `datePeriod` is empty. |
| `watchLabel` | Free-text tag copied onto every row - lets you tell several scheduled watches apart. |
| `maxItems` | Cap on rows returned (pages through the register until this is hit). |

### Output (one row per dataset item)

`watch_label`, `status`, `advertiser`, `outcome`, `medium`, `date_published`
(ISO `YYYY-MM-DD`), `date_published_raw` (as shown on the site),
`summary`, `ruling_url`, `fetched_at`, `error`.

`status` is `ok` for a real ruling row, or one of `invalid_input` /
`http_error` / `network_error` / `parse_error` for a single explanatory row
(these are not charged).

### Pay-per-event

One charged event, `ruling-found`, fires once per ruling row (`status: ok`).
Explanatory rows for bad input or a failed request are free.

### Typical use

- Set `query` to your brand or a competitor's name, `sortOrder: recent`,
  schedule daily - get notified the day a new ruling against them publishes.
- Set `query` to a sector (`gambling`, `crypto`, `weight loss`, `influencer`)
  to monitor an entire category for compliance trends.
- Leave `query` empty with `datePeriod: past_week` to get every ruling
  published in the last week, across all sectors.

# Actor input Schema

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

Free text searched by the ASA's own site search across advertiser names and ruling text, e.g. a brand ('Ryanair'), a sector keyword ('gambling', 'crypto', 'weight loss'), or an issue ('misleading', 'influencer'). Leave empty to list the newest rulings regardless of topic.

## `sortOrder` (type: `string`):

'recent' lists the newest rulings first (best for a watchdog run); 'relevant' ranks by text match to the search term.

## `datePeriod` (type: `string`):

Restrict to rulings published in this rolling window. Leave empty to use fromDate/toDate instead, or to search all dates.

## `fromDate` (type: `string`):

Only used when Date window is left empty. UK format, e.g. '01/09/2026'.

## `toDate` (type: `string`):

Only used when Date window is left empty. UK format, e.g. '30/09/2026'.

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

Just a tag copied onto every output row (e.g. 'Competitor ad monitoring - gambling sector') so several scheduled watches can be told apart in one dataset or across runs.

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

Stops paging through the ASA rulings register once this many rows have been collected.

## Actor input object example

```json
{
  "query": "gambling",
  "sortOrder": "recent",
  "datePeriod": "",
  "maxItems": 50
}
```

# 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 = {
    "query": "gambling"
};

// Run the Actor and wait for it to finish
const run = await client.actor("hllerdgn80/uk-asa-ad-rulings-watchdog").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 = { "query": "gambling" }

# Run the Actor and wait for it to finish
run = client.actor("hllerdgn80/uk-asa-ad-rulings-watchdog").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 '{
  "query": "gambling"
}' |
apify call hllerdgn80/uk-asa-ad-rulings-watchdog --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hllerdgn80/uk-asa-ad-rulings-watchdog"
        }
    }
}
```

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/yptVthLf0afud0cKm/builds/YF5bzDWaKhdY52pqj/openapi.json
