# USDA Organic INTEGRITY Change Monitor (`signalloom/usda-organic-integrity-changes`) Actor

Monthly change feed for the USDA Organic INTEGRITY Database: operations newly certified, suspended, surrendered, revoked or changed, with previous status, certifier, scopes and dates. Business-level data only. Unofficial, not affiliated with or endorsed by the USDA or the National Organic Program.

- **URL**: https://apify.com/signalloom/usda-organic-integrity-changes.md
- **Developed by:** [Signalloom](https://apify.com/signalloom) (community)
- **Categories:** Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 operation changes

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

## USDA Organic INTEGRITY Change Monitor

*Unofficial, not affiliated with or endorsed by the USDA or the National Organic Program.*

A monthly change feed for the **USDA Organic INTEGRITY Database**, the official public list of every USDA-certified organic farm, processor, handler and importer. Each run compares the newest monthly file with the state saved by the previous run and outputs the operations that were:

| changeType | Meaning |
| --- | --- |
| `newly_certified` | New operation in the file with status **Certified** |
| `newly_listed` | New operation in the file with another status (for example Surrendered) |
| `reinstated` | Status moved back to **Certified** |
| `suspended` / `surrendered` / `revoked` | Status moved to that value |
| `status_changed` | Any other status change |
| `certifier_changed` | Operation moved to another certifying agent |
| `scope_changed` | A scope (crops, livestock, wild crops, handling) was added, dropped or changed status |
| `renamed` | Operation name changed (only when at least one of the two names can be published) |
| `removed_from_listing` | Operation disappeared from the file (USDA records no exit status) |

An operation that changes in several ways in the same month produces **one** row: `changeType` is the most important change and `changes` lists all of them.

### Who is it for?

- **Organic buyers, brands and retailers** who need to know when a supplier is suspended, surrendered or revoked, or when its certifier or scope changes
- **Sales and lead teams** targeting newly certified organic farms, processors and handlers
- **Certifiers, compliance and supply-chain teams** monitoring status changes by state or certifier
- **Developers and AI agents** who need a clean, business-level monthly change feed from the official data

### Example output

Real change row from a test run (Vermont, `firstRunCompareRelease` comparing the 2026-11-01 file with 2026-10-01). Other `changeType` values are `newly_listed`, `reinstated`, `suspended`, `surrendered`, `revoked`, `status_changed`, `certifier_changed`, `scope_changed`, `renamed` and `removed_from_listing`. In `snapshot` mode the same fields are output with `changeType: "snapshot"`.

```json
{
  "monitorId": "default",
  "changeType": "newly_certified",
  "changes": [
    "newly_certified"
  ],
  "operationId": "4210015004",
  "operationName": "Vermont Livestock Slaughter and Processing",
  "nameWithheld": false,
  "city": "Ferrisburg",
  "state": "Vermont",
  "country": "United States of America (the)",
  "certifier": "Vermont Organic Farmers, LLC",
  "scopes": [
    {
      "scope": "HANDLING",
      "status": "Certified",
      "statusEffectiveDate": "2026-10-16"
    }
  ],
  "status": "Certified",
  "statusEffectiveDate": "2026-10-16",
  "anniversaryDate": "2027-06-15",
  "website": "http://www.vermontmeat.com",
  "updatedByCertifier": "2026-10-20",
  "previousStatus": null,
  "previousStatusEffectiveDate": null,
  "previousCertifier": null,
  "previousScopes": null,
  "previousOperationName": null,
  "release": "2026-11-01",
  "previousRelease": "2026-10-01",
  "detectedAt": "2026-11-16T02:27:46.882Z",
  "sourceFile": "https://organic.ams.usda.gov/Integrity/MonthlyReports/INTEGRITY_Data_20261101.xlsx"
}
```

### First run = baseline (important)

Change detection needs something to compare with. The **first run for a `monitorId` is a baseline**: it reads the newest file, stores every operation in the named state store (`usda-organic-integrity-state`, key `STATE_<monitorId>`) and **outputs nothing**. Real changes appear from the next run after USDA publishes a new monthly file. Options for the first run:

- `emitBaselineRows` outputs every matching operation as a `baseline` row.
- `firstRunCompareRelease` (for example `2026-10-01`) compares the newest file with that older month so you get real changes immediately.
- `outputMode: snapshot` lists the current operations that match your filters and never touches the state.

USDA publishes **one file per month** (on the 1st). Running more often is harmless: the Actor probes the file with a 1-byte request, sees the release is the one already stored and finishes with `noNewRelease: true` without downloading anything. A monthly or weekly schedule is plenty.

State holds every operation (not just your filtered ones), so changing the filters later never forces a new baseline. The state also records the version of the name rules: after an update that changes the name rules, the next run for a `monitorId` rebuilds the baseline (no change rows), so names stored by an older version are never compared or shown, and the name rule is applied again to every previous name and removed row before output. Use a different `monitorId` for each independent monitor.

### Input

| Field | What it does |
| --- | --- |
| `monitorId` | Name of the monitor; keeps its own saved state |
| `states` | US states (codes or names). Empty = all US states |
| `includeForeign` | With no state chosen, also include operations outside the US (about half the database) |
| `scopes` | Keep operations that hold at least one of crops / livestock / wildCrops / handling |
| `certifier` | Certifier name contains this text |
| `changeTypes` | Which change types to output (default all) |
| `release` | `latest` or a first-of-month date |
| `outputMode`, `emitBaselineRows`, `firstRunCompareRelease`, `commitState`, `stateStoreName`, `maxItems`, `requestDelayMs` | See the input form. The prefilled example uses `outputMode: snapshot` for Vermont so a first click returns data (the default `changes` mode stores a baseline and outputs nothing on the first run). |
| `redactNames` | Deprecated and ignored: output is always business-only. |

### Output

One row per changed operation: `operationId` (NOP ID), `operationName`, `city`, `state`, `country`, `certifier`, `scopes` (with status and effective date per scope), `status`, `statusEffectiveDate`, `anniversaryDate`, `website`, `updatedByCertifier`, `changeType`, `changes`, `previousStatus`, `previousStatusEffectiveDate`, `previousCertifier`, `previousScopes`, `previousOperationName`, `release`, `previousRelease`, `sourceFile`. Dataset views: Changes, Status alerts, Newly certified, All fields.

The default key-value store holds `RUN_SUMMARY` (release read, previous release, `isBaseline`, `noNewRelease`, diff counts, counts by change type, filters, memory and time).

### Sources, terms and attribution

- **Source:** the official monthly Excel files that USDA publishes on the Organic INTEGRITY Data History page ([organic.ams.usda.gov/integrity/Reports/DataHistory](https://organic.ams.usda.gov/integrity/Reports/DataHistory)), sheet "Operation Level" (`INTEGRITY_Data_YYYYMM01.xlsx`, about 75 MB). The Actor makes about three requests per run, waits at least 1 s between requests, and checks robots.txt before every host. The site's robots.txt has no restrictions.
- **API alternative:** the INTEGRITY REST API ([Developer help](https://organic.ams.usda.gov/integrity/Developer/APIHelp)) needs a free api.data.gov key. This Actor does **not** use it and needs no key.
- **Terms:** the data is a U.S. federal government public listing. No license restriction was found on the Data History page or in the files; the Actor still carries the disclaimer that the live Organic INTEGRITY Database and the operation's certifier are the sources to consult for current status. Attribution line: *Data: USDA Agricultural Marketing Service, National Organic Program, Organic INTEGRITY Database (public data).*
- **Privacy:** business-only output is always on (the old `redactNames` option is ignored). Contact people (first and last name), phone numbers and email addresses are never read into the output. An operation name that looks like a private person's name (sole proprietors, joint names such as "Dan & Merri Paquin" even when a Farm, Orchard or LLC word follows, names of four or more personal-name words, or names with a label such as "Producer: ...") is withheld (`nameWithheld: true`); the NOP operation ID is kept. "Person DBA Trade Name" is reduced to the trade name. A person's name that is part of a business name (for example "Smith Family Farm") is kept. Rows still carry the operation's city and state (the public listing's physical address, not a street address).

### Pricing

This Actor is designed for pay-per-event pricing. The events are shown on the Pricing tab:

- **actor-start**: once per run
- **operation-change**: each output row (change, snapshot or baseline row)

A run with no new monthly file, or no changes that match your filters, is charged only the start event. Set **Maximum cost per run** to cap spend: the Actor stops cleanly at the limit and keeps everything delivered so far. Changes that were held back by the limit are not lost: they stay pending and the next run reports them.

Measured on the Apify platform on 2026-11-15 (1024 MB): a Vermont snapshot of 25 rows took 37 seconds and about $0.0004 of platform usage; a repeat run on the same monthly file finished in 3 seconds without downloading anything.

### FAQ

**Why did my first run return nothing?**
The first run for a `monitorId` is a baseline: it stores every operation and outputs no rows. Use `outputMode: snapshot`, `emitBaselineRows` or `firstRunCompareRelease` to get rows right away.

**How often should I run it?**
USDA publishes one file per month, on the 1st. A monthly or weekly schedule is plenty. A run on a file that was already processed finishes in seconds and is charged only the start event.

**Why is an operation name missing?**
It looked like a private person's name, so it was withheld (`nameWithheld: true`). The NOP operation ID stays, so you can still identify the record on the USDA site.

**Does it include contact people, phones or emails?**
No. They are never read into the output.

**Is a removed operation the same as a revoked one?**
No. `removed_from_listing` only means the operation vanished from the file (USDA records no exit status). Revoked and surrendered operations appear with those statuses.

### Limitations

- Monthly snapshots: a status that changes and changes back inside one month is not seen, and the effective date can lie earlier than the month it first appears.
- The file has no exit status, so `removed_from_listing` only says the operation vanished.
- The name rule is a heuristic: some business names are withheld by mistake and a few personal names may pass. In the Vermont, New York and Pennsylvania files checked, roughly a third of operation names are withheld (many USDA operations are listed under a person's name). "Person - Farm Name" entries keep only the farm name, and a person's name inside a farm or business name (for example "Shawn Stroh Farm") is published as listed.
- Item-level certified products (the "Item Level" sheet) are not read.
- Only the public statuses USDA lists (Certified, Suspended, Surrendered, Revoked).
- Memory: about 0.5 GB peak for one file; `firstRunCompareRelease` reads two files one after the other.

### Tests

`npm test` runs the unit tests (parser, name rule, filters, diff, run flow with baseline, no-new-release and an edited-state change path).

# Actor input Schema

## `monitorId` (type: `string`):

Name of this monitor. Each monitor ID keeps its own saved state, so use a different ID for each set of filters you want to track separately. Letters, digits, - \_ . only.

## `states` (type: `array`):

Only operations whose physical address is in these US states or territories (2-letter codes or full names, for example NY or New York). Empty = every US state.

## `includeForeign` (type: `boolean`):

When no state is chosen, also output operations located in other countries (about half of the database). Ignored when states are set.

## `scopes` (type: `array`):

Keep operations that hold at least one of these scopes (crops, livestock, wild crops, handling).

## `certifier` (type: `string`):

Keep only operations whose certifier name contains this text (case-insensitive), for example 'CCOF' or 'Oregon Tilth'. Empty = any certifier.

## `changeTypes` (type: `array`):

Which kinds of change to output.

## `release` (type: `string`):

'latest' reads the newest monthly file that exists. Or give the first day of a month, for example 2026-11-01.

## `outputMode` (type: `string`):

'changes' compares with the saved state. 'snapshot' lists the current operations that match the filters and does not touch the state.

## `emitBaselineRows` (type: `boolean`):

On the first run, also output every matching operation as a 'baseline' row. Off by default: a baseline run outputs nothing.

## `firstRunCompareRelease` (type: `string`):

Optional, first run only: instead of a silent baseline, compare the newest file with this older monthly file (for example 2026-10-01) and output the real changes right away.

## `commitState` (type: `boolean`):

Save the state for the next run. Turn off for a trial run that must not move the baseline.

## `stateStoreName` (type: `string`):

Name of the key-value store that keeps the change-tracking state (key STATE\_<monitorId>).

## `redactNames` (type: `boolean`):

Deprecated and ignored: output is always business-only. An operation name that looks like a private person's name (sole proprietors) is withheld (nameWithheld: true) and the operation ID is still output.

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

Stop after this many output rows. 0 = no limit.

## `requestDelayMs` (type: `integer`):

At least 1000 ms between requests to the USDA site. The Actor makes only a handful of requests per run.

## Actor input object example

```json
{
  "monitorId": "default",
  "states": [
    "VT"
  ],
  "includeForeign": false,
  "scopes": [
    "crops",
    "livestock",
    "wildCrops",
    "handling"
  ],
  "certifier": "",
  "changeTypes": [
    "newly_certified",
    "newly_listed",
    "reinstated",
    "suspended",
    "surrendered",
    "revoked",
    "status_changed",
    "certifier_changed",
    "scope_changed",
    "renamed",
    "removed_from_listing"
  ],
  "release": "latest",
  "outputMode": "snapshot",
  "emitBaselineRows": false,
  "firstRunCompareRelease": "",
  "commitState": true,
  "stateStoreName": "usda-organic-integrity-state",
  "redactNames": true,
  "maxItems": 25,
  "requestDelayMs": 1000
}
```

# Actor output Schema

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

Dataset with the change rows

## `summary` (type: `string`):

Release read, baseline flag, diff counts, filters

# 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 = {
    "monitorId": "default",
    "states": [
        "VT"
    ],
    "outputMode": "snapshot",
    "maxItems": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("signalloom/usda-organic-integrity-changes").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 = {
    "monitorId": "default",
    "states": ["VT"],
    "outputMode": "snapshot",
    "maxItems": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("signalloom/usda-organic-integrity-changes").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 '{
  "monitorId": "default",
  "states": [
    "VT"
  ],
  "outputMode": "snapshot",
  "maxItems": 25
}' |
apify call signalloom/usda-organic-integrity-changes --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,signalloom/usda-organic-integrity-changes"
        }
    }
}
```

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/zKGbgRSDpqRINUInq/builds/X274CMdJ0Nk8392me/openapi.json
