# US Federal Register Scraper — Rules, Executive Orders & CFR (`autotroph/us-federal-register-normalizer`) Actor

Scrape US Federal Register Final/Proposed Rules, Executive Orders, agency notices & pre-publication Public Inspection filings with CFR citations, eCFR links, Regulations.gov dockets, RINs, EO 12866 flags & open comment countdowns. MCP-ready.

- **URL**: https://apify.com/autotroph/us-federal-register-normalizer.md
- **Developed by:** [Shuma Fujino](https://apify.com/autotroph) (community)
- **Categories:** Business, Automation, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 normalized federal register documents

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 Federal Register & Regulatory Rulemaking Normalizer

Extract clean, structured, **compliance-verified US Federal Register rulemaking, Executive Orders, agency notices, and pre-publication Public Inspection filings** directly from the **official, zero-proxy, zero-WAF US National Archives (NARA) Federal Register REST API v1** — built for RegTech / GRC monitoring, legal & compliance teams, government affairs pipelines, and **AI Agents via Apify MCP**.

### Why This Actor Beats Naive Federal Register Scrapers & List-API Scripts

| Capability | Naive Scrapers / List-Endpoint Scripts | US Federal Register & Regulatory Rulemaking Normalizer |
|---|---|---|
| **Zero-Proxy, Official NARA API** | Scrapes HTML pages prone to markup breaks or calls only `/api/v1/documents.json` (which drops 38+ regulatory fields) | Queries the official zero-proxy **NARA Federal Register REST API v1** (`/documents/{number}.json`, `/agencies.json`, and `/public-inspection-documents/current.json`) |
| **CFR Title & Part Normalization** | List endpoint omits `cfr_references`; raw objects lack canonical citation strings or eCFR URLs | Normalizes & sorts every affected **Code of Federal Regulations** part (`"45 CFR 164"`, `"29 CFR 795"`, `"49 CFR 571"`) with direct **eCFR deep links** |
| **Public Comment Window Countdowns** | Raw `comments_close_on` string without open/closed state or remaining-day math | Computes deterministic `comment_window_status` (`OPEN` / `CLOSED` / `NONE`), `comment_days_remaining`, `is_comment_period_open`, and upgrades `comment_url` to canonical **HTTPS** |
| **RIN, Docket & Regulations.gov Linkage** | Mixes raw `"Docket No. FAA-2026-15285"` strings, drops `dockets` when `docket_ids` is empty, and ignores Unified Agenda metadata | Extracts clean **Docket IDs**, canonical **Regulations.gov Docket ID & URL**, live comment counts, **Regulation Identifier Numbers (RINs)**, and Unified Agenda entries |
| **EO 12866 & Executive Order Tracking** | Drops `significant` regulatory action flags, Executive Order numbers, and signing dates | Resolves **EO 12866 `significant_regulatory_action`** flags (`SIGNIFICANT` / `NON_SIGNIFICANT`), **Executive Order labels (`EO 14439`)**, `signing_date`, and `days_signing_to_publication` |
| **Parent & Sub-Agency Hierarchy** | Leaks null/unindexed agency entries (e.g., `id: null, name: null`) and flattens Cabinet departments vs issuing bureaus | Resolves **Parent Department** (`Health and Human Services Department`, `Transportation Department`) vs **Issuing Sub-Agency** (`FAA`, `NHTSA`, `CBP`, `NOAA`, `WHD`) cleanly using NARA's 473-agency directory |
| **Pre-Publication Public Inspection Mode** | Blind to rules filed today before tomorrow's Federal Register issue prints | Native `public_inspection` mode ingests NARA's live **Public Inspection Desk** filings with `filing_type` (`regular` / `special`) and `filed_at` timestamps |
| **Deterministic Compliance Integrity & MCP Ready** | Silent broken dates, HTML tag leaks, or missing citations | Built-in per-document assertions (`integrity_valid`, `integrity_errors`) producing compact, typed JSON ready for Claude, Cursor, LangGraph, and **Apify MCP** |

### Verified Output Schema Example (`2026-23777` — DOL Final Rule)

```json
{
  "document_number": "2026-23777",
  "record_source": "published_document",
  "document_type": "RULE",
  "document_type_label": "Rule",
  "title": "Employee or Independent Contractor Classification Under the Fair Labor Standards Act",
  "citation": "91 FR 75646",
  "volume": 91,
  "start_page": 75646,
  "end_page": 75742,
  "page_length": 97,
  "publication_date": "2026-11-23",
  "effective_on": "2027-01-22",
  "comments_close_on": null,
  "comment_window_status": "NONE",
  "is_comment_period_open": false,
  "significant_regulatory_action": true,
  "significant_status": "SIGNIFICANT",
  "primary_agency": "Wage and Hour Division",
  "primary_agency_slug": "wage-and-hour-division",
  "parent_agency": "Labor Department",
  "parent_agency_slug": "labor-department",
  "sub_agencies": ["Wage and Hour Division"],
  "cfr_citations": ["29 CFR 500", "29 CFR 795", "29 CFR 825"],
  "cfr_titles": [29],
  "cfr_count": 3,
  "primary_rin": "1235-AA46",
  "regulation_id_numbers": ["1235-AA46"],
  "docket_ids": ["WHD-2026-0001"],
  "regulations_gov_docket_id": "WHD_FRDOC_0001",
  "regulations_gov_docket_url": "https://www.regulations.gov/docket/WHD_FRDOC_0001",
  "html_url": "https://www.federalregister.gov/documents/2026/11/23/2026-23777/...",
  "pdf_url": "https://www.govinfo.gov/content/pkg/FR-2026-11-23/pdf/2026-23777.pdf",
  "integrity_valid": true,
  "integrity_errors": []
}
```

### Input Configuration

- **`mode`**: `"search"` (published Federal Register search), `"document_numbers"` (direct lookup by Federal Register document number), or `"public_inspection"` (today's pre-publication filings).
- **`query`**: Full-text search phrase (e.g., `"HIPAA"`, `"artificial intelligence"`, `"tariff"`, `"cybersecurity"`).
- **`documentTypes`**: Optional list of type codes (`"RULE"`, `"PRORULE"`, `"PRESDOCU"`, `"NOTICE"`).
- **`presidentialDocumentTypes`**: Optional subtypes (`"executive_order"`, `"proclamation"`, `"memorandum"`).
- **`agencies`**: Optional list of NARA agency slugs (e.g., `"securities-and-exchange-commission"`, `"environmental-protection-agency"`, `"food-and-drug-administration"`).
- **`cfrTitle` / `cfrPart`**: Optional CFR filter (e.g., `cfrTitle: 45, cfrPart: "164"` for HIPAA).
- **`significantOnly`**: Restrict to EO 12866 economically/policy significant regulatory actions.
- **`openCommentsOnly`**: Restrict to documents with currently open public comment deadlines.
- **`dateFrom` / `dateTo`**: Optional inclusive publication date window (`YYYY-MM-DD`).
- **`maxItems`**: Maximum normalized records to emit (default `20`, max `1,000`).

### Transparent Pay-Per-Event (PPE) Pricing

- **`apify-actor-start`**: `$0.005` per run start
- **`document-normalized`**: `$0.004` per verified Federal Register record (`$4.00 / 1,000 documents` with CFR normalization, parent/sub-agency resolution, RIN/docket linkage, EO 12866 flags, and comment deadline countdowns)
- **Zero proxy surcharge**: Uses official public US National Archives (NARA) REST API v1 only.

### Local Standalone Test (No Apify Credentials Needed)

```bash
python -m src.main --local-test --mode document_numbers --document-numbers 2026-23429,2026-23777,2026-24114 --max-items 3
```

# Actor input Schema

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

Choose 'search' to query published Federal Register documents, 'document_numbers' to normalize specific document numbers, or 'public_inspection' to monitor today's pre-publication filings.

## `query` (type: `string`):

Full-text search query (e.g., 'artificial intelligence', 'HIPAA', 'export controls', 'airworthiness', 'tariff'). Leave empty to retrieve the latest matching filings.

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

Filter by Federal Register document type codes: 'RULE' (Final Rule), 'PRORULE' (Proposed Rule), 'PRESDOCU' (Presidential Document / Executive Order), 'NOTICE' (Agency Notice). Leave empty for all types.

## `presidentialDocumentTypes` (type: `array`):

Optional filter when querying PRESDOCU: e.g., 'executive_order', 'proclamation', 'memorandum', 'determination'.

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

Filter by official Federal Register agency slugs (e.g., 'securities-and-exchange-commission', 'environmental-protection-agency', 'food-and-drug-administration', 'federal-aviation-administration', 'health-and-human-services-department').

## `documentNumbers` (type: `array`):

List of Federal Register document numbers for 'document_numbers' mode (e.g., '2026-23429', '2026-23777', '2026-24114').

## `cfrTitle` (type: `integer`):

Filter by Code of Federal Regulations title number (1 to 50, e.g., 14 for Aeronautics, 17 for SEC/CFTC, 21 for FDA, 40 for EPA, 45 for HHS/HIPAA).

## `cfrPart` (type: `string`):

Optional CFR part filter when cfrTitle is set (e.g., '164', '39', '571').

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

When true, restricts search to economically/policy significant regulatory actions flagged under Executive Order 12866.

## `openCommentsOnly` (type: `boolean`):

When true, returns only documents whose public comment period is currently open (comments_close_on >= today UTC).

## `dateFrom` (type: `string`):

Optional inclusive publication start date (e.g., '2026-01-01').

## `dateTo` (type: `string`):

Optional inclusive publication end date (e.g., '2026-12-31').

## `order` (type: `string`):

Sort order for search results.

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

Maximum number of verified Federal Register records to emit (1 to 1,000).

## `strictValidation` (type: `boolean`):

When true, records failing deterministic schema/date/CFR integrity checks are logged as warnings instead of pushed/billed.

## Actor input object example

```json
{
  "mode": "search",
  "query": "",
  "documentTypes": [],
  "presidentialDocumentTypes": [],
  "agencies": [],
  "documentNumbers": [
    "2026-23429",
    "2026-23777",
    "2026-24114"
  ],
  "cfrPart": "",
  "significantOnly": false,
  "openCommentsOnly": false,
  "dateFrom": "",
  "dateTo": "",
  "order": "newest",
  "maxItems": 20,
  "strictValidation": false
}
```

# Actor output Schema

## `documents` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("autotroph/us-federal-register-normalizer").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("autotroph/us-federal-register-normalizer").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 autotroph/us-federal-register-normalizer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,autotroph/us-federal-register-normalizer"
        }
    }
}
```

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/GUxvR4TVjwKdnFSt0/builds/PQdafbxLA30O3yD5P/openapi.json
