Article type: How-to guide (one task: list the proposed federal rules whose comment period closes in the next 14 days, soonest first, in a CSV)

Prerequisites: Python 3.9 or later with requests (pip install requests). No API key or account: the FederalRegister.gov API is open. An Apify account only if you use the hosted version at the end.

Tested on: 18 November 2026, against the live FederalRegister.gov API.

The Federal Register API is free JSON with no key, and a short Python script can use it to list every proposed federal rule whose comment period is about to close. When a federal agency proposes a rule, it publishes the proposal in the Federal Register and gives the public a deadline to comment. If you follow regulation for a company, a trade group or a newsroom, the useful question each week is simple: which proposed rules close for comment soon, and where do I comment? This guide answers that with the Federal Register API and saves the list as a CSV.

All the data in this post comes from one endpoint:

GET https://www.federalregister.gov/api/v1/documents.json

with search conditions as query parameters, for example conditions[type][]=PRORULE (proposed rules) and conditions[comment_date][gte]=2026-11-15 (comment period closes on or after that date). It returns a count, a page of results and a next_page_url until the last page. No key, no login.

How do I use the Federal Register API to list proposed rules closing for comment?

Save this as comment_deadlines.py and run python comment_deadlines.py (or python comment_deadlines.py 30 for the next 30 days):

import csv import sys import time from collections import Counter from datetime import date, timedelta from urllib.robotparser import RobotFileParser import requests DAYS = int(sys.argv[1]) if len(sys.argv) > 1 else 14 API = "https://www.federalregister.gov/api/v1/documents.json" UA = "federal-register-comment-deadlines-tutorial/1.0 (python-requests)" FIELDS = ["document_number", "title", "agencies", "publication_date", "comments_close_on", "comment_url", "regulations_dot_gov_url", "docket_ids", "regulation_id_numbers", "cfr_references", "significant", "html_url"] session = requests.Session() session.headers["User-Agent"] = UA # 1. robots.txt first. robots = RobotFileParser() robots.parse(session.get("https://www.federalregister.gov/robots.txt", timeout=30).text.splitlines()) if not robots.can_fetch(UA, API): sys.exit("robots.txt disallows the API for this script") # 2. Proposed rules whose comment period closes between today and DAYS from now. today = date.today() params = [("conditions[type][]", "PRORULE"), ("conditions[comment_date][gte]", today.isoformat()), ("conditions[comment_date][lte]", (today + timedelta(days=DAYS)).isoformat()), ("per_page", "1000"), ("order", "oldest")] + [("fields[]", f) for f in FIELDS] docs, url, count = [], API, None while url: r = session.get(url, params=params if url == API else None, timeout=60) r.raise_for_status() page = r.json() count = page.get("count", count) docs += page.get("results", []) url = page.get("next_page_url") # absent on the last page time.sleep(0.5) print(f"{count} proposed rules close for comment {today} to {today + timedelta(days=DAYS)}; read {len(docs)}") # 3. One row per document, soonest deadline first. rows = [] for d in docs: agencies = d.get("agencies") or [] names = [a.get("name") or a.get("raw_name", "") for a in agencies] # The parent department is listed first; the agency that wrote the rule has a parent_id. own = next((a.get("name") for a in agencies if a.get("parent_id")), names[0] if names else "") rows.append({ "comments_close_on": d["comments_close_on"], "days_left": (date.fromisoformat(d["comments_close_on"]) - today).days, "agency": own, "all_agencies": "; ".join(names), "title": d["title"], "document_number": d["document_number"], "published": d["publication_date"], "docket": "; ".join(d.get("docket_ids") or []), "rin": "; ".join(d.get("regulation_id_numbers") or []), "cfr": "; ".join(f"{c['title']} CFR {c['part']}" for c in d.get("cfr_references") or []), "significant": d.get("significant"), "comment_url": d.get("comment_url") or "", "regulations_gov_url": d.get("regulations_dot_gov_url") or "", "federal_register_url": d["html_url"], }) rows.sort(key=lambda r: (r["comments_close_on"], r["agency"])) out = f"comment_deadlines_{today}.csv" with open(out, "w", newline="") as f: w = csv.DictWriter(f, fieldnames=list(rows[0])) w.writeheader() w.writerows(rows) print(f"wrote {len(rows)} rows to {out}") # 4. What's in it. print(f" {sum(r['days_left'] <= 7 for r in rows)} close within 7 days") print(f" {sum(not r['comment_url'] for r in rows)} have no online comment link") print(f" {sum(bool(r['significant']) for r in rows)} are marked significant (EO 12866)") print(f" {sum(';' in r['all_agencies'] for r in rows)} list more than one agency") print(" agencies with the most:") for name, n in Counter(r["agency"] for r in rows).most_common(5): print(f" {name:<52}{n:>4}") 

Output on 18 November 2026 (it took about 1 second):

68 proposed rules close for comment 2026-11-18 to 2026-12-02; read 68 wrote 68 rows to comment_deadlines_2026-11-18.csv 41 close within 7 days 14 have no online comment link 4 are marked significant (EO 12866) 38 list more than one agency agencies with the most: Federal Aviation Administration 18 Environmental Protection Agency 7 Federal Communications Commission 5 Coast Guard 3 Securities and Exchange Commission 3 

Some rows from comment_deadlines_2026-11-18.csv (titles shortened, most columns left out):

comments_close_on,days_left,agency,title,document_number 2026-11-18,0,Coast Guard,"Safety Zone; FRL Inaugural Invitational eFoil Exhibition Race, Miami M",2026-21305 2026-11-18,0,Environmental Protection Agency,"Air Quality Plan; Arizona; Pinal County Air Quality Control District; ",2026-21287 2026-11-18,0,Federal Communications Commission,"Television Broadcasting Services Des Moines, Iowa",2026-21260 2026-11-19,1,Federal Aviation Administration,"Special Conditions: Honda Aircraft Company LLC Model HA-480 Airplane; ",2026-20350 

Why it's built this way:

  • robots.txt first. The script stops if FederalRegister.gov's robots.txt disallows the API. It doesn't; it disallows the site's HTML search pages, which is one more reason to use the API.
  • Ask for the fields you need. Without fields[], a result has 10 fields and no comment deadline or comment link. The script names the 12 it uses.
  • Follow next_page_url. Each page links to the next and the last page has none, so the loop needs no page arithmetic. A half-second pause between pages keeps it gentle.
  • Soonest deadline first. The CSV is sorted by comments_close_on, then agency, so the top rows are the ones to act on this week.

What should I check before I trust the list?

  1. The parent department comes first. 38 of the 68 documents listed two agencies, and in every one the first was the parent department (Transportation Department, Homeland Security Department, Health and Human Services Department) and the second the agency that wrote the rule. Counting by the first name made "Transportation Department" the top agency with 21. The script takes the agency that has a parent_id, which gives the Federal Aviation Administration 18, 13 of them airworthiness directives for specific aircraft.
  2. Not every document has an online comment link. 14 of the 68 had no comment_url and no Regulations.gov link: 5 from the Federal Communications Commission, 3 from the Securities and Exchange Commission, 2 from the Federal Deposit Insurance Corporation, 2 from the Postal Regulatory Commission and 2 from the Federal Reserve System. Open the document to see how that agency takes comments.
  3. Not every proposed rule has a comment deadline. Of the 143 proposed rules published since 18 October, 13 had no comments_close_on. They were withdrawals, corrections, a discontinued rulemaking, a proposed exemption, a petition for reconsideration and hearing notices. Two of them still had deadlines, but only in their dates text: a hearing notice wanted written outlines by 17 November, and a petition for reconsideration took oppositions until 10 November and replies until 20 November. A filter on the comment date can't see either.
  4. One search reads at most 10,000 documents. Asking for every proposed rule ever, count came back as exactly 10,000, page 10 (at 1,000 per page) had no next_page_url, and page 11 returned HTTP 400 "Pagination limit exceeded". Narrow by date or document type if you need more.
  5. Deadlines are dates, counted from your computer's date. days_left uses today's date where the script runs, so near midnight a deadline can be a day nearer or further than it is in Washington.

To follow one agency, add ("conditions[agencies][]", "environmental-protection-agency") to params. For final rules, use RULE instead of PRORULE and drop the comment-date conditions.

The hosted version (Disclosure: we built this)

We built an Apify Actor, Federal Register API Scraper & Regulation Monitor, that reads the same FederalRegister.gov API. It filters by words, document type, agency (by name, short name such as EPA, or slug), publication date, comments open or closing within N days, docket, RIN, CFR title and part, and significant documents, and each row has the comment close date, the comment link and the official govInfo PDF. A publicInspection mode lists documents filed for publication in the coming days. With monitorMode on and a daily schedule, each run returns only documents it hasn't returned before. When a search reaches the 10,000-document cap, it adds a free status row saying so. Requests go one at a time, at least half a second apart.

What it doesn't do: it reads FederalRegister.gov only, which isn't the official legal edition (use the govInfo PDF in each row for that), and it returns document details and links, not the full text or the comments people have filed. Public inspection covers only the current list. It's pay per event; prices on the Actor's Pricing tab. For example (not run for this post):

{ "mode": "documents", "documentTypes": ["PRORULE"], "publishedWithinDays": 0, "commentsClosingWithinDays": 14, "maxResults": 0 } 

Federal Register API on Apify

Data: FederalRegister.gov API, read 18 November 2026. Federal Register documents are US government works. This post and the Actor are not affiliated with or endorsed by the Office of the Federal Register, the National Archives or any agency named.

Your Evenings