# eCFR Regulations Lookup: CFR Text as Markdown (`hydrocore/ecfr-regulations-lookup`) Actor

Get US federal regulations (Code of Federal Regulations, eCFR) by citation, part or keyword: clean Markdown and text, agency, part and subpart headings, latest amendment date and history, source note and link. Point-in-time versions and an amended-since filter for change watching. No keys.

- **URL**: https://apify.com/hydrocore/ecfr-regulations-lookup.md
- **Developed by:** [Hydrocore Data](https://apify.com/hydrocore) (community)
- **Categories:** AI, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 regulation sections

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## eCFR Regulations Lookup: CFR Text as Markdown

Look up US federal regulations from the official **eCFR** (Electronic Code of Federal Regulations) by citation ("21 CFR 101.9", "12 C.F.R. § 1026.18"), by whole part ("40 CFR part 60") or by keyword search, and get one clean row per section: heading, issuing **agency**, title, part and subpart headings, the **latest amendment date** with recent amendment history, the Federal Register source note, an ecfr.gov link, and the text as plain text and **LLM-ready Markdown** (tables become Markdown tables). Ask for the text as it read on any past date, or keep only sections amended since a date to watch for changes. No API keys needed.

### ✅ What you get

- Citation, heading, agency, title and part names, subpart and subpart heading, section number
- Latest amendment date, version count and recent amendment dates
- Reserved flag, word count, eCFR link and Federal Register source note
- Plain text and Markdown (tables as Markdown tables), cut near your limit
- Search excerpt and query for keyword searches
- summaryText sentence, eCFR up-to-date date, input and status

### 🏆 Why this Actor

- **Citations in, clean rows out:** forgiving citation parsing (C.F.R., §, "part", ecfr.gov links), whole parts expanded to their sections, and duplicates removed before anything is charged.
- **Built for AI and RAG:** Markdown with headings and real tables, cut at a paragraph or sentence end, plus a one-line summaryText and a full wordCount so you can budget tokens.
- **Change watching built in:** last amended date, version count and the 5 latest amendment dates per section, an Amended since filter and a Changes view.
- **Point in time:** the As of date returns the text in force on that date (eCFR history from 2017) with a dated link.
- **Fair billing:** invalid citations, sections not found, duplicates and filtered rows are free.

### 💡 Use cases

**Apify Store use cases:** Compliance & risk checks · Feed AI agents & RAG · Monitor news & content

- Compliance and GRC teams: pull the exact rules for a control list and watch them for amendments (schedule the run with Amended since)
- Legal tech and RAG apps: load sections as clean Markdown chunks with stable citations and links
- AI agents (ChatGPT, Claude, n8n, MCP): ground answers to "what does 21 CFR 101.9 require?" in the official text
- Regulatory research: find every section that mentions a topic, sorted by most recently amended
- Consultants and auditors: the text as it read on an audit or contract date

### 🚀 How to use

1. Enter citations, one per line, and/or a search phrase.
2. Optional: change the text length, sections per part, Amended since, As of date or the sort order.
3. Run, then open **Overview**, **Text for AI** or **Changes**, or export.

### ⚙️ Input

| Field | What it does |
|---|---|
| `citations` | Sections, whole parts or ecfr.gov links. Default example: 21 CFR 101.9, 12 CFR 1026.18, 29 CFR 1910.1200. |
| `search` | Optional keywords for an eCFR full-text search (current sections only). |
| `titles` | Optional CFR title numbers to limit the search. |
| `includeText` | Text and Markdown (default on). |
| `maxTextChars` | Text length limit, default 20,000 characters. |
| `maxSectionsPerPart` | Sections kept per whole part, default 25. |
| `amendedSince` | Keep only sections amended on or after this date. |
| `asOfDate` | Return the text as it read on this date. |
| `sortBy` | Input order (default), most recently amended first, or title and section number. |
| `maxResults` | Most rows to save, default 25. |

Example input:

```json
{
  "search": "artificial intelligence",
  "sortBy": "recentlyAmended",
  "amendedSince": "2024-01-01",
  "maxResults": 5,
  "maxTextChars": 1000
}
```

### ⬆️ Output

One row per section. `recordType` is `section` or `status` (a free row for a citation that was invalid or not found). Every row has the same 27 keys in the same order; missing values are `null`. The example is a real row from a test run of the current build (text and markdown shortened here).

Overview fields:

| Field | Type | Example | Description |
|---|---|---|---|
| `citation` | string | "12 CFR 1026.18" | Normalized citation, for example "21 CFR 101.9". |
| `sectionHeading` | string | "Content of disclosures." | Section heading without the section number. |
| `agency` | string | "Consumer Financial Protection Bureau" | Issuing agency (the CFR chapter heading). |
| `partHeading` | string | "Truth in Lending (Regulation Z)" | CFR part heading. |
| `lastAmendedDate` | string | "2021-03-01" | Date of the latest amendment in eCFR history (YYYY-MM-DD, history starts in 2017; older sections show their first eCFR date). |
| `versionCount` | integer | 6 | Number of versions of this section in eCFR history. |
| `wordCount` | integer | 2982 | Words in the whole section text (before any cut). |
| `ecfrUrl` | string | "https://www.ecfr.gov/current/title-12/section-1026.18" | Link to the section on ecfr.gov (the dated version when As of date is set). |
| `status` | string | "ok" | ok, or why there is no section. |

All 27 fields (in order): `recordType`, `citation`, `sectionHeading`, `agency`, `titleNumber`, `titleName`, `partNumber`, `partHeading`, `subpart`, `subpartHeading`, `sectionNumber`, `lastAmendedDate`, `versionCount`, `recentAmendmentDates`, `isReserved`, `wordCount`, `ecfrUrl`, `sourceNote`, `searchExcerpt`, `text`, `markdown`, `summaryText`, `upToDateAsOf`, `searchQuery`, `inputValue`, `status`, `scrapedAt`.

Real row from a test run of the current build:

```json
{
  "recordType": "section",
  "citation": "12 CFR 1026.18",
  "sectionHeading": "Content of disclosures.",
  "agency": "Consumer Financial Protection Bureau",
  "titleNumber": 12,
  "titleName": "Banks and Banking",
  "partNumber": "1026",
  "partHeading": "Truth in Lending (Regulation Z)",
  "subpart": "C",
  "subpartHeading": "Closed-End Credit",
  "sectionNumber": "1026.18",
  "lastAmendedDate": "2021-03-01",
  "versionCount": 6,
  "recentAmendmentDates": [
    "2021-03-01",
    "2017-04-25",
    "2017-01-01"
  ],
  "isReserved": false,
  "wordCount": 2982,
  "ecfrUrl": "https://www.ecfr.gov/current/title-12/section-1026.18",
  "sourceNote": "[76 FR 79772, Dec. 22, 2011, as amended at 78 FR 80108, Dec. 31, 2013]",
  "searchExcerpt": null,
  "text": "For each transaction other than a mortgage transaction subject to § 1026.19(e) and (f), the creditor shall disclose the following information as applicable:\n(a) Creditor. The identity of the creditor making the disclosures.\n(b) Amount financed. The amount financed, using that term, and a brief description such as the amount of credit provided to you or on your behalf. The amount financed is calcul …",
  "markdown": "# 12 CFR 1026.18 Content of disclosures.\n\nFor each transaction other than a mortgage transaction subject to § 1026.19(e) and (f), the creditor shall disclose the following information as applicable:\n\n(a) *Creditor.* The identity of the creditor making the disclosures.\n\n(b) *Amount financed.* The *amount financed,* using that term, and a brief description such as *the amount of credit provided to y …",
  "summaryText": "12 CFR 1026.18 (Content of disclosures), issued by Consumer Financial Protection Bureau. Part 1026: Truth in Lending (Regulation Z). Last amended 2021-03-01 (6 versions in eCFR history). 2,982 words. eCFR text current as of 2026-11-09.",
  "upToDateAsOf": "2026-11-09",
  "searchQuery": null,
  "inputValue": "12 CFR 1026.18",
  "status": "ok",
  "scrapedAt": "2026-11-12T21:24:54.991Z"
}
```

Views: **Overview**, **Text for AI**, **Changes**, **Detailed (all fields)**. Export as JSON, CSV, Excel, XML or HTML from the Storage tab or the API (`/datasets/{id}/items?format=csv&view=overview`). The run summary (`OUTPUT` record in the key-value store) counts citations, sections requested, saved, not found, duplicates, filtered rows, rows over the cap and search hits.

### 💰 Pricing

Competitive pricing, pay per result: **$0.003 per regulation section** on the Free plan, less on higher plans, plus the $0.0005 Actor start. 1,000 sections cost about $3 on Free, with headings, agency, amendment history and Markdown included. Invalid citations, sections not found, duplicates and filtered rows are free.

| Event | What it is | Free | Bronze | Silver | Gold+ |
|---|---|---|---|---|---|
| Regulation section | One CFR section saved (headings, agency, amendment history, text and Markdown). Invalid, not-found, duplicate and filtered rows are free. | $0.003 | $0.0028 | $0.0026 | $0.0024 |
| Actor start | Once per run (Apify standard start event, per GB of memory; the default 256 MB = one fee) | $0.0005 | $0.0005 | $0.0005 | $0.0005 |

### 🔁 Integrations

Works with the Apify API, MCP (AI agents), Make, n8n, Zapier, Google Sheets and webhooks. Field names are stable camelCase, so mappings do not break between runs.

### ❓ FAQ

**Where does the data come from?**

The official eCFR API at ecfr.gov, run by the Office of the Federal Register (National Archives) and the Government Publishing Office. It is public and needs no key.

**Is the eCFR the official legal edition?**

The eCFR is an authoritative but unofficial editorial compilation of the CFR, updated daily. The official legal edition is the annual CFR on govinfo.gov. upToDateAsOf shows how current each title is.

**Which citation formats work?**

"21 CFR 101.9", "21 C.F.R. § 101.9", "12 cfr 1026.18", "26 CFR 1.224-1", "40 CFR part 60" and ecfr.gov section or part links. Anything else gives a free status row.

**What happens with a whole part?**

"40 CFR part 60" is expanded to its sections in order and the first Sections per part (default 25) are kept; the log says how many the part has. Reserved sections are skipped.

**How do I watch for changes?**

Save your citations, set Amended since to the date of your last run and schedule the Actor. Only sections with a newer amendment are saved and charged. recentAmendmentDates shows the latest 5 dates.

**How far back does lastAmendedDate go?**

eCFR version history starts in January 2017. A section not amended since then shows its first eCFR date and versionCount 1.

**Can I get an old version of a rule?**

Yes. Set As of date (YYYY-MM-DD, 2017 or later) and the text, headings and link are for that date. Search always looks at current sections.

**How does search work?**

It uses the eCFR full-text search on current sections, best matches first, and adds the matching excerpt. Sorting and filters apply to the best matches the Actor reads (about twice Max results, at least 50).

**Is it good for AI agents?**

Yes. Citation in, one row out with markdown, summaryText, wordCount and stable field names with descriptions in the dataset schema. Use Max characters of text to control the token size.

**Is this legal advice?**

No. It is reference data. Always check the linked eCFR page and the Federal Register for the legal effect of a rule.

### Ready-made examples

- [Key CFR compliance sections, newest amendments first](https://apify.com/hydrocore/ecfr-regulations-lookup/examples/cfr-sections-for-compliance-teams-recently-amended)

### 🛟 Support

Found a problem or need a field? Open an issue on the Issues tab; we read every issue.

### Changelog

- 1.0 (2026-11-12): first release.

# Actor input Schema

## `citations` (type: `array`):

CFR citations, one per line: a section ("21 CFR 101.9", "12 C.F.R. § 1026.18"), a whole part ("40 CFR part 60", expanded to its sections) or an ecfr.gov link. The same section twice is returned once.

## `search` (type: `string`):

Keywords to find current regulation sections (eCFR full-text search, best matches first), for example "artificial intelligence" or "PFAS reporting". Used together with any citations above.

## `titles` (type: `array`):

Optional list of CFR title numbers (1-50) for the search, for example \[21, 40]. Empty = all titles. Citations are not affected.

## `includeText` (type: `boolean`):

Include the section text as plain text and Markdown (tables become Markdown tables). Turn off for headings, agencies and amendment dates only.

## `maxTextChars` (type: `integer`):

text and markdown are cut at a paragraph or sentence end near this length (with …). wordCount always counts the whole section. Default 20,000.

## `maxSectionsPerPart` (type: `integer`):

When a citation is a whole part, keep its first N sections in order. Default 25.

## `amendedSince` (type: `string`):

Keep only sections whose latest amendment date is on or after this date (YYYY-MM-DD). Use it to watch for changes. Other sections are free.

## `asOfDate` (type: `string`):

Return the text as it read on this date (YYYY-MM-DD, eCFR history starts in 2017). Empty = the latest eCFR version.

## `sortBy` (type: `string`):

Order of the rows, applied before Max results.

## `maxResults` (type: `integer`):

Most section rows to save (and charge). Default 25.

## Actor input object example

```json
{
  "citations": [
    "21 CFR 101.9",
    "12 CFR 1026.18",
    "29 CFR 1910.1200"
  ],
  "titles": [],
  "includeText": true,
  "maxTextChars": 20000,
  "maxSectionsPerPart": 25,
  "sortBy": "input",
  "maxResults": 25
}
```

# Actor output Schema

## `overview` (type: `string`):

Citation, heading, agency, last amendment, versions, words and link.

## `text` (type: `string`):

Citation with summary, Markdown and text.

## `changes` (type: `string`):

Amendment history and source notes for change watching.

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

Every field for each row.

## `summary` (type: `string`):

Run summary: citations, sections requested, saved, not found, duplicates, filtered out, rows over the cap, search hits and errors.

# 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 = {
    "citations": [
        "21 CFR 101.9",
        "12 CFR 1026.18",
        "29 CFR 1910.1200"
    ],
    "titles": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydrocore/ecfr-regulations-lookup").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 = {
    "citations": [
        "21 CFR 101.9",
        "12 CFR 1026.18",
        "29 CFR 1910.1200",
    ],
    "titles": [],
}

# Run the Actor and wait for it to finish
run = client.actor("hydrocore/ecfr-regulations-lookup").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 '{
  "citations": [
    "21 CFR 101.9",
    "12 CFR 1026.18",
    "29 CFR 1910.1200"
  ],
  "titles": []
}' |
apify call hydrocore/ecfr-regulations-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hydrocore/ecfr-regulations-lookup"
        }
    }
}
```

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/tmus7qqXo9R3Lf3Wz/builds/CDWzaAffeZWuy9hdh/openapi.json
