eCFR Regulations Scraper icon

News & feeds · Business data

eCFR Regulations Scraper — Codified Federal Rules

Fetch the Electronic Code of Federal Regulations (eCFR) by Title/Part and get one clean row per codified section — citation, heading, and full verbatim body text — from the National Archives' free, keyless versioner API.

Free Apify credit covers a first run. No credit card to try.

What this Actor scrapes

The eCFR (ecfr.gov, National Archives) is the codified, currently-in-force text of US federal regulations — Title > Chapter > Part > Subpart > Section. Give this Actor a bounded list of {title, part} pairs and it fetches each part's official XML, walks every section, and returns one clean row per section: a well-formed citation like "29 CFR 570.1", its heading, and the full verbatim body text. This is not a change feed — for "what changed today" in the Federal Register's daily journal of rulemaking, see our Federal Register Scraper. This Actor answers a different question: "what is the rule right now, verbatim."

What we handle for you

  • 📄 Section-level parsing — the GPO XML nests sections inside subject groups and part wrappers; we walk every SECTION node regardless of nesting and give you one flat row per provision.
  • 📅 Date resolution — omit a date and we look up the latest in-force date for that title automatically, instead of you guessing a valid one.
  • 🔁 We retry with exponential backoff on 408 / 429 / 503 and honour Retry-After. Up to 5 attempts per request.
  • 🧊 We keep the dataset clean — Pydantic-validated rows, a regex-checked citation on every section, ISO-8601 timestamps.
  • 💰 You pay only for results that land. No data → no charge (only the small actor-start warm-up fee).

Use cases

  • Pull the verbatim text of a regulation for a compliance checklist or GRC platform.
  • Feed a legal-ops search index with clean, citation-tagged section text.
  • Snapshot a Part's in-force text on a given date for an audit trail.
  • Monitor a handful of Parts your industry cares about without downloading an entire Title.

Input

Paste this into the Apify Console, or send it as the run input over the API. Proxy settings are on by default; you rarely need to touch them.

FieldTypeRequiredWhat it does
targets array yes `{title, part}` pairs to fetch, e.g. {"title": 29, "part": "570"}. 1-20 pairs per run — a single part can be large, so whole-title fetches are not supported.
asOfDate string no Fetch the regulation as it stood on this date, as YYYY-MM-DD. Leave empty to resolve the latest date automatically per title.
{
  "targets": [
    {
      "title": 1,
      "part": "1"
    }
  ],
  "asOfDate": null
}

Output

One row per result, schema-validated before it is written. Export JSON, CSV, Excel or XML from the run, or read it over the API.

citationtitle_numbertitle_namepartsection_identifierheadingbody_textas_of_datescraped_at

{
  "citation": "1 CFR 1.1",
  "title_number": 1,
  "title_name": "General Provisions",
  "part": "1",
  "section_identifier": "1.1",
  "heading": "\u00a7 1.1 Definitions.",
  "body_text": "As used in this chapter, unless the context requires otherwise\u2014\n\nAdministrative Committee means...",
  "as_of_date": "2026-08-28",
  "scraped_at": "2026-09-01T00:00:00Z"
}

Pricing

EventPriceWhen
Actor start$0.20Once per run, covers warm-up and proxy session setup.
Result emitted$0.0020Per result written to the dataset.

You pay only for results that land. Cap any run with maxTotalChargeUsd. See pricing & billing for worked examples.

Limitations

  • Whole-title fetches are not supported by design — a single Part can already be tens of megabytes (Title 40 Part 60 alone is over 14 MB / 1,830 sections), so the Actor bounds every run to the Parts you name.
  • One asOfDate per run — point-in-time diffing across two dates isn't a supported mode.
  • Amendment/version history and agency metadata aren't included — this Actor returns the in-force text as it stands on the resolved date, not a change history.

FAQ

Do I need an API key?
No. The eCFR versioner API is public and keyless, so a run needs no credentials from you.
How is this different from your Federal Register Actor?
Federal Register is the daily journal of rulemaking activity — "what changed." This Actor returns the eCFR's codified, currently-in-force text — "what the rule says right now." Different site, different API, different corpus.
Why can't I just fetch a whole Title?
Some Titles run to tens of megabytes for a single Part. Naming exact {title, part} pairs keeps every run's cost and runtime predictable — list the Parts you actually need.
What happens if a Part has no in-force text?
The run finishes successfully with zero rows for that Part and a status message explaining why — an empty result is not a failure.

Ready to run it?

Open the listing on Apify, paste the input above, and watch rows land. If it ever breaks, it is our problem before it is yours.

Related Actors

Teams that run this also run