# Scotland Charity Register Change Signals (`starshaped_bullsnake/scotland-charity-register-change-signals`) Actor

- **URL**: https://apify.com/starshaped\_bullsnake/scotland-charity-register-change-signals.md
- **Developed by:** [Starshape Tools](https://apify.com/starshaped_bullsnake) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 charity register change signals

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

## Scotland Charity Register Change Signals

This is a change-intelligence Actor, not the Scottish Charity Register or a current-state directory scraper.

It compares successive daily official OSCR bulk downloads and emits compact organisation-level change signals. It does not expose contact records, reproduce the Register, or make compliance, misconduct, financial-health, insolvency, or marketing-target judgments.

### Source and legal boundary

Live mode uses only OSCR's official public bulk downloads: the current [Scottish Charity Register](https://www.oscr.org.uk/download/charity-register) and [former charities](https://www.oscr.org.uk/download/charity-former-register). Both are published daily. The Actor does not use the key-controlled OSCR API.

Data is sourced from OSCR. This Actor is not the Scottish Charity Register, must not be used as a replacement for it, and is not endorsed by OSCR. Outputs **must not be used for direct marketing**. Do not use this service for lead generation, outreach lists, marketing targets, or prospecting.

© Crown Copyright and database right 2026. Contains information from the Scottish Charity Register supplied by the Office of the Scottish Charity Regulator and licensed under the Open Government Licence v.3.0.

### Signals

- `NEW_CHARITY_REGISTERED`: a charity number newly appears in the current active-side download. It means newly appearing on the Register, not necessarily a newly created organisation.
- `CHARITY_REMOVED`: an entity previously on the active side now has explicit evidence in the former download and is absent from active. A disappearance without former evidence is an anomaly and aborts the run.
- `CHARITY_REINSTATED`: an entity moves from the former side to the active side; it is not reported as new.
- `CHARITY_NAME_CHANGED`, `CHARITY_STATUS_CHANGED`, `CONSTITUTIONAL_FORM_CHANGED`, and `PURPOSE_CHANGED` report source-literal organisation changes. Purpose comparison is normalized, de-duplicated, and order-independent.
- `ANNUAL_RETURN_RECEIVED` requires the stable `Mailing cycle + Year End` filing identity to move forward and a receipt date to be present. A receipt-date correction within the same period does not repeat the signal.
- `INCOME_CHANGED` and `EXPENDITURE_CHANGED` are observational changes in the latest return values. They are not assessments of financial health or sustainability. Null transitions are suppressed and zero is handled without an invalid percentage.
- `REGULATORY_TYPE_CHANGED`, `GEOGRAPHICAL_SPREAD_CHANGED`, and `MAIN_OPERATING_LOCATION_CHANGED` preserve source-literal changes.

Each Dataset item follows the portfolio contract: `signalType`, `entityId`, `entityName`, `detectedAt`, `source`, `sourceUrl`, `changedFields`, `before`, and `after`, plus only relevant domain fields such as `charityNumber`, purpose additions/removals, financial values/deltas, `ceasedDate`, and `removalReason`. Raw rows are never put into `before` or `after`.

### State and safety

The stable identity is the trimmed, upper-cased `Charity Number`, retained as the `SC` plus six digits string. The canonical snapshot stores only allowed organisation-level fields. Trustee names/details, principal contact data, principal-office or trustee addresses, email, phone, account-document contents, objectives, notes, and other individual-level data are excluded during projection and never enter the snapshot or Dataset.

The first successful live run creates a full canonical baseline, emits zero Dataset items, and returns `BASELINE_INITIALIZED`. A no-change comparison succeeds with zero signals. `maxItems` caps only Dataset output; the full validated snapshot is always committed.

The pipeline validates HTTPS host, HTTP status, MIME, ZIP magic, archive shape, required columns, UTF-8 CSV parsing, source generation-date alignment, minimum counts and sizes, stable keys, duplicates, overlaps, and relative count collapse. It records source URLs, byte counts, hashes, available `Last-Modified`/`ETag`, raw row counts, and internal generation dates. The current OSCR responses may omit `Last-Modified` and `ETag`; in that case their values remain null rather than being invented. Fetch time is not represented as an extract date.

Active and former generation dates must match. On a mismatch, unexpected disappearance, malformed source, write failure, or summary failure, the old snapshot is retained. Snapshot commit is the final operation. `Removed` is sourced from the former list and is not double-emitted as a generic status change.

OSCR notes that `02/06/2012` may be a default ceased date for charities removed before ceased dates were recorded. The Actor preserves `ceasedDate` as source-literal information but never treats every historical value as the exact removal date. New removal detection relies primarily on the dataset transition plus current former-side presence.

### Input and sample mode

`mode` defaults to `live` while the Console prefill and example run use `sample`. Optional filters cover signal types and charity numbers, finance thresholds, baseline-only operation, and Dataset `maxItems` (default 100; prefill 30).

Sample mode is deterministic and isolated: it makes no HTTP request, opens no production named KVS, writes no production snapshot, uses the production normalization/diff/filter path, emits a non-empty Dataset covering the principal signal types, and returns `snapshotUpdated=false`.

# Actor input Schema

## `mode` (type: `string`):

Live official comparison or isolated deterministic sample.

## `signalTypes` (type: `array`):

Optional signal-type filter.

## `charityNumbers` (type: `array`):

Optional SC-number filter.

## `baselineOnly` (type: `boolean`):

Refresh the complete baseline without emitting signals.

## `minIncomeChangeAbsolute` (type: `number`):

Suppress smaller absolute income changes.

## `minIncomeChangePercent` (type: `number`):

Suppress smaller percentage income changes.

## `minExpenditureChangeAbsolute` (type: `number`):

Suppress smaller absolute expenditure changes.

## `minExpenditureChangePercent` (type: `number`):

Suppress smaller percentage expenditure changes.

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

Caps Dataset output only; never truncates the snapshot.

## Actor input object example

```json
{
  "mode": "sample",
  "baselineOnly": false,
  "maxItems": 30
}
```

# Actor output Schema

## `OUTPUT` (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 = {
    "mode": "sample",
    "maxItems": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("starshaped_bullsnake/scotland-charity-register-change-signals").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 = {
    "mode": "sample",
    "maxItems": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("starshaped_bullsnake/scotland-charity-register-change-signals").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 '{
  "mode": "sample",
  "maxItems": 30
}' |
apify call starshaped_bullsnake/scotland-charity-register-change-signals --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,starshaped_bullsnake/scotland-charity-register-change-signals"
        }
    }
}
```

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/CIgnyS03Ncj0LgsQB/builds/oFIKx8YlaDe8ysmfg/openapi.json
