# US HRSA Health Center / Look-Alike Site Status Monitor (`plym-actor-factory/us-hrsa-health-center-site-monitor`) Actor

Watch Health Center Numbers and/or BPHC site keys and emit typed Active/Inactive/type/location-setting events from the official HRSA data.hrsa.gov Health Center Service Delivery and Look-Alike Sites CSV. Not EHBs portal scrape; not unpaid 340B OPAIS; not NPPES/PPEF twin.

- **URL**: https://apify.com/plym-actor-factory/us-hrsa-health-center-site-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 hrsa site status 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

## US HRSA Health Center / Look-Alike Site Portfolio Status Event Monitor

Watch a book of **HRSA Health Center Numbers and/or BPHC site keys** and emit typed **Active / Inactive-or-removed / site-type / location-setting** events when the official **data.hrsa.gov Health Center Service Delivery and Look-Alike Sites CSV** changes — not another NPPES lead dump, not a CMS PPEF Medicare enrollment twin, not an EHBs authenticated portal scrape, and **not** unpaid 340B OPAIS.

### What this Actor does

1. Takes your watchlist (`siteKeys` / `bphcNumbers` and/or `healthCenterNumbers`).
2. In **live** mode, downloads the official HRSA Service Delivery / Look-Alike Sites CSV once.
3. Expands Health Center Numbers to all sites under each number; diffs BPHC site keys against a durable Key-Value Store checkpoint.
4. Pushes **only** material status/type events for sites on your book (PPE), plus one non-billable `RUN_STATUS` health row.

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

### Coverage honesty (read this)

| In scope | Out of scope |
|----------|----------------|
| Official **HRSA data.hrsa.gov** Health Center Service Delivery and Look-Alike Sites CSV | EHBs authenticated operator portal scrape |
| FQHC **and** Look-Alike published sites | Unpaid **340B OPAIS** covered-entity scrape (different job) |
| Typed events for watched Health Center Numbers / BPHC site keys only | Nationwide “download every site and bill rows” dump SKU |
| `Site Status Description`, location type/setting, operator fields on the public extract | Full private EHBs case-file / Form 5B workflow state |
| HRSA publish cadence (daily per catalog claims) | Intra-day EHBs UI alerts |
| Official HRSA HTTP CSV (no key) | NPPES directory dump; CMS PPEF / PECOS Medicare enrollment twin (#27) |

**Limitation:** Public CSV is a **snapshot of published sites**, not the full private EHBs case file — absence/terminated in extract ≠ every possible internal HRSA workflow state. Cite HRSA + extract date (`as_of` / `fetchedAt`).

### Input

| Field | Notes |
|-------|--------|
| `siteKeys` | BPHC Assigned Numbers (unique site keys), e.g. `BPS-H80-000108`. |
| `bphcNumbers` | Alias for `siteKeys`. |
| `healthCenterNumbers` | Org-level Health Center Numbers (e.g. `H80CS00046`); live mode expands to all sites under each. |
| `signalGroups` | `status`, `site_type`, `location_setting`. Default: all three. |
| `sourceMode` | `fixture` (default — Store health) or `live` (HRSA CSV; **no API key**). |
| `emitFixtureDemoEvents` | Default **false**. Only enable for local demos; Store auto-tests must stay false. |
| `csvUrl` | Optional pin to a specific HRSA CSV URL. |

### Output events (billable)

| `event_type` | When |
|--------------|------|
| `HRSA_SITE_ACTIVE` | Site becomes Active / reappears on the extract after missing |
| `HRSA_SITE_INACTIVE_OR_REMOVED` | Site leaves Active or disappears from the public CSV snapshot |
| `HRSA_SITE_TYPE_CHANGED` | Location type / Health Center type description / operator flips |
| `HRSA_LOCATION_SETTING_CHANGED` | Location setting description flips |

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

### Pricing (PPE)

| Event | Price |
|-------|-------|
| `hrsa-site-status-event-delivered` | **$0.02** ($20 / 1k) |
| `apify-actor-start` | **$0.00005** |

You pay when a site **on your watchlist** has a material Active/Inactive/type/location-setting 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 HRSA public CSV — **no key required**.

### Legal

HRSA data.hrsa.gov public dataset for reuse. Product default = Health Center Number + BPHC site key + site identifiers + status/type/location/operator fields (facility/org data; minimise unnecessary phone if customer supplies ID-only book). Cite HRSA + extract date.

### Not this product

- NPPES / National Provider Identifier directory dumps (different job).
- CMS PPEF / PECOS Medicare Fee-For-Service enrollment monitors (Phase 3 #27 twin — wrong job).
- EHBs authenticated Form 5B / scope UI scrape.
- Unpaid 340B OPAIS covered-entity scrape (prior BACKLOG; different job).
- One-shot findahealthcenter city search.
- Nationwide CSV row dump billed as product events.

### Example input (live baseline)

```json
{
  "siteKeys": ["BPS-H80-000108", "BPS-H80-000209"],
  "healthCenterNumbers": ["H80CS00046"],
  "signalGroups": ["status", "site_type", "location_setting"],
  "sourceMode": "live",
  "emitFixtureDemoEvents": false,
  "resumeFromCheckpoint": true,
  "maxRunSeconds": 120,
  "maxEvents": 500
}
```

### Example input (Store fixture health)

```json
{
  "siteKeys": ["BPS-H80-000108"],
  "sourceMode": "fixture",
  "emitFixtureDemoEvents": false
}
```

# Actor input Schema

## `siteKeys` (type: `array`):

Unique HRSA site keys = BPHC Assigned Numbers (e.g. BPS-H80-000108). Preferred site-level watchlist. Only these sites (plus sites under healthCenterNumbers) are evaluated. Invalid entries are skipped with no charge. Not a nationwide dump.

## `bphcNumbers` (type: `array`):

Optional alias for siteKeys — same BPHC Assigned Number values.

## `healthCenterNumbers` (type: `array`):

Org-level Health Center Numbers (e.g. H80CS00046). In live mode, expands to all sites under each number on the official HRSA CSV. Combine with siteKeys as needed.

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

Which change groups to evaluate: status (Active / Inactive-or-removed), site\_type (location type / HC type / operator), location\_setting. Default: all three.

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

Wall-clock budget for the run (CSV download + site 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 site 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 HRSA data.hrsa.gov CSV (no API key). Not EHBs portal; not 340B OPAIS; not NPPES/PPEF.

## `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 HRSA events or charge hrsa-site-status-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.

## `csvUrl` (type: `string`):

Optional override for the official HRSA Health Center Service Delivery and Look-Alike Sites CSV URL. Default: data.hrsa.gov DD\_Files path live-verified in Phase 3 v11.

## Actor input object example

```json
{
  "siteKeys": [
    "BPS-H80-000108",
    "BPS-H80-000209"
  ],
  "healthCenterNumbers": [],
  "signalGroups": [
    "status",
    "site_type",
    "location_setting"
  ],
  "maxRunSeconds": 90,
  "maxEvents": 500,
  "resumeFromCheckpoint": true,
  "sourceMode": "fixture",
  "emitFixtureDemoEvents": false
}
```

# Actor output Schema

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

JSON summary: delivered, charged, runStatus, checkpoint, stats, HRSA 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/us-hrsa-health-center-site-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/us-hrsa-health-center-site-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/us-hrsa-health-center-site-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plym-actor-factory/us-hrsa-health-center-site-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/I0kmcrC0ePgOanf1L/builds/mh3i31ZeP7h3pXQDk/openapi.json
