# UK Product Safety Recall Radar - Marketplace + Spike Detector (`hllerdgn80/uk-product-safety-recall-radar`) Actor

Tracks official OPSS/GOV.UK product safety recalls: flags which recalled items were sold via Amazon/eBay/Temu/AliExpress etc, and detects product categories currently spiking with serious-risk alerts. Keyless official API - no other Store Actor extracts marketplace or does spike detection.

- **URL**: https://apify.com/hllerdgn80/uk-product-safety-recall-radar.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 Product Safety Recall Radar - Marketplace + Spike Detector

Tracks the official GOV.UK "product safety alerts, reports and recalls" feed
(published mainly by the Office for Product Safety and Standards, OPSS) and
adds two things the raw feed does not give you:

1. **Which recalls trace back to an online marketplace.** OPSS often writes
   "X sold via Amazon" or "sold on eBay" straight into the alert's own title,
   but that is free text, not a filterable field on GOV.UK. This Actor
   extracts the marketplace name (Amazon, eBay, Temu, AliExpress, Wish,
   Shein, Etsy, TikTok Shop, Facebook Marketplace, Vinted, OnBuy, Fruugo, Not
   on the High Street, or any other "sold via/on/through X" phrasing) so you
   can filter to just those, run over run.
2. **Category spike detection.** A rolling per-category count (kept in this
   Actor's own key-value store across runs) flags a product category - for
   example "childcare-articles-childrens-equipment" or "hobby-sports-
   equipment" - that is currently generating an unusually high number of
   serious/high-risk alerts inside a configurable time window. That is a
   derived early-warning signal, not just a list of alerts.

### Data source

`www.gov.uk/api/search.json`, filtered to
`content_store_document_type=product_safety_alert_report_recall` - the same
public, keyless search index that powers the GOV.UK site's own finder at
[www.gov.uk/product-safety-alerts-reports-recalls](https://www.gov.uk/product-safety-alerts-reports-recalls).
No API key, no login, no scraping of rendered HTML: every field this Actor
uses (title, link, description, publish date, risk level, product category,
alert type, corrective-action "measure type") comes back directly from the
search API's own `fields[]` parameters, the same facets shown in that
finder's filter sidebar. Licence: Open Government Licence v3.0.

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `riskLevels` | array of strings | `["serious", "high"]` | `serious`, `high`, `medium`, `low`, `not-provided` |
| `productCategories` | array of strings | `[]` (all) | GOV.UK category slugs, e.g. `toys`, `electrical-products` |
| `alertTypes` | array of strings | `[]` (all) | `product-safety-alert`, `product-safety-report`, `product-recall` |
| `keyword` | string | `""` | Free-text search, e.g. a brand name |
| `maxResults` | integer | `200` | Alerts to fetch this run, newest first |
| `rollingWindowDays` | integer | `30` | Window for the category-spike count |
| `spikeThreshold` | integer | `5` | Alerts in the window that mark a category as spiking |
| `onlyNewSinceLastRun` | boolean | `false` | Only push alerts not already returned by an earlier run of this Actor |
| `onlyMarketplaceListings` | boolean | `false` | Only push alerts where a marketplace name was detected |

### Output (one row per alert)

`title`, `url`, `published_at`, `product_alert_type`, `product_category`,
`risk_level`, `measure_types`, `description`, `marketplace`,
`is_marketplace_listing`, `event_type` (`unseen_before` / `seen_again`),
`category_window_count`, `category_spike`.

### Example

Input:

```json
{
  "riskLevels": ["serious", "high"],
  "onlyMarketplaceListings": true,
  "maxResults": 50
}
```

A resulting row:

```json
{
  "title": "Product Safety Report: Baby Side Sleeper Wedge sold via Amazon (2609-0115)",
  "url": "https://www.gov.uk/product-safety-alerts-reports-recalls/product-safety-report-baby-side-sleeper-wedge-sold-via-amazon-2609-0115",
  "published_at": "2026-09-21T14:24:10Z",
  "product_alert_type": "product-safety-report",
  "product_category": "childcare-articles-childrens-equipment",
  "risk_level": "serious",
  "measure_types": ["removal-of-listing-by-online-marketplace"],
  "description": "Product Safety Report for Baby Side Sleeper Wedge sold via Amazon presenting a serious risk of suffocation.",
  "marketplace": "Amazon",
  "is_marketplace_listing": true,
  "event_type": "unseen_before",
  "category_window_count": 6,
  "category_spike": true
}
```

### Notes

- Pay-per-event: `recall-alert-detected` is charged once per row pushed to
  the dataset (filtered-out rows are never charged).
- No scraping, no third-party HTTP library: every request goes straight to
  `www.gov.uk/api/search.json` over the standard library's own `urllib`,
  with retries for the ordinary transient failures of a free public API
  (HTTP 429/5xx, connection resets, `http.client.IncompleteRead`).
- `event_type` and the category-spike count depend on this Actor's own
  key-value store, which persists only across runs made under the same
  Actor/task on the same Apify account - not shared between users.

# Actor input Schema

## `riskLevels` (type: `array`):

Which OPSS-assigned risk levels to pull. Matches the GOV.UK finder's own facet values exactly: "serious", "high", "medium", "low", "not-provided". Default keeps only the two levels worth acting on immediately.

## `productCategories` (type: `array`):

GOV.UK category slugs to filter to, e.g. "childcare-articles-childrens-equipment", "electrical-products", "toys". Leave empty for all categories. See the category filter on www.gov.uk/product-safety-alerts-reports-recalls for the exact slugs (visible in that page's own filter URL).

## `alertTypes` (type: `array`):

Restrict to one or more of: "product-safety-alert" (regulator warning), "product-safety-report" (OPSS's own investigation writeup, most common for marketplace items), "product-recall" (formal recall notice). Leave empty for all three.

## `keyword` (type: `string`):

Free-text search against the GOV.UK index, same as typing into the search box on the product safety finder, e.g. "e-bike battery" or a specific brand name.

## `maxResults` (type: `integer`):

Upper limit on how many matching alerts to pull back, newest first, in one run.

## `rollingWindowDays` (type: `integer`):

How many days of newly-seen alerts (across this and previous runs) count toward a product category's rolling total - the basis for spike detection. A category with an unusually high count of serious/high-risk alerts inside this window is flagged 'category\_spike': true on every row in that category, a derived signal no raw alert feed provides.

## `spikeThreshold` (type: `integer`):

A category is marked as spiking once its rolling count (within the window above) reaches this many newly-seen alerts.

## `onlyNewSinceLastRun` (type: `boolean`):

If enabled, skip alerts this Actor already returned in a previous run against the same Actor (same input/dataset lineage keeps its own key-value store). Leave off for a full snapshot on the first run.

## `onlyMarketplaceListings` (type: `boolean`):

If enabled, only push alerts where this Actor detected an online marketplace name (Amazon, eBay, Temu, AliExpress, Wish, Shein, Etsy, TikTok Shop, Facebook Marketplace, Vinted, OnBuy, Fruugo, Not on the High Street, or another 'sold via/on/through X' mention) in the alert's own title or description.

## Actor input object example

```json
{
  "riskLevels": [
    "serious",
    "high"
  ],
  "productCategories": [],
  "alertTypes": [],
  "keyword": "",
  "maxResults": 200,
  "rollingWindowDays": 30,
  "spikeThreshold": 5,
  "onlyNewSinceLastRun": false,
  "onlyMarketplaceListings": false
}
```

# 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-product-safety-recall-radar").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-product-safety-recall-radar").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-product-safety-recall-radar --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hllerdgn80/uk-product-safety-recall-radar"
        }
    }
}
```

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/gyGQc3jetXCySxexq/builds/GMF22sJaQFJh1JX15/openapi.json
