# Federal Register Rules and Notices Feed (`your_friendly_developer/federal-register-feed`) Actor

- **URL**: https://apify.com/your_friendly_developer/federal-register-feed.md
- **Developed by:** [Jason Ramirez](https://apify.com/your_friendly_developer) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 document rows

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 Rules and Notices Feed

An Apify Actor that requests documents from the official Federal Register API and emits one normalized dataset item for each returned document, up to your requested limit. Designed for compliance teams, regulated industries, policy shops, and journalists tracking rules and comment deadlines.

The API endpoint, query contract, response shape, and publishing calendar are supplied by the project brief and have not been verified against the live service in this build. All included fixtures are synthetic.

### Inputs

All filters are optional. Dates default at runtime to seven days before the current UTC date through the current UTC date. The default limit is 200; accepted limits are integers from 1 through 5000. Requests use newest order, with at most 1000 records per page.

```json
{
  "keywords": "air quality",
  "types": ["RULE", "PRORULE"],
  "agencySlugs": ["environmental-protection-agency"],
  "publishedFrom": "2026-11-01",
  "publishedTo": "2026-11-08",
  "limit": 200
}
```

For a comment-deadline workflow, retrieve recently published proposed rules, then inspect `commentsCloseOn` and `commentUrl` in the dataset:

```json
{
  "types": ["PRORULE"],
  "agencySlugs": ["food-and-drug-administration"],
  "limit": 500
}
```

This example uses the default publication window. It does not filter by comment deadline. To review deadlines on older documents, set a wider publication window. A missing deadline is null and does not mean that comments are closed or open.

Supported type filters: `RULE`, `PRORULE`, `NOTICE`, `PRESDOCU`. Output `type` preserves the value returned by the API.

### Dataset schema

| Field | Value |
| --- | --- |
| documentNumber | API document_number, or null if absent |
| title | API title, or null if absent |
| type | API type, or null if absent |
| abstract | API abstract, or null |
| publicationDate | API publication_date, or null if absent |
| agencies | Available agency names, or \[] |
| agencySlugs | Available agency slugs, or \[] |
| citation | API citation, or null |
| htmlUrl | API html_url, or null if absent |
| pdfUrl | API pdf_url, or null |
| commentsCloseOn | API comments_close_on, or null |
| effectiveOn | API effective_on, or null |
| commentUrl | API comment_url, or null |
| retrievedAt | UTC ISO timestamp when the row was mapped |
| source | Federal Register |

Values are copied from the returned records, with no inferred dates, links, agencies, or abstracts. No records are synthesized for empty windows.

### Run summary and honest limits

`LAST_RUN_SUMMARY` is stored in the default key-value store with `runAt`, `windowFrom`, `windowTo`, `totalReportedByApi`, `emitted`, `complete`, and `notes`.

An API-confirmed empty result produces zero rows and an explicit empty-window note. A paging failure retains gathered rows and sets `complete: false` with a page-specific note. A first-page failure stores an incomplete summary and throws to fail the Actor run. Invalid input throws before requests are made. Missing or invalid pagination metadata is reported as incomplete. HTTP requests time out after 60 seconds and are not retried.

`complete: true` means the requested collection finished without a detected paging failure. It can include a limit-truncated run; the summary then notes that additional records may exist. This is not a guarantee that every matching API record was collected. `totalReportedByApi` is the API count, not the emitted count, and is null if unavailable. A dataset or key-value-store write failure fails the run; the summary does not guarantee persistence if the storage write itself fails.

The project brief states that the Register publishes on federal business days and that the data is the government's own. This feed depends on that upstream data and does not independently verify its content. Publication windows are not effective-date or comment-deadline filters. API changes, outages, and records added while paging can affect results. There is no deduplication or snapshot guarantee.

The intended publication model is pay per emitted row. Store publication, event billing configuration, and verification of charging are outside this local build. This code does not claim a configured price or issue explicit charge events.

### Local run

Use Node.js 22 (also selected in the Dockerfile).

```sh
npm install
npm test
mkdir -p storage/key_value_stores/default
```

Save an input JSON object as `storage/key_value_stores/default/INPUT.json`, then run:

```sh
npm start
```

Dependency installation and actual runs require network access. The test suite uses built-in `node:test` and injected fixture fetches, requires no installed dependencies, and makes no network requests. Run it directly with `npm test` from this directory. The local SDK runtime and Docker build were not executed in this build lane.

# Actor input Schema

## `keywords` (type: `string`):

Full-text search terms matched against document titles and abstracts.

## `types` (type: `array`):

Document types to include: RULE, PRORULE (proposed rule), NOTICE, or PRESDOCU (presidential document).

## `agencySlugs` (type: `array`):

Agency slugs to filter by, as used by federalregister.gov, for example environmental-protection-agency.

## `publishedFrom` (type: `string`):

Only return documents published on or after this date (YYYY-MM-DD).

## `publishedTo` (type: `string`):

Only return documents published on or before this date (YYYY-MM-DD).

## `limit` (type: `integer`):

Maximum number of documents to return.

## Actor input object example

```json
{
  "limit": 200
}
```

# Actor output Schema

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

Dataset containing all normalized documents

## `keyValueStore` (type: `string`):

Default key-value store holding the LAST_RUN_SUMMARY record

# 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("your_friendly_developer/federal-register-feed").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("your_friendly_developer/federal-register-feed").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 your_friendly_developer/federal-register-feed --silent --output-dataset

```

## MCP server setup

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

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/AYHjUpotgYp8jsGCP/builds/5P6BZ3hJpPGYt8qCS/openapi.json
