# Federal Register scraper - rules, notices and proposed rules (`retrainmap/federal-register-documents`) Actor

Federal Register scraper on the official public API: one normalised row per document - number, title, type, agencies, publication and effective dates, abstract, HTML/PDF links, docket IDs, CFR references, page range. Filter by term, agency, type, date range. Default: last 7 days. $5 per 1,000 rows.

- **URL**: https://apify.com/retrainmap/federal-register-documents.md
- **Developed by:** [RetrainMap Team](https://apify.com/retrainmap) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 records

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Federal Register scraper - rules, notices and proposed rules

**Returns:** one row per Federal Register document (rule, proposed rule, notice, presidential document): number, title, type, agencies, publication and effective dates, abstract, HTML/PDF links, docket IDs, CFR references, citation and page range.
**Input:** `{ "search_term": "workforce", "agencies": ["labor-department"], "document_types": ["RULE", "PRORULE"], "publication_date_from": "2026-06-01", "max_records": 100 }` — all optional; empty `{}` returns the last 7 days.
**Price:** $5.00 per 1,000 rows ($0.005 per document row) plus $0.10 per run. Pay per event; no subscription.

One row per Federal Register document from the Office of the Federal Register's public
documents API (https://www.federalregister.gov/api/v1/documents.json). Filter by search
term, agency, document type (rule, proposed rule, notice, presidential document) and
publication date; get document number, title, type, agencies, publication and effective
dates, abstract, HTML/PDF links, docket ids, CFR references and page range — normalised,
one flat row per document, ready for CSV or JSON.

**The default input (notices + rules, last 7 days, 200 rows) succeeds within 5 minutes
and returns rows** — Apify auto-tests it daily.

### Data source and status

| | |
|---|---|
| Publisher | Office of the Federal Register (National Archives) and the U.S. Government Publishing Office |
| API | https://www.federalregister.gov/api/v1/documents.json — public, no key (documentation: https://www.federalregister.gov/developers/documentation/api/v1) |
| What this Actor reads | Plain GET requests with `fields[]`, `conditions[term]`, `conditions[agencies][]`, `conditions[type][]`, `conditions[publication_date][gte/lte]`, `per_page=100`, `order=newest`; it follows the API's own `next_page_url` cursor, at most one request per second |
| Refresh cadence | The Federal Register is published **every federal business day** (documents appear on the API at 8:45 a.m. ET on the publication date; public-inspection documents the day before). The Actor reads live on every run; `fetched_at` on each row is the fetch time |
| Copyright | Works of the United States Government are not subject to copyright in the U.S. (17 U.S.C. §105). The data are public; please cite the Federal Register as the source |
| Known caveats | One query pages through at most 5,000 documents (50 pages × 100) — narrow the date range for more; `effective_date`, `comments_close_on`, `docket_ids`, `cfr_references` and `abstract` are empty when the document has none (notices usually have no effective date or CFR reference); `significant` is null for most documents; an unknown agency slug makes the API answer HTTP 400 and the run fails with that message |

Honesty note: the rows are the API's own fields renamed and flattened — nothing is
inferred, summarised or classified by this Actor, and a run stops with an error rather
than guess when the API's shape changes.

Identification: the requests carry a product-token User-Agent and the operator's
contact address in the standard `From:` header (RFC 9110 §10.1.2).

### Input

| Field | Type | Meaning |
|---|---|---|
| `search_term` | string | Optional full-text term (`conditions[term]`, phrases in double quotes) |
| `agencies` | array of slugs | Optional, e.g. `labor-department`, `employment-and-training-administration`; any listed agency matches. Full list: https://www.federalregister.gov/api/v1/agencies |
| `document_types` | array | Optional: `RULE`, `PRORULE`, `NOTICE`, `PRESDOCU`. Empty = all |
| `publication_date_from` / `publication_date_to` | `YYYY-MM-DD` | Optional, inclusive. Both empty = the last 7 days |
| `max_records` | integer | Default 200, at most 5,000 |
| `request_interval_ms` | integer | Default 1000 (floor 250) |
| `contact_email` | string | Sent in the `From:` header |

Example — Department of Labor rules and proposed rules mentioning workforce since June 2026:

```json
{ "search_term": "workforce", "agencies": ["labor-department"], "document_types": ["RULE", "PRORULE"], "publication_date_from": "2026-06-01", "max_records": 100 }
```

### Output (dataset row)

`document_number`, `title`, `type` (Rule / Proposed Rule / Notice / Presidential Document),
`subtype`, `action`, `agencies` (names), `agency_slugs`, `publication_date`, `effective_date`,
`comments_close_on`, `signing_date`, `abstract`, `html_url`, `pdf_url`, `json_url`,
`public_inspection_pdf_url`, `docket_ids`, `regulation_id_numbers`, `cfr_references`
(`"20 CFR 680"` strings), `citation` (e.g. `91 FR 56776`), `volume`, `page_start`, `page_end`,
`page_length`, `significant`, `topics`, `fetched_at`, `source`.

A run summary (filters, the API's own match count, pages, requests, whether the paging cap
or the pay-per-event budget stopped the run) is stored as `RUN_SUMMARY` in the run's
key-value store.

### Pricing (pay per event)

| Event | Price |
|---|---|
| `run-start` — once per run | $0.10 |
| `record` — per row written | $0.005 |

The default 7-day pull (≤ 200 rows) costs at most $1.10; 1,000 documents cost $5.10. Rows
stop when your run's maximum charge is reached; the run summary says so.

### Operator

Steelyard Ventures LLC (RetrainMap) — info@steelyardclinical.com. Not affiliated with the
Office of the Federal Register or GPO. The Actor writes only to its own dataset and
key-value store; it stores no credentials and sends nothing else.

# Actor input Schema

## `search_term` (type: `string`):

Optional full-text search term, passed as the API's conditions\[term] (Federal Register search syntax; phrases in double quotes). Empty = no term filter.

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

Optional federalregister.gov agency slugs, e.g. labor-department, employment-and-training-administration, education-department. Documents from any listed agency match. The full list (472 slugs) is at https://www.federalregister.gov/api/v1/agencies; an unknown slug makes the API answer HTTP 400 and the run fails with that message.

## `document_types` (type: `array`):

Optional. RULE = final rule, PRORULE = proposed rule, NOTICE = notice, PRESDOCU = presidential document. Empty = all four.

## `publication_date_from` (type: `string`):

Optional. When both dates are empty the Actor uses the last 7 days (today minus 7 days through today, UTC).

## `publication_date_to` (type: `string`):

Optional. Inclusive upper bound on the publication date.

## `max_records` (type: `integer`):

Stop after this many documents have been written. One query can page through at most 5,000 documents (50 pages of 100); narrow the date range for more.

## `request_interval_ms` (type: `integer`):

Politeness delay towards federalregister.gov. Each request returns up to 100 documents; the floor is 250 ms.

## `contact_email` (type: `string`):

Sent in the standard From: request header so the data owner can reach the operator (RFC 9110 s10.1.2).

## Actor input object example

```json
{
  "document_types": [
    "NOTICE",
    "RULE"
  ],
  "max_records": 200,
  "request_interval_ms": 1000,
  "contact_email": "info@steelyardclinical.com"
}
```

# Actor output Schema

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

Every matched document as one row: number, title, type, agencies, dates, abstract, links, dockets, CFR references, page range.

## `results_csv` (type: `string`):

The same rows as a CSV file.

# 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 = {
    "document_types": [
        "NOTICE",
        "RULE"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("retrainmap/federal-register-documents").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 = { "document_types": [
        "NOTICE",
        "RULE",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("retrainmap/federal-register-documents").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 '{
  "document_types": [
    "NOTICE",
    "RULE"
  ]
}' |
apify call retrainmap/federal-register-documents --silent --output-dataset

```

## MCP server setup

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

```

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/HqZYnY3LMvDllfPr8/builds/lvBmmDCOSUnytsG8r/openapi.json
