API

The Open CRS API provides RESTful programmatic access to all reports in the Open CRS database.

Authentication

For access to all methods in the Open CRS API, you must register for an API key API usage is currently not limited, but usage rates are monitored and we may limit usage in the future. For more about our monitoring and privacy practices, see the API Privacy Policy.

Public API Key

The report methods are special methods that are available to anyone through use of the Open CRS Public API Key. If you only plan on using these methods, you do not need to register for an API key.

Open CRS Public API Key: cc5a9d23-1b4c-4532-98be-6235ffb19f20
Your API Key: Sign in to see your API key

Returned Fields

id internal database id (may change, use ordercode, releasedate combination for primary key)
ordercode unique report identifier assigned by CRS
releasedate date version of report was released by CRS
dateadded date report was added to Open CRS database
title title of report
opencrs_url URL of Open CRS summary page for document
download_url URL where copy of report is located

Common Parameters

order_code unique report identifier assigned by CRS
release_date date report was added to Open CRS database
format format of results to return (currently xml and json are supported)
page page number of results (see "Pagination")
api_key your API key
bill_id bill id in the format of <congress>-<bill_type>-<bill_number>

Pagination

At most, 20 reports are listed on a page of results. If a method is invoked that returns more than 20 results, information for the next and previous pages is returned with the result set. Specific pages in result sets are accessed by adding ?page=<page>to any result set.

API Methods

Report information is obtained by providing either and order code or a combination of the order code and release date for a report

Report by Order Code

Requesting report by order code alone will return all available versions of a report with a given order code

Format: http://opencrs.com/api/reports/list.<format>?ordercode=<order_code>?(page=<page>&)key=<api_key>
Example: http://opencrs.com/api/reports/list.json?ordercode=RS22984&key=cc5a9d23-1b4c-4532-98be-6235ffb19f20

Report by Order Code and Release Date

Requesting report by both order code and release date will list one specific instance of a report for a given order code and release date

Format: http://opencrs.com/api/reports/list.<format>?ordercode=<order_code>&releasedate=<releasedate>?(page=<page>&)key=<api_key>
Example: http://opencrs.com/api/reports/list.xml?ordercode=RS22984&releasedate=2009-08-17&key=cc5a9d23-1b4c-4532-98be-6235ffb19f20

List Methods

Recent Reports List

List of reports added to the Open CRS database ordered by date added descending, then by release date descending

Format: http://opencrs.com/api/reports/list.<format>?key=<api_key>(&page=<page>)
Example: Sign in to see working example

Coming Soon

Reports by Legilsation List

List of reports that mention a piece of legislation ordered by release date descending

Reports by Keyword

List of all reports in the Open CRS database associated with a keyword

Collection List

List of all reports in the Open CRS database associated with a collection

Submission Methods

Submission methods allow you to programmatically submit CRS reports to the Open CRS database.

API Privacy Policy

Our API logs include the api key, name of the method requested, and the date and time of the method request. For your privacy, information about specific reports accessed are not included in the API logs. Please note that other common web server log information, including IP address, User Agent, and timestamp are stored in web server logs but are not directly associated with the API log. The purpose of storing this information is solely to monitor traffic volume. We will never share your information with anyone.

About - Contact - FAQ - Add Report - Mailing Lists - Privacy - API