# Federal Register Monitor: New Rules & Notices to JSON (`devsolal/federal-register-monitor`) Actor

- **URL**: https://apify.com/devsolal/federal-register-monitor.md
- **Developed by:** [David-Solal Chalmeau](https://apify.com/devsolal) (community)
- **Categories:** Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Federal Register Monitor

Watch the US Federal Register — the official daily journal of federal rules, proposed rules, notices and
presidential documents — and get one flat, ready-to-use row per published document, with the deadline fields that
actually drive decisions (`commentsCloseOn`, `effectiveOn`).

It reads the official Federal Register API (`https://www.federalregister.gov/api/v1/documents.json`): public,
keyless, no login, no proxies. You give it keywords and/or agency slugs and a publication window; it gives you
documents.

### What you get

One dataset row per delivered document:

- `documentNumber`, `documentTitle`, `documentType` (display), `typeCode` (`RULE` / `PRORULE` / `NOTICE` / `PRESDOCU`), `subtype`
- `abstract`, `excerpt` (the API's match snippet, HTML stripped and bounded), `action`, `dates`
- `publicationDate`, `signingDate`, `effectiveOn`, `commentsCloseOn`
- `citation` (e.g. `91 FR 67565`), `volume`, `startPage`, `endPage`, `pageLength`
- `agencies` (`slug`, `name`, `id`, `parentId`), `agencyNames`, `agencySlugs`
- `docketIds`, `regulationIdNumbers`, `topics`, `significant` (EO 12866 flag), `executiveOrderNumber`,
  `presidentialDocumentNumber`, `proclamationNumber`, `correctionOf`
- `htmlUrl`, `pdfUrl` (govinfo), `rawTextUrl`, `bodyHtmlUrl`, `jsonUrl` — the document itself is one fetch away
- `query`, `queryType` (`keyword` / `agency`), `matchedKeywords` — which watch produced the row
- `totalMatches`, `truncated` — how many documents the query really matched, and whether you are seeing a slice
- `sources`, `issues`, `fetchedAt` — provenance and a machine-readable account of anything that was not available

### Input

```json
{
  "keywords": ["ozone", "MOVES6"],
  "agencies": ["environmental-protection-agency"],
  "documentTypes": ["RULE", "PRORULE"],
  "daysBack": 30,
  "maxResultsPerKeyword": 5,
  "significantOnly": false
}
```

- `keywords` — full-text search terms, max 40. Each term is one query; duplicates (case/space variants) are collapsed.
- `agencies` — Federal Register agency slugs, max 20 (e.g. `food-and-drug-administration`). With keywords they
  narrow each search; **without** keywords each agency is watched on its own. Multiple agencies are OR'd by the API.
- `documentTypes` — any of `RULE`, `PRORULE`, `NOTICE`, `PRESDOCU`. Unknown codes are rejected up front (see limits).
- `daysBack` (default 7, max 365), or explicit `fromDate` / `toDate` in `YYYY-MM-DD` which override it.
- `maxResultsPerKeyword` (default 20, max 100) — newest documents kept per watch. The API ignores (coerces) small
  `per_page` values, so the Actor applies this bound itself: you are never delivered or charged for more documents
  per watch than you asked for.
- `significantOnly` — only documents flagged significant under EO 12866.

Values above a hard cap (40 keywords, 20 agencies, 365 days, 100 results) are **clamped, never silently**: the run's
stats carry `truncatedInputs` and a free `INPUT_CLAMPED` row names each field, the value you asked for and the value
actually used.

### Example output

Real, trimmed row from a live run (`{"keywords": ["ozone"], "daysBack": 7}`):

```json
{
  "documentNumber": "2026-21843",
  "documentTitle": "Official Release of the MOVES6 Motor Vehicle Emissions Model for SIPs and Transportation Conformity",
  "documentType": "Notice",
  "typeCode": "NOTICE",
  "publicationDate": "2026-10-27",
  "effectiveOn": "2026-10-27",
  "commentsCloseOn": null,
  "citation": "91 FR 67565",
  "volume": 91,
  "startPage": 67565,
  "endPage": 67570,
  "pageLength": 6,
  "agencies": [{ "slug": "environmental-protection-agency", "name": "Environmental Protection Agency", "id": 145, "parentId": null }],
  "agencySlugs": ["environmental-protection-agency"],
  "docketIds": ["FRL-13436-01-OAR"],
  "regulationIdNumbers": [],
  "topics": [],
  "significant": null,
  "htmlUrl": "https://www.federalregister.gov/documents/2026/10/27/2026-21843/official-release-of-the-moves6-motor-vehicle-emissions-model-for-sips-and-transportation-conformity",
  "pdfUrl": "https://www.govinfo.gov/content/pkg/FR-2026-10-27/pdf/2026-21843.pdf",
  "rawTextUrl": "https://www.federalregister.gov/documents/full_text/text/2026/10/27/2026-21843.txt",
  "query": "ozone",
  "queryType": "keyword",
  "matchedKeywords": ["ozone"],
  "totalMatches": 1,
  "truncated": false,
  "sources": ["federal-register-api:documents.json"],
  "issues": [],
  "fetchedAt": "2026-10-28T14:16:55.402Z"
}
```

A watch that matched nothing, a rejected query, an upstream failure or a page of documents that cannot be turned into
rows is still delivered — as a row with `error` (`NO_MATCH`, `QUERY_REJECTED`, `UPSTREAM_FAILED`,
`REQUEST_BUDGET_EXHAUSTED`, `NO_USABLE_DOCUMENTS`) — and is **not charged**. Such a row keeps the watch term and the
date window it covered, and carries `issues` describing the failure. A clamped input produces one `INPUT_CLAMPED` row
(no watch term: it describes the input itself), also free. A document that survives the usable filter but still cannot
be mapped into a row becomes a free `CHECK_FAILED` row: `input` names the document it failed on (or the watch, when the
document has no usable `documentNumber`) and `message` carries the reason.

Free rows are not documents and are **not covered by the dataset schema**. They carry `error` and `message`
(`input` too, on a `CHECK_FAILED` row) — the free-row-only keys, `FREE_ROW_FIELDS` in `src/lib/map.js` — plus the watch
fields (`query`, `queryType`, `publicationDateFrom`, `publicationDateTo`, `issues`, `fetchedAt`).
`dataset_schema.json` declares only the document fields: Apify validates every declared field against every pushed row,
so a free-row-only key must never be declared there.

### Pricing

Pay per event: **`document-returned` at $0.0018 per delivered document** (plus a $0.00005 Actor start). One charge
per document that reaches your dataset, no matter how many of your watch terms matched it. Watches that return
nothing, upstream failures and rejected queries are free.

### Limits, and what this Actor does not guarantee

- **Newest-first slices, not exhaustive sets.** Each watch returns at most `maxResultsPerKeyword` documents; when the
  query matched more, every row says `truncated: true` and `totalMatches` carries the API's count. There is no deep
  pagination: the API caps `count` at 10000 and `total_pages` at 50.
- `totalMatches` can read `10000` when the true number is larger (the API's own ceiling); such rows carry
  `UPSTREAM_COUNT_CAPPED` in `issues`.
- **Document types are validated client-side.** The API does not ignore an unknown `conditions[type]` value: it
  narrows to nothing (`{"count": 0}`), so a typo would otherwise be a silent run of empty results. Rejecting it up
  front turns that into a clear error before anything is fetched or charged.
- An invalid agency slug is reported by the API as HTTP 400; that watch becomes a free `QUERY_REJECTED` row carrying
  the upstream message.
- `excerpt` is the API's snippet for the document, HTML-stripped and bounded; `null` when the API returns none. A
  keyword watch that gets no snippet carries `NO_EXCERPT` in `issues`. Agency-only watches frequently get an
  excerpt too (the API echoes the opening of the abstract) — do not read `excerpt` as proof a term matched.
- `significant` is `null` when the API omits the flag — that is "not reported", not "not significant".
- `FederalRegister.gov` is a prototype edition of the journal; the official legal text is the govinfo PDF
  (`pdfUrl`). Regulations.gov comment links are not resolved by this Actor.
- **Politeness:** requests are paced at 2 per second and each run runs at most 30 watches, one upstream request each (a wider input
  is reported as `REQUEST_BUDGET_EXHAUSTED` rows, free). No personal data is collected; only published documents.

# Actor input Schema

## `keywords` (type: `array`):

Full-text search terms. Each term is one query against the Federal Register; every matching document becomes one dataset row. Max 40 terms.

## `agencies` (type: `array`):

Federal Register agency slugs, e.g. environmental-protection-agency, food-and-drug-administration. With keywords, they narrow each search to those agencies. Without keywords, each agency is watched on its own. Max 20.

## `documentTypes` (type: `array`):

Restrict to any of RULE (final rule), PRORULE (proposed rule), NOTICE, PRESDOCU (presidential document). Leave empty for all types.

## `daysBack` (type: `integer`):

How many days of the Federal Register to search, ending today (UTC). Default 7, maximum 365. Ignored when an explicit start date is given.

## `fromDate` (type: `string`):

Explicit start of the publication window, YYYY-MM-DD. Overrides daysBack.

## `toDate` (type: `string`):

Explicit end of the publication window, YYYY-MM-DD. Defaults to today (UTC).

## `maxResultsPerKeyword` (type: `integer`):

Newest documents kept per watch term or agency (hard limit 100). Each delivered document is one charged row; the full match count is reported as totalMatches.

## `significantOnly` (type: `boolean`):

Restrict to documents the agency flagged as significant under Executive Order 12866.

## Actor input object example

```json
{
  "keywords": [
    "clean air act"
  ],
  "agencies": [
    "environmental-protection-agency"
  ],
  "daysBack": 7,
  "maxResultsPerKeyword": 20,
  "significantOnly": false
}
```

# Actor output Schema

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

All delivered documents as dataset items.

# 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 = {
    "keywords": [
        "clean air act"
    ],
    "agencies": [
        "environmental-protection-agency"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("devsolal/federal-register-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 = {
    "keywords": ["clean air act"],
    "agencies": ["environmental-protection-agency"],
}

# Run the Actor and wait for it to finish
run = client.actor("devsolal/federal-register-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 '{
  "keywords": [
    "clean air act"
  ],
  "agencies": [
    "environmental-protection-agency"
  ]
}' |
apify call devsolal/federal-register-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devsolal/federal-register-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/mfOl8nG1ctlVYorWu/builds/hyWzMkvHl9Jq86Zby/openapi.json
