# Federal Rule Lifecycle Resolver (`rhincodontypus/federal-rule-lifecycle-resolver`) Actor

Resolve a U.S. federal rulemaking from a RIN, docket ID, Federal Register document number/URL or title. Returns one record: current stage, comment deadlines and extensions, final-rule and effective dates, delays, withdrawals and related official documents with provenance.

- **URL**: https://apify.com/rhincodontypus/federal-rule-lifecycle-resolver.md
- **Developed by:** [Jonathan Brown](https://apify.com/rhincodontypus) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 rule resolutions

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 Rule Lifecycle Resolver

Resolve one U.S. federal rulemaking and get its **administrative lifecycle** as one structured record, built from the
official **Federal Register API** and the **Regulations.gov API**.

Give it a RIN, a Regulations.gov docket ID, a Federal Register document number or URL, or a rule name. It returns:

- the **current stage**: `pre_rule`, `proposed_comment_open`, `proposed_comment_closed`,
  `final_rule_not_yet_effective`, `effective`, `withdrawn` or `unknown`, with a plain-language `stageBasis`;
- **comment period**: original and current deadline, whether it was extended or reopened, and whether it is open today;
- **final rule** publication date, **original and current effective date**, and whether the effective date was delayed;
- every **related Federal Register document** (proposal, supplemental proposal, extensions, final rule, corrections,
  delays, withdrawals) with its official URL and a `relationBasis` saying *why* it belongs to this rulemaking;
- the RINs, docket IDs, agencies and CFR parts of the action, plus Regulations.gov docket metadata;
- per-source status, so an outage is never reported as "no such rule".

It is a deterministic data utility: no AI model, no browser, no third-party data.

### Scope: administrative record only

The record reflects what the Federal Register and Regulations.gov publish. It **does not** reflect court decisions,
injunctions, stays, Congressional Review Act disapprovals, appropriations riders, enforcement policy or state law,
unless a Federal Register document itself announces the change (for example a delay or withdrawal notice). It is not
legal advice. Every record carries this note in `scopeNote`.

### Input

Provide at least one field. Several identifiers are cross-checked against each other.

| Field | Example | Notes |
|---|---|---|
| `federalRegisterDocumentNumber` | `2024-00366` | Highest confidence. |
| `federalRegisterUrl` | `https://www.federalregister.gov/documents/2024/03/08/2024-00366/...` | Document number is read from the URL. |
| `rin` | `2060-AV16` | Regulation Identifier Number. |
| `docketId` | `EPA-HQ-OAR-2021-0317` | Regulations.gov docket. |
| `query` | `Oil and Natural Gas Sector Climate Review` | Rule name. Resolved only when one rulemaking clearly dominates. |
| `agency` | `Environmental Protection Agency` | Optional; narrows a `query`. |

### Output (abridged)

```json
{
  "schemaVersion": "1.0",
  "status": "resolved",
  "query": {"inputType": "rin", "input": "2060-AV16"},
  "action": {
    "canonicalTitle": "Standards of Performance for New, Reconstructed, and Modified Sources and Emissions Guidelines for Existing Sources: Oil and Natural Gas Sector Climate Review",
    "rins": ["2060-AV16"],
    "docketIds": ["EPA-HQ-OAR-2021-0317"]
  },
  "lifecycle": {
    "currentStage": "effective",
    "proposedRulePublished": "2021-11-15",
    "commentPeriod": {"originalDeadline": "2022-01-14", "currentDeadline": "2023-02-13", "extended": true, "open": false},
    "finalRulePublished": "2024-03-08",
    "effectiveDate": {"original": "2024-05-07", "current": "2024-05-07", "delayed": false}
  },
  "relatedDocuments": [
    {"documentNumber": "2024-00366", "normalizedType": "final_rule",
     "relationBasis": ["matching RIN 2060-AV16", "matching docket ID EPA-HQ-OAR-2021-0317"]}
  ],
  "resolution": {"confidence": "high", "matchedBy": ["RIN"]},
  "sources": {"federalRegister": {"status": "success"}, "regulationsGov": {"status": "success"}},
  "billing": {"billable": true, "eventName": "rule-resolution"}
}
```

#### Status

| `status` | Meaning | Charged |
|---|---|---|
| `resolved` | One rulemaking identified, lifecycle reconstructed. | Yes |
| `partial` | Identified from an exact identifier; one official system was unavailable but the lifecycle is complete from the other. | Yes (high confidence only) |
| `ambiguous` | A rule name matched several rulemakings; `candidates` lists up to 5 with identifiers to retry. | No |
| `not_found` | No official record matches. | No |
| `conflicting_identifiers` | The supplied identifiers point to different rulemakings. | No |
| `insufficient_data` | Official sources could not support a lifecycle (including a source outage). | No |

#### How dates are reconstructed

Comment deadlines and effective dates come from the official DATES text of each Federal Register document first,
then from structured Federal Register fields, then from Regulations.gov. Historical dates are kept: an extended
comment period reports both `originalDeadline` and `currentDeadline`, and a delayed rule reports both `original`
and `current` effective dates. Corrections, extensions and delays adjust dates; they never become the stage.

#### How documents are linked

Documents are linked only on strong evidence: the same RIN, the same docket ID, an official correction link, or a
listing in the Regulations.gov docket. Same agency and overlapping CFR parts are recorded as supporting evidence only.
Similar titles never link documents. A document that shares a docket but carries a different RIN is excluded and
noted in `resolution.ambiguities`.

### Pricing

Pay per event: **$0.05 per `rule-resolution`**, charged only for `resolved` results and high-confidence `partial`
results, at most once per run. Ambiguous, not-found, conflicting and insufficient-data results are free apart from
the platform's tiny actor-start event.

### Development

See `AGENTS.md`. Tests run offline against saved official API responses.

# Actor input Schema

## `federalRegisterDocumentNumber` (type: `string`):

e.g. "2024-00366". Highest-confidence identifier.

## `federalRegisterUrl` (type: `string`):

A federalregister.gov/documents/... URL; the document number is read from it.

## `rin` (type: `string`):

e.g. "2060-AV16".

## `docketId` (type: `string`):

e.g. "EPA-HQ-OAR-2021-0317".

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

Rule title or name, e.g. "Oil and Natural Gas Sector Climate Review". Resolved only when one rulemaking clearly dominates; otherwise status ambiguous with up to 5 candidates (not charged).

## `agency` (type: `string`):

Agency name or federalregister.gov slug to narrow a natural-language query, e.g. "Environmental Protection Agency".

## Actor input object example

```json
{
  "query": "Oil and Natural Gas Sector Climate Review"
}
```

# Actor output Schema

## `resolution` (type: `string`):

The single record: status, action identifiers, lifecycle stage with stageBasis, comment and effective dates, related official documents with relationBasis, Regulations.gov docket metadata, source statuses and billing flag.

# 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 = {
    "query": "Oil and Natural Gas Sector Climate Review"
};

// Run the Actor and wait for it to finish
const run = await client.actor("rhincodontypus/federal-rule-lifecycle-resolver").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 = { "query": "Oil and Natural Gas Sector Climate Review" }

# Run the Actor and wait for it to finish
run = client.actor("rhincodontypus/federal-rule-lifecycle-resolver").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 '{
  "query": "Oil and Natural Gas Sector Climate Review"
}' |
apify call rhincodontypus/federal-rule-lifecycle-resolver --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rhincodontypus/federal-rule-lifecycle-resolver"
        }
    }
}
```

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/k5WrcveaXwWLmTnl2/builds/MIXJ8LYJhnSjXxcfN/openapi.json
