API Now Available From Federal Register 2.0

August 1, 2011

Building on the groundbreaking efforts of the OFR/GPO bulk XML data feed, we’ve released an Application Programming Interface (API) for FederalRegister.gov, making it even easier for developers to build new ways of interacting with Federal Register data. You can easily fetch information about agencies, particular articles, or use any of our advanced search functionality to programmatically find the articles your users are interested in. More details can be found on the developers page.

In addition, to make things even easier, we’re maintaining an API client ruby gem for the Ruby developers; it can be found on GitHub and RubyGems.

The API is still a work in progress; we welcome your feedback about how we can make this tool more useful.

Developers Page

Project Source Code

FederalRegister.gov is a fully open source project; on GitHub you can find the source code for the main site, the chef cookbooks for maintaining the servers, and the WordPress themes and configuration. We welcome your contributions and feedback.


While the API is still a work in progress, we’ve designed it to be as easy-to-use as possible:

  • It comes pre-processed; the data provided is a combination of data from the GPO MODS (metadata) files and the GPO bulkdata files and has gone through our cleanup procedures.

  • We’re using JSON as a lighter-weight, more web-friendly data transfer format

  • No API keys are needed; all you need is an HTTP client or browser.

  • The API is fully RESTful; URLs are provided to navigate to the full details or to the next page of results (HATEOAS).

  • A simple JSONP interface is also possible; simply add a `callback=foo` CGI parameter to the end of any URL to have the results be ready for cross-domain JavaScript consumption


We’re launching with three endpoints:

Search Functionality

For searching, we currently support searching by:

  • Keyword: `conditions[term]=fishing`; including some advanced query capabilities

  • Publication date (`publication_date`) and legal effective date (`effective_date`):

    • Exact match: `conditions[publication_date][is]=10/15/2011`

    • Year: `conditions[publication_date][year]=2011`

    • Less than or equal to: `conditions[publication_date][lte]=10/15/2011`

    • Greater than or equal to: `conditions[publication_date][gte]=10/15/2010`

  • Publishing agencies include one of (use the agency ID from the `/v1/agencies.json` endpoint): `conditions[agency_ids][]=17&conditions[agency_ids][]=18`

  • Document category: `conditions[type]=PRORULE`; possible values are RULE, PRORULE, NOTICE, PRESDOCU

  • Agency docket number: `conditions[docket_id]=EPA-HQ-OPPT-2005-0049`

  • Article significance under EO 12866: `conditions[significant]=1`

  • Affected CFR parts: `conditions[cfr][title]=40&conditions[cfr][part]=745`

  • Locations mentioned: `conditions[near][location]=94117&conditions[near][within]=25`, where `within` is specified in miles

In most cases, you should be able to simply take a search result URL use the same query parameters for the API search result.

Ruby API Client

We’ve also released an API client gem for the ruby users out there. You can find it on GitHub and RubyGems.

Usage Restrictions

Republishers of Federal Register material are not permitted to use official NARA or OFR logos or seals.


This blog was posted by blogger Michael White on the Federal Register.

Comments are closed.