Top of page

Introducing the congress.gov API

Share this post:

This post was originally co-authored for the In Custodia Legis blog by Margaret Wood and Andrew Weber.

Congress.gov is a fantastic source of legislative information, and a marvelous source for investigating specific legislation and exploring the legislative history of a bill. Congress.gov also contains large amounts of data and various users have expressed interest in having additional access to download this data. Certain entities or persons have “scraped” the website over the years and the Government Publishing Office (GPO) has also offered bulk data downloads for some collections, but these have all been somewhat imperfect measures. However, today we are introducing the beta Congress.gov API which will provide access to accurate and structured congressional data. We are very excited about this release and a great deal of hard work has gone on behind the scenes this year to make this happen.

So what is an API? It is a method by which structured data can be shared when an application submits a request and receives the data back. The Congress.gov API is a REST API and presents data in a hierarchical browse format with responses provided in XML or JSON. The XML format is the default for the API.

The Congress.gov API will cover many of the Congress.gov collections out of the gate, including bills, amendments, summaries, Congress, members, the Congressional Record, committee reports, nominations, treaties, and House Communications. Over time we will be adding other Congress.gov collection endpoints, such as hearing transcripts and Senate Communications

a screen shot of the Congress.gov API details
Items in the beta Congress.gov API

As with all Congress.gov products, we have worked to provide documentation about the API as well. In this case there is documentation, user guides, a change log that details changes to the API, and opportunities for feedback. To use the API you must first get an API key.

screenshot of the form to get a Congress.gov API key
Sign up to get a Congress.gov API key

There is a GitHub page for the Congress.gov API where you can get additional information and provide feedback if you encounter any problems. We encourage users to look at the issues section for information which can help answer possible queries. And, as always, we are here to help through our Ask a Librarian service.

A screenshot of the Congress.gov API GitHub space
Learn more at the Congress.gov API GitHub space

 

Be sure to join us for the Congress.gov Virtual Public Forum on September 21st where we will talk more about the new beta Congress.gov API. And if you’re interested in any other APIs provided by the Library of Congress, check out loc.gov/apis. 

Subscribe to In Custodia Legis – it’s free! – to receive interesting posts drawn from the Law Library of Congress’s vast collections and our staff’s expertise in U.S., foreign, and international law.

Add a Comment

This blog is governed by the general rules of respectful civil discourse. You are fully responsible for everything that you post. The content of all comments is released into the public domain unless clearly stated otherwise. The Library of Congress does not control the content posted. Nevertheless, the Library of Congress may monitor any user-generated content as it chooses and reserves the right to remove content for any reason whatever, without consent. Gratuitous links to sites are viewed as spam and may result in removed comments. We further reserve the right, in our sole discretion, to remove a user's privilege to post content on the Library site. Read our Comment and Posting Policy.


Required fields are indicated with an * asterisk.