Office of the Federal Register Blog
API Now Available From Federal Register 2.0
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.
The API is still a work in progress; we welcome your feedback about how we can make this tool more useful.
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).
We’re launching with three endpoints:
- Information about all the agencies in the FederalRegister.gov database, located at http://api.federalregister.gov/v1/agencies.json
- Metadata and details about a particular Federal Register document, located at http://api.federalreigster.gov/v1/articles/[DOCUMENT_NUMBER].json
- Full search capabilities, matching the functionality of our advanced search; the entry point here can be found at http://api.federalregister.gov/v1/articles.json
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
Republishers of Federal Register material are not permitted to use official NARA or OFR logos or seals.