# Authorized Policy Page Change Audit (`logical_resourcefulnes/authorized-policy-page-change-audit`) Actor

For operations teams: compare authorized static policy-page text with saved baselines, focused selectors and noise exclusions. Review meaningful changes; JavaScript-rendered and signed-in pages are not supported.

- **URL**: https://apify.com/logical_resourcefulnes/authorized-policy-page-change-audit.md
- **Developed by:** [Revenue Pilot](https://apify.com/logical_resourcefulnes) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $25.00 / 1,000 complete page comparisons

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

## Authorized Policy Page Change Audit

Compare authorized policy page text with stored evidence, focused selectors, noise exclusions and guarded failure handling.

### Quick start

Run with the default input for a working demonstration. The default uses the identified open data preset. Demonstrations are owner tests, not customer revenue.

```json
{
  "monitorKey": "default"
}
```

For your own data, set rightsConfirmed to true only if you have permission to process it. Use the input descriptions for object fields and column mappings. URLs must be public HTTPS without credentials or secret query parameters. Website/feed requests respect robots.txt; APIs use their documented endpoints. No authenticated pages, anti-bot bypass or paid API is used.

### Results and saved comparisons

OUTPUT in the run key-value store is authoritative JSON (records, diagnostics, summary and billing checkpoints). RESULTS.csv is a formula-protected export; DIAGNOSTICS.json explains failures and incomplete input. The dataset includes evidence records and nonbillable source diagnostics. Operator-stop and below-budget diagnostics are available in OUTPUT and DIAGNOSTICS.json. A green Apify run alone does not prove a source was healthy: inspect OUTPUT.status and diagnostics. Reuse monitorKey for comparisons, change it for an independent baseline. Customer state is stored in the Actor-specific named store in the customer's Apify account, bounded to 5,000 state entries / 4 MiB. Avoid concurrent runs with the same monitorKey. Source records outside the retained window may appear as baseline again.

Static authorized HTML text comparison. Scripts, styles, navigation, headers and footers are excluded by default. This tool does not render JavaScript pages or bypass bot controls. Failed or incomplete fetches never become change events.

### Price

Actor start: $0.01, charged by Apify per GB of assigned memory with a one-event minimum. Complete page comparison: $0.025 for each successfully completed page comparison. Completed healthy checks include zero matches or no changes. Rejected/incomplete source units are not charged the custom event; the start event still applies. For standard runs, the Actor pricing page states whether platform usage during the run is included in event prices. After the run, interactions with the dataset can incur standard Apify platform usage charges. Check Apify pricing and your account usage for details. Use maxTotalChargeUsd in the run options to bound your expense. The Actor stops before starting a unit that does not fit the remaining event budget. Results are saved before a custom charge. Uncertain charge/dataset submissions are not retried, preventing duplicate submissions; inspect OUTPUT and chargedEventCounts when a response is uncertain.

### Limits and operation

Each run is bounded by the documented input limits and 180-second default timeout. Memory is capped at 256 MB. This is an evidence utility; review results before acting. Original INPUT and run outputs remain in your Apify account under its retention settings. Remove customer data according to your own policy; no external analytics or customer-data forwarding is implemented. Built-in price and compute assumptions are hypotheses until actual customer usage is observed.

Operator pause/recovery: build a version with PORTFOLIO_STOP=1 and switch latest to that build; a stopped run returns diagnostics and no custom outcome charge. For recovery, rebuild with PORTFOLIO_STOP=0, verify a private validation tag, then switch latest. Editing an environment variable alone does not modify an existing build.

### Sources and licenses

- https://www.gov.uk/help/terms-conditions
- https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/

Dependencies: cheerio (MIT), csv-parse (MIT), fast-xml-parser (MIT), robots-parser (MIT).

### Actual owner cloud example

Validated 2026-10-26T02:24:01.043Z. Run 5OvIZiYoarODwXcXj completed with 1 processing units and 1 records. This is an owner test, not a customer sale.

Input:

```json
{
  "monitorKey": "owner-validation-v1"
}
```

Selected actual output records (full JSON/CSV available in your run storage):

```json
[
  {
    "recordType": "page_evidence",
    "pageId": "govuk-terms",
    "status": "completed",
    "changeType": "baseline",
    "sourceUrl": "https://www.gov.uk/help/terms-conditions",
    "inputKind": "authorized_url",
    "contentHash": "b4c52fd8cb86190764fba3d153339e0e96d00485d9ee2cf5724c01c75faf1009",
    "previousHash": null,
    "contentLength": 7642,
    "license": "Open Government Licence v3.0",
    "observedAt": "2026-10-26T02:16:21.528Z",
    "selector": "main/article/body",
    "textEvidence": "Terms and conditions\nThis page and any pages it links to explains GOV.UK’s terms of use. You must agree to these to use GOV.UK.\nWho we are\nGOV.UK is managed by the Government Digital Service (GDS) on behalf of the Crown. GDS is part of the Department for Science, Innovation and Technology (DSIT) and will be referred to as ‘we’ from now on.\nUsing GOV.UK\nYou agree to use GOV.UK only for lawful purposes. You must also use it in a way that does not infringe the rights of, or restrict or inhibit the use and enjoyment of, this site by anyone else.\nWe update GOV.UK all the time. We can change or remove content at any time without notice.\nServices and transactions\nYou can use GOV.UK to access online government services and transactions, for example apply for Universal Credit or register to vote.\nThese can be managed by GDS or another government department or agency.\nSome services have their own terms and conditions which also apply - read these before you use the service.\nLinking to GOV.UK\nWe welcome and encourage other websites to link to GOV.UK.\nYou must contact us for permission if you want to either:\ncharge your website’s users to click on a link to any page on GOV.UK\nsay your website is associated with or endorsed by GOV.UK or another government department or agency\nLinking from GOV.UK\nGOV.UK links to websites that are managed by other government departments and agencies, service providers or other organisations. We do not have any control over the content on these websites.\nWe’re not responsible for:\nthe protection of any information you give to these websites\nany loss or damage that may come from your use of these websites, or any other websites they link to\nYou agree to release us from any claims or disputes that may come from using these websites.\nYou should read all terms and conditions, privacy policies and end user licences that relate to these websites before you use them.\nUsing GOV.UK content\nMost content on GOV.UK is subject to Crown copyright protection and is published under the Open Government Licence (OGL), which also sets out which content is exempt.\nIf any content is not subject to Crown copyright protection or published under the OGL, we’ll usually credit the author or copyright holder.\nYou can reproduce content published on GOV.UK under the OGL as long as you follow the licence’s conditions.\nContact us if you want to reproduce a piece of content but are not sure if it’s covered by Crown copyright or the OGL.\nWe make most of the content on GOV.UK available through feeds for other websites and applications to use. The websites and applications that use our feeds are not our products, and they might use versions of our content that have been edited and stored for later use (‘cached’).\nWe do not give any guarantees, conditions or warranties about the accuracy or completeness of any content used by these products. We’re not liable for any loss or damage that may come from your use of these products.\nThe most up to date version of our content will always be on GOV.UK.\nDisclaimer\nWhile we make every effort to keep GOV.UK up to date, we do not provide any guarantees, conditions or warranties that the information will be:\ncurrent\nsecure\naccurate\ncomplete\nfree from bugs or viruses\nWe do not publish advice on GOV.UK. You should get professional or specialist advice before doing anything on the basis of the content.\nWe’re not liable for any loss or damage that may come from using GOV.UK. This includes:\nany direct, indirect or consequential losses\nany loss or damage caused by civil wrongs (‘tort’, including negligence), breach of contract or otherwise\nthe use of GOV.UK and any websites that are linked to or from it\nthe inability to use GOV.UK and any websites that are linked to or from it\nThis applies if the loss or damage was foreseeable, arose in the normal course of things or you advised us that it might happen.\nThis includes (but is not limited to) the loss of your:\nincome or revenue\nsalary, benefits or other payments\nbu",
    "billable": true
  }
]
```

# Actor input Schema

## `monitorKey` (type: `string`):

Reuse this key for the same customer workflow. Use a new key for an independent baseline.

## `rightsConfirmed` (type: `boolean`):

Confirm authorization to process the supplied or requested data. Built-in fictional demonstrations and identified open-license presets are authorized.

## `pages` (type: `array`):

Up to 5: id, url or html, complete, optional license. Omit for GOV.UK terms open-license preset.

## `selector` (type: `string`):

CSS selector; default main, article, body selection.

## `excludeSelectors` (type: `array`):

Optional selectors removed from the comparison.

## `ignoreLinesContaining` (type: `array`):

Optional literal fragments, without regular expressions.

## `allowEmptyAfter` (type: `boolean`):

Acknowledge intentionally empty page content.

## `allowLargeRemoval` (type: `boolean`):

Acknowledge more than 70% text reduction.

## Actor input object example

```json
{
  "monitorKey": "default",
  "rightsConfirmed": false,
  "allowEmptyAfter": false,
  "allowLargeRemoval": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `csv` (type: `string`):

No description

## `diagnostics` (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 = {
    "monitorKey": "default"
};

// Run the Actor and wait for it to finish
const run = await client.actor("logical_resourcefulnes/authorized-policy-page-change-audit").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 = { "monitorKey": "default" }

# Run the Actor and wait for it to finish
run = client.actor("logical_resourcefulnes/authorized-policy-page-change-audit").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 '{
  "monitorKey": "default"
}' |
apify call logical_resourcefulnes/authorized-policy-page-change-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,logical_resourcefulnes/authorized-policy-page-change-audit"
        }
    }
}
```

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/1N7Cc3KYKeAcm0Eaf/builds/PP7TZOplUq8hfAt4l/openapi.json
