Skip to main content
< All Topics
Print

Federal Register API Integration

name: federal-register-api-integration

description: Integrate the Federal Register API (federalregister.gov) for ingesting executive orders, proclamations, presidential memoranda, and regulatory actions. Document type filtering, full-text search, citation extraction, change tracking. Use when ingesting Federal Register documents, tracking executive actions, extracting legal citations, or monitoring regulatory changes.

Federal Register API Integration

Instructions

Build integrations with the Federal Register API (federalregister.gov/developers) to ingest, filter, and track US federal government publications including executive orders, proclamations, presidential memoranda, rules, proposed rules, and notices.

API Fundamentals

The Federal Register API is a free, public REST API with no authentication required:

  • Base URL: https://www.federalregister.gov/api/v1
  • Rate limiting: Be respectful — implement client-side rate limiting at 10 requests/second maximum
  • Response format: JSON by default, CSV available
  • Pagination: Results paginated with page and per_page parameters (max 1000 per page)

Key Endpoints

Endpoint Purpose
GET /documents Search and filter documents
GET /documents/{document_number} Retrieve a specific document
GET /documents/{document_number}.json Full document with metadata
GET /public-inspection-documents Documents pending publication
GET /agencies List all agencies

Document Type Filtering

Filter documents by presidential document type:

Type API Filter Value Use Case
Executive Order presidential_document_type=executive_order Track EOs by number and subject
Proclamation presidential_document_type=proclamation Emergency declarations, commemorative
Presidential Memorandum presidential_document_type=memorandum Agency directives
Determination presidential_document_type=determination Sanctions, trade, foreign policy

Additional useful filters:

  • type: RULE, PRORULE, NOTICE, PRESDOCU
  • agencies[]: Filter by issuing agency slug
  • conditions[publication_date][gte]: Date range filtering
  • conditions[term]: Full-text search
  • conditions[significant]: Filter economically significant rules (EO 12866)

Ingestion Pipeline

Design the ingestion pipeline for reliability and completeness:

  1. Scheduled polling: Poll the API on a configurable schedule (hourly for active monitoring, daily for archival)
  2. Incremental fetch: Use conditions[publication_date][gte] with the last successful fetch date to avoid re-processing
  3. Document storage: Store the full JSON response plus extracted fields in a structured database
  4. Deduplication: Use document_number as the unique key. Handle corrections and amendments that update existing documents
  5. Retry logic: Implement exponential backoff for API failures. Queue failed fetches for retry
  6. Completeness verification: Periodically compare local document counts against API totals for date ranges to detect missed documents

Citation Extraction

Extract and link legal citations from document text:

  • Executive Order references: Pattern Executive Order \d{4,5} — link to the referenced EO
  • US Code citations: Pattern \d+ U\.S\.C\. §?\s?\d+ — link to uscode.house.gov
  • CFR citations: Pattern \d+ CFR (?:Part )?\d+ — link to ecfr.gov
  • Public Law citations: Pattern Pub(?:lic)?\s?L(?:aw)?\s?\d+-\d+ — link to congress.gov
  • Federal Register citations: Pattern \d+ FR \d+ — link to the FR page
  • Prior presidential document references: Extract references to prior EOs, proclamations, and memoranda to build a citation graph

Change Tracking

Monitor for changes in the regulatory landscape:

  • New document alerts: Trigger notifications when documents matching configured criteria are published
  • Amendment tracking: When a document amends or revokes a prior document, update the status of the prior document in the local database
  • Effective date monitoring: Track documents with future effective dates and alert when they take effect
  • Comment period tracking: For proposed rules, track comment period open/close dates
  • Agency activity monitoring: Track publication volume by agency over time to detect surges in regulatory activity

Data Model

Core fields to extract and store per document:


document_number: string (unique identifier)
document_type: enum (executive_order, proclamation, memorandum, rule, proposed_rule, notice)
title: string
abstract: string
publication_date: date
effective_date: date (nullable)
signing_date: date (nullable, for presidential documents)
president: string (nullable)
executive_order_number: integer (nullable)
agencies: array of { name, slug, id }
citation: string (FR citation, e.g., "89 FR 12345")
full_text_url: string
pdf_url: string
raw_text: text (full document body)
extracted_citations: array of { type, citation, linked_url }
amends: array of document_numbers
amended_by: array of document_numbers
revoked: boolean
revoked_by: document_number (nullable)
topics: array of strings
significant: boolean

Inputs Required

  • Document types to monitor (executive orders only, all presidential documents, or full FR)
  • Agency filter list (all agencies or specific subset)
  • Polling frequency and alerting requirements
  • Citation extraction depth (surface-level or full citation graph)
  • Storage backend (PostgreSQL, SQLite, or document store)
  • Downstream consumers (n8n workflows, analysis pipelines, user-facing dashboards)

Output Format

  • API integration module with configurable filters and pagination handling
  • Ingestion pipeline specification with scheduling and retry logic
  • Database schema for document storage
  • Citation extraction regex library with linking rules
  • Change tracking alert configuration
  • Monitoring dashboard specification showing publication volume, document types, and agency activity

Anti-Patterns

  • Scraping instead of API: Screen-scraping federalregister.gov instead of using the documented API
  • No rate limiting: Hitting the API as fast as possible without client-side throttling
  • Full re-fetch: Re-downloading all documents on every poll instead of incremental fetching
  • Ignoring amendments: Storing documents as immutable without tracking when they are amended or revoked
  • Text-only storage: Storing only extracted text and discarding the structured metadata
  • Citation regex fragility: Using overly specific regex patterns that miss citation format variations
  • No backfill strategy: Starting from today with no plan to ingest historical documents for context
Table of Contents