# eCFR Regulations Search & Export (`automation-lab/ecfr-regulations-search-export`) Actor

Search eCFR regulations by query or export a title/part. Get citations, headings, full section text, snapshot dates and official source URLs for recurring compliance research.

- **URL**: https://apify.com/automation-lab/ecfr-regulations-search-export.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Business, Automation
- **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 Search & Export

Search **eCFR regulations** or export numbered sections from a CFR title and part for recurring compliance research. Each dataset row includes the citation, heading, complete plain-text regulation, snapshot date and authoritative source links. No source account, API key or proxy is required.

### Who is it for?

Compliance analysts can build repeatable section datasets; legal researchers can retrieve citation-linked text; data engineers can load federal regulations into internal research indexes. This Actor retrieves source material, not legal conclusions.

### Why use this Actor?

Search snippets are useful for discovery but insufficient for reviewing a provision. This Actor fetches the complete section XML after discovery, keeps the search and text on the same dated snapshot, deduplicates citations and exports typed rows. Direct section lookup avoids irrelevant search matches when you already know the citation.

### Getting started

1. Enter a search query such as `airworthiness`.
2. Optionally restrict output to title `14`.
3. Set `maxItems`, initially `3`, and start the Actor.
4. Review citations and full text in the dataset, then export JSON, CSV or Excel.

```json
{"query":"airworthiness","title":14,"maxItems":3}
```

### Search eCFR regulations

The query is passed to the official full-text search service. It may match regulation text or hierarchical headings, with upstream relevance ordering. It is not a local substring match or a guarantee that every returned section body contains the literal query. Title and part restrictions are checked locally before retrieving details. Broad queries with restrictive filters can require many search pages.

Search is date-bound: omitting a date uses source currency, not the machine's current date. This avoids accidentally returning historical versions mixed with current text.

### Title, part and explicit-section export

Omit `query` and supply `title` to export numbered sections in source hierarchy order. Add `part` to restrict that export. When you know the required sections, supply `sections` instead:

```json
{"title":14,"part":"21","sections":["21.175","21.325"],"maxItems":2}
```

A query cannot be combined with explicit sections. Duplicate section numbers are emitted once. Missing explicit sections fail rather than being silently ignored.

### Input parameters

| Field | Meaning |
| --- | --- |
| `query` | Optional nonempty official full-text query; provide query or title. |
| `title` | Numeric CFR title 1–50; reserved title 35 is rejected. Required for export and explicit sections. |
| `part` | Exact numeric part string; requires title and applies in both search/export routes. |
| `sections` | 1–100 section numbers, requiring title and no query. Must match supplied part. |
| `date` | Supported YYYY-MM-DD snapshot, defaulting to title currency or earliest currency across titles. Future dates fail. |
| `maxItems` | Global accepted unique section limit, default 10, range 1–1000. Zero/unlimited is unsupported. |

### Extracted data

| Field | Meaning |
| --- | --- |
| `citation`, `section`, `part` | Stable CFR citation and identifiers. |
| `title`, `titleName` | Numeric title and official name. |
| `heading`, `text` | Section heading and complete plain text including notes, table cells and amendment citations. |
| `date` | Snapshot used for search and XML. |
| `latestAmendedOn` | Latest amendment date for the entire title, **not** the individual section. |
| `sourceUrl`, `xmlUrl` | Dated section page and original XML endpoint. |
| `query` | Trimmed search query, null in export mode. |
| `scrapedAt` | UTC retrieval timestamp. |

### Output example

Abbreviated from a real section lookup; actual `text` contains the complete section:

```json
{
  "citation":"14 CFR 21.175",
  "title":14,
  "titleName":"Aeronautics and Space",
  "part":"21",
  "section":"21.175",
  "heading":"§ 21.175 Airworthiness certificates: classification.",
  "text":"§ 21.175 Airworthiness certificates: classification.\n\n(a) Standard airworthiness certificates are airworthiness certificates issued for aircraft type certificated: ...",
  "date":"2026-09-29",
  "latestAmendedOn":"2026-09-29",
  "sourceUrl":"https://www.ecfr.gov/on/2026-09-29/title-14/section-21.175",
  "xmlUrl":"https://www.ecfr.gov/api/versioner/v1/full/2026-09-29/title-14.xml?section=21.175",
  "query":null,
  "scrapedAt":"2026-10-01T20:00:00.000Z"
}
```

### How much does it cost to export eCFR regulation sections?

Pay-per-event pricing includes a **$0.05 one-time start fee** and one `item` event per saved regulation section. Search and source retrieval are included in the section charge. An empty successful search has only the start fee. Your Apify plan's platform usage may also apply.

| Plan | Price per section |
| --- | ---: |
| FREE | $0.0046 |
| BRONZE | $0.004 |
| SILVER | $0.00312 |
| GOLD / PLATINUM / DIAMOND | $0.0024 |

At BRONZE, 1 section costs $0.054, 10 cost $0.09 and 100 cost $0.45 in Actor event charges. Use a small limit before scheduling a broad export.

### Limits and reliability

Only numbered Section entities are exported. Appendices, removed search results and reserved sections are excluded. Large sections retain their entire body, but XML typography and table layout are flattened. Source dates and historical coverage are controlled by eCFR; unsupported snapshots may fail.

Requests are sequential and transient network, 429 or server errors receive up to three attempts with backoff. Permanent errors and invalid XML fail the run. A failed run can retain already saved rows and their charges; it does not silently become an empty success.

### Integrations

Schedule recurring runs using Apify Tasks and compare `citation` plus `text` in your own pipeline. Send CSV exports to spreadsheets or JSON records to a compliance database. The Actor itself does not implement alerts, change detection, interpretation or a monitoring service.

Full text is suitable for internal retrieval indexes. Keep the source URL, snapshot date and citation alongside each indexed chunk so reviewers can verify provenance.

### API usage

Replace `YOUR_APIFY_TOKEN` with your Apify token, not a source credential.

```bash
curl -X POST 'https://api.apify.com/v2/acts/automation-lab~ecfr-regulations-search-export/run-sync-get-dataset-items' \
  -H 'Authorization: Bearer YOUR_APIFY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"query":"airworthiness","title":14,"maxItems":3}'
```

JavaScript with the Apify client:

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/ecfr-regulations-search-export').call({ title: 14, part: '21', maxItems: 10 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Python:

```python
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/ecfr-regulations-search-export').call(run_input={'title': 14, 'sections': ['21.175'], 'maxItems': 1})
items = client.dataset(run['defaultDatasetId']).list_items().items
```

### MCP access

Once the Actor is available to your account, configure the official hosted Apify MCP endpoint:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/ecfr-regulations-search-export"
```

Equivalent **Claude Desktop**, **Cursor**, and **VS Code** client configuration:

```json
{"mcpServers":{"apify":{"url":"https://mcp.apify.com?tools=automation-lab/ecfr-regulations-search-export"}}}
```

Example prompt: “Retrieve 14 CFR 21.175 and 21.325 with full regulation text and dated source links.” Hosted availability and authentication depend on your client and Apify account.

### Legality and responsible use

The eCFR is continuously updated but is not the official legal edition of the CFR. Confirm legal requirements with authoritative publications and qualified counsel. This Actor is not affiliated with the U.S. government. Use reasonable limits and respect source availability and terms.

### FAQ and troubleshooting

**Why is the snapshot date earlier than today?** The Actor uses the source's published currency, which can lag the calendar.

**Why does a heading match a query absent from the body?** Official search also considers hierarchy headings. Inspect complete text before drawing conclusions.

**Why did my explicit section fail?** Check the title, section identifier and historical snapshot. An unavailable section is an error, not a blank record.

**Can I export an entire title?** The run stops at `maxItems` (at most 1000). It does not promise unlimited title coverage. Narrow to parts for repeatable bounded datasets.

**Does this detect regulatory changes?** No. Schedule snapshots and compare them externally. `latestAmendedOn` is title-level metadata and cannot identify section-level changes.

### Related Actors

- [Federal Register Rules & Notices](https://apify.com/automation-lab/federal-register-rules-notices): retrieve rulemaking publications rather than codified regulation text.
- [Regulations.gov Dockets & Public Comments](https://apify.com/automation-lab/regulations-gov-rulemaking-dockets-comments): investigate dockets and public participation surrounding rulemaking.

### Data handling, retention and support

No AI is used during execution. Your query and requested section scope are sent to the official eCFR API. Output contains public regulation text, not scraped user profiles. Input, dataset records and run logs are stored by Apify under your account retention settings until deleted; no custom cross-run cache is created. Delete associated storage when removing a research dataset. Do not put secrets or personal information in search queries. For help, open an Actor issue on Apify with the run link and input, excluding credentials.

# Changelog

This Actor's version history is a separate document: https://apify.com/automation-lab/ecfr-regulations-search-export/changelog.md

# Actor input Schema

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

Official eCFR full-text query syntax, trimmed. Matches section text or hierarchy headings using upstream search relevance; not a local substring filter. Omit for title export. Cannot combine with sections.

## `title` (type: `integer`):

Optional search restriction; required for title/part export or explicit sections. Title 35 is reserved and rejected.

## `part` (type: `string`):

Exact numeric part identifier, requiring title. Applied to both search and title export. Supplied sections must belong to this part.

## `sections` (type: `array`):

1–100 numbered sections such as 21.175. Requires title and no query. Deduplicated in supplied order; missing sections fail the run rather than silently disappearing.

## `date` (type: `string`):

Optional YYYY-MM-DD historical snapshot date supported by eCFR. Default is source currency date for selected title (earliest currency across titles for unrestricted search). Not an amendment-date filter. Future dates are rejected.

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

Global maximum unique accepted section records, 1–1000; default 10. Zero/unlimited is unsupported. Applies after scope filtering and deduplication. Search paginates until limit or upstream exhaustion; title export follows hierarchy order.

## Actor input object example

```json
{
  "query": "airworthiness",
  "title": 14,
  "maxItems": 3
}
```

# Actor output Schema

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

Export section records as JSON, CSV or Excel from the default dataset.

# 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": "airworthiness",
    "title": 14,
    "maxItems": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/ecfr-regulations-search-export").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": "airworthiness",
    "title": 14,
    "maxItems": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/ecfr-regulations-search-export").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": "airworthiness",
  "title": 14,
  "maxItems": 3
}' |
apify call automation-lab/ecfr-regulations-search-export --silent --output-dataset

```

## MCP server setup

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

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/RLYYJVVMQ2qa8ti2T/builds/Tub0me4yW7l674BXV/openapi.json
