# Government-Filing Delta Monitor — State Lobbying Disclosures (`apex-nexus/gov-filing-delta-monitor`) Actor

- **URL**: https://apify.com/apex-nexus/gov-filing-delta-monitor.md
- **Developed by:** [Valunex](https://apify.com/apex-nexus) (community)
- **Categories:** Business
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## Government-Filing Delta Monitor — State Lobbying Disclosures

Watches public government filings (state lobbyist disclosures via Socrata SODA
open-data APIs) on a user-maintained watchlist and emits one dataset item per
newly detected or amended filing. Repeat runs emit only newly detected filings
via per-source checkpoints in the Actor key-value store — **free when nothing
changes**, pay only on signal.

### Who it is for

Public-affairs firms, compliance officers, government-relations teams and
watchdog NGOs that need to track new or amended state lobbying-disclosure
filings on a recurring schedule without re-polling open-data portals manually.
Different buyer segment from the SEC insider-trading / institutional-holdings
monitors — this is state/open-government data, not federal securities filings.

### What it monitors

A watchlist of public Socrata SODA endpoints, e.g. the Washington State PDC
lobbyist disclosures at `https://data.wa.gov/resource/nuwx-ay5h.json`. Each
source is polled independently; per-source checkpoints remember the last
checked high-water date and the filing IDs already emitted, so:

- First run: returns filings within a bounded lookback window (default 30 days).
- Repeat runs: return only newly detected or amended filings (new Socrata row
  IDs), including amendments that surface under a new ID.
- Nothing changed since last run: zero dataset items — "free when nothing
  changes."

### What makes it different

Existing lobbyist-disclosure scrapers (e.g. `titan_coder/wa-lobbyist-reporting-delta`
at $10.00 per 1,000 new/amended filings, "free when nothing changes";
`scrapemint/lobbying-disclosure-scraper`) are on-demand fetchers: you run them,
get a batch, and run again when you want an update. This Actor keeps a watchlist
and remembers what it already reported, so it is a true recurring delta monitor
for public affairs / compliance buyers.

### Data source

Public Socrata SODA open-government APIs only — no credentials, no proxies, no
scraping of rate-limited or anti-bot pages, no commercial inference (no LLMs)
inside the product.

Default source (Washington lobbyist disclosures):

- https://data.wa.gov/resource/nuwx-ay5h.json

Each watchlist source needs a public Socrata SODA `.json` endpoint and is
queried with a deterministic `GET` + `$where` / `$order` / `$limit` filter
against a per-source date column (default `receipt_date`) and ID column
(default `id`).

### Pricing (pay-per-event framing, Apify Store)

Per the proven incumbent price point, this Actor frames pricing at:

- **$0.01 per detected/amended filing** (each dataset item), i.e. $10.00 per
  1,000 new or amended filings.
- Actor start / nothing-changed runs: free (no dataset items emitted).

Apify retains a 20% commission on revenue; payouts are monthly and require
completed identity verification (KYC). This listing is free until the owner
enables monetization and completes payout/KYC — see knowledge/decisions.md
(POLICY #6, owner decision 2026-10-30). Pricing shown here is a README framing
only; no monetization is flipped in this release candidate.

### Input

See `actor/.actor/input_schema.json`. Required: `sources` (non-empty array of
Socrata SODA endpoints).

- `sources[].name`: unique handle used as the checkpoint key (e.g. `"wa-lobbyist"`).
- `sources[].url`: public Socrata SODA JSON endpoint (e.g.
  `https://data.wa.gov/resource/nuwx-ay5h.json`).
- `sources[].lookbackDays` (1-90, default 30): first-run lookback window.
- `sources[].dateColumn` (default `"receipt_date"`): Socrata column used to
  order/filter filings by recency.
- `sources[].idColumn` (default `"id"`): Socrata column that uniquely
  identifies each filing (dedupe key).
- `maxItems` (1-200, default 50): cap on items emitted per source per run.

Example (the default input — returns WA lobbyist filings from the last 30 days):

```json
{
  "sources": [
    {
      "name": "wa-lobbyist",
      "url": "https://data.wa.gov/resource/nuwx-ay5h.json",
      "lookbackDays": 30
    }
  ],
  "maxItems": 50
}
```

### Output

One dataset item per newly detected or amended filing. Every field is present;
fields that could not be parsed are `null` — the Actor never guesses.

```json
{
  "filingId": "2073682",
  "filingDate": "2026-10-31",
  "filerName": "ROB MAKIN CONSULTING*",
  "filerType": "Firm",
  "clientName": null,
  "subject": null,
  "amount": null,
  "documentUrl": "https://my.pdc.wa.gov/lobbyist/public/-/#/public/l2-report/2073682",
  "source": "wa-lobbyist",
  "newSinceLastRun": true,
  "amendedByReport": null,
  "year": "2026",
  "reportFrom": "2026-10-01",
  "reportThrough": "2026-10-31"
}
```

### Limits

- Max 200 items per source per run (`maxItems`).
- First-run lookback capped at 90 days; repeat runs are bounded by the
  per-source checkpoint date.
- Dedupe is by Socrata row ID within a capped seen-IDs window (5,000 IDs per
  source). Resetting the Actor key-value store re-emits filings within the
  lookback window.
- One erroring source never aborts the whole run.

### Verification

- `pytest actor/tests` — deterministic unit tests (no network): input
  normalization, row-to-item mapping, first-run vs. repeat-run checkpoint
  behavior, dedupe, and max-items cap.
- `ruff check actor/` — must be clean (0 errors).
- Default-input smoke run against the live Socrata endpoint returns more than
  0 items in under 5 minutes (publish precondition).

# Actor input Schema

## `sources` (type: `array`):

Public Socrata SODA API endpoints to monitor. One checkpoint is kept per source name, so repeat runs only emit filings newer than the last checked state.

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

Cap the number of new/amended filings emitted per source in a single run.

## Actor input object example

```json
{
  "maxItems": 50
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all detected or amended government filings from the latest run

# 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 = {
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("apex-nexus/gov-filing-delta-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 = { "maxItems": 50 }

# Run the Actor and wait for it to finish
run = client.actor("apex-nexus/gov-filing-delta-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 '{
  "maxItems": 50
}' |
apify call apex-nexus/gov-filing-delta-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apex-nexus/gov-filing-delta-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/Z36XzxSHi5ibstLfn/builds/UQlVOe6kXZdVnLcVq/openapi.json
