# UK Ofsted URN Portfolio Inspection Outcome Event Monitor (`plym-actor-factory/uk-ofsted-urn-portfolio-inspection-monitor`) Actor

Watch a book of England state-funded school URNs and emit typed inspection-outcome / overall-effectiveness / safeguarding-inclusion-curriculum standard events from the official Ofsted monthly MI CSV on GOV.UK. Not HTML scrape of reports.ofsted.gov.uk; not MATpulse/Observatory; not a nationwide dump.

- **URL**: https://apify.com/plym-actor-factory/uk-ofsted-urn-portfolio-inspection-monitor.md
- **Developed by:** [Daniel Witney](https://apify.com/plym-actor-factory) (community)
- **Categories:** AI, Automation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 ofsted inspection outcome event delivereds

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 Ofsted URN Portfolio Inspection Outcome Event Monitor

Watch a book of **England state-funded school URNs** and emit typed **inspection-outcome / overall-effectiveness / safeguarding–inclusion–curriculum standard** events when the official **Ofsted monthly management-information CSV** on GOV.UK changes — not another nationwide Ofsted directory dump, not an HTML scrape of reports.ofsted.gov.uk, and **not** a MATpulse / Angel Solutions Observatory seat scrape.

### What this Actor does

1. Takes your URN watchlist (`urns`).
2. In **live** mode, downloads the official Ofsted **latest inspections** MI CSV once (discovers the newest file from the GOV.UK monthly MI page, or uses `miCsvUrl` / pinned fallback).
3. Diffs watched URNs against a durable Key-Value Store checkpoint.
4. Pushes **only** material change events for URNs on your book (PPE), plus one non-billable `RUN_STATUS` health row.

**First observation of a URN is baseline only** (no charge). Quiet months ≈ $0 product charges.

### Coverage honesty (read this)

| In scope | Out of scope |
|----------|----------------|
| England **state-funded schools** Ofsted monthly MI (latest inspections CSV on GOV.UK, OGL) | Early years / FE / independent / non-state registers |
| Typed events for watched URNs only | Nationwide “download every school and bill rows” dump SKU |
| Report-card standards: Safeguarding / Inclusion / Curriculum and teaching | HTML scrape of https://reports.ofsted.gov.uk as primary |
| Latest OEIF overall effectiveness where present (legacy graded taxonomy) | Overclaiming Outstanding/Good labels where OEIF/report-card fields differ |
| Monthly Ofsted MI publish cadence | Intra-day report publish alerts |
| Official GOV.UK HTTP CSV under OGL | MATpulse / Observatory unpaid scrape or seat replacement |

**Scope:** England Ofsted URN book. Cite Ofsted + GOV.UK; retrieval date is `as_of` / `fetchedAt` on events. No individual pupil data in the product payload.

### Input

| Field | Notes |
|-------|--------|
| `urns` | State-funded school Unique Reference Numbers (typically 5–6 digits). |
| `signalGroups` | `publication` (new inspection / publication date), `overall` (OEIF overall effectiveness), `standards` (Safeguarding / Inclusion / Curriculum). Default: all three. |
| `sourceMode` | `fixture` (default — Store health) or `live` (GOV.UK MI CSV; **no API key**). |
| `emitFixtureDemoEvents` | Default **false**. Only enable for local demos; Store auto-tests must stay false. |
| `miCsvUrl` | Optional pin to a specific assets.publishing.service.gov.uk CSV. |
| `discoverFromMiPage` | Default true — resolve newest latest-inspections CSV from the MI page when `miCsvUrl` empty. |

### Output events (billable)

| `event_type` | When |
|--------------|------|
| `OFSTED_NEW_INSPECTION_PUBLISHED` | Latest full inspection number and/or publication date changes on the MI CSV |
| `OFSTED_OVERALL_EFFECTIVENESS_CHANGED` | Latest OEIF overall effectiveness flips |
| `OFSTED_SAFEGUARDING_STANDARD_CHANGED` | Safeguarding standards flips |
| `OFSTED_INCLUSION_STANDARD_CHANGED` | Inclusion flips |
| `OFSTED_CURRICULUM_STANDARD_CHANGED` | Curriculum and teaching flips |
| `OFSTED_URN_GONE` | Explicit watched URN absent from CSV after prior presence |

Every successful run also pushes **`RUN_STATUS`** with `billable: false` (`FIXTURE_HEALTH` / `MONITOR_IDLE` / `CATCHUP_COMPLETE` / `HEALTH_OK`).

### Pricing (PPE)

| Event | Price |
|-------|-------|
| `ofsted-inspection-outcome-event-delivered` | **$0.02** ($20 / 1k) |
| `apify-actor-start` | **$0.00005** |

You pay when a URN **on your watchlist** has a material inspection-outcome / grade / standard change and we deliver it. Not charged: baselines, quiet books, duplicates, invalids, `RUN_STATUS`, fixture health, full CSV rows not on the book.

### Modes

- **Fixture (default):** no network; emits `RUN_STATUS` / `FIXTURE_HEALTH` only → **0** product charges (Store daily auto-test safe).
- **Live:** official GOV.UK Ofsted MI CSV — **no key required**.

### Legal

Ofsted management information published on GOV.UK for reuse under the **UK Open Government Licence**. Product default = URN + school name + inspection dates + standards/grades (minimise unnecessary PII; no pupil-level data in source).

### Not this product

- `parseforge/uk-ofsted-inspections-scraper` — full-register / dump SKU (different job).
- `nexgenwatch/uk-ofsted-provider-inspection-check` — one-shot official answer per URN.
- `muhammadafzal/uk-ofsted-inspections-scraper`, `spookyweb/uk-ofsted-inspections`, `danielainsworth/ofsted-register`, `solidcode/ofsted-reports-data-scraper` — dump/lookup shelf.
- `alkausari_mujahid/ofsted-providers-companies-house-enrichment` — enrichment adjacency.
- MATpulse / Angel Solutions Observatory seats (external SaaS; not scraped here).
- HTML scrape of reports.ofsted.gov.uk as primary.

### Example input (live baseline)

```json
{
  "urns": ["100033", "100125", "100193", "100234"],
  "sourceMode": "live",
  "signalGroups": ["publication", "overall", "standards"],
  "resumeFromCheckpoint": true,
  "emitFixtureDemoEvents": false
}
```

First live run stores baselines only. Subsequent scheduled monthly runs emit events when inspection outcomes / standards flip on the book.

# Actor input Schema

## `urns` (type: `array`):

England state-funded school Unique Reference Numbers (URNs) to monitor — typically 5–6 digits. Only these URNs are evaluated against the official Ofsted monthly MI latest-inspections CSV. Invalid entries are skipped with no charge. Not a nationwide dump.

## `signalGroups` (type: `array`):

Which change groups to evaluate: publication (new inspection number / publication date), overall (Latest OEIF overall effectiveness), standards (Safeguarding / Inclusion / Curriculum and teaching). Default: all three.

## `maxRunSeconds` (type: `integer`):

Wall-clock budget for the run (MI page discover + CSV download + URN watchlist diff).

## `maxEvents` (type: `integer`):

Stop after this many unique change events are delivered (does not include RUN\_STATUS).

## `resumeFromCheckpoint` (type: `boolean`):

If true, resume URN snapshots and seen event\_uids from the default Key-Value Store.

## `sourceMode` (type: `string`):

fixture = local/CI / Apify Store daily auto-test default (no network; emits RUN\_STATUS only unless emitFixtureDemoEvents=true). live = official Ofsted monthly MI CSV on GOV.UK (no API key). Not HTML scrape of reports.ofsted.gov.uk; not MATpulse/Observatory.

## `emitFixtureDemoEvents` (type: `boolean`):

When sourceMode=fixture, if true push fabricated change events from local fixtures (unit/local demos only). Default false so Store daily auto-tests never emit fake Ofsted events or charge ofsted-inspection-outcome-event-delivered. Production: leave false and use sourceMode=live. SAMPLE rows only: demo events use placeholder entities (never real companies/IDs), are flagged sample=true / isSample=true, and are NEVER charged.

## `asOfHint` (type: `string`):

Optional as\_of label for events / RUN\_STATUS. Does not force a nationwide dump bill.

## `maxTotalChargeUsd` (type: `number`):

Optional soft budget hint for delivered change events. Platform ACTOR\_MAX\_TOTAL\_CHARGE\_USD also applies when set.

## `miCsvUrl` (type: `string`):

Optional override for the official Ofsted latest-inspections MI CSV URL. If empty, the Actor discovers the newest 'latest inspections' CSV link from the GOV.UK monthly MI page (fallback pinned to the Aug 2026 assets URL).

## `discoverFromMiPage` (type: `boolean`):

If true (default) and miCsvUrl is empty, fetch the GOV.UK monthly MI statistical-data-set page and pick the newest state-funded latest-inspections CSV. Set false to use only the pinned fallback URL.

## Actor input object example

```json
{
  "urns": [
    "100033",
    "100125",
    "100193",
    "100234"
  ],
  "signalGroups": [
    "publication",
    "overall",
    "standards"
  ],
  "maxRunSeconds": 90,
  "maxEvents": 500,
  "resumeFromCheckpoint": true,
  "sourceMode": "fixture",
  "emitFixtureDemoEvents": false,
  "discoverFromMiPage": true
}
```

# Actor output Schema

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

JSON summary: delivered, charged, runStatus, checkpoint, stats, Ofsted MI coverage limits

# 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("plym-actor-factory/uk-ofsted-urn-portfolio-inspection-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("plym-actor-factory/uk-ofsted-urn-portfolio-inspection-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 plym-actor-factory/uk-ofsted-urn-portfolio-inspection-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plym-actor-factory/uk-ofsted-urn-portfolio-inspection-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/bPxL6iHvE1iKQWNJk/builds/oonjOz2VDvu1FaAdQ/openapi.json
