Overview

We have shut down new sign ups to the Congress API, and we anticipate turning off the API on July 5, 2024.

Using the Congress API, you can retrieve legislative data from the House of Representatives, the Senate and the Library of Congress. The API, which originated at The New York Times in 2009, includes details about members, votes, bills, nominations and other aspects of congressional activity. This document describes the requests that users can make of the API and the responses that it returns.

In this document, curly braces { } indicate required variables. Square brackets [ ] indicate optional parameters or placeholders.

Get an API Key

New API keys are not available.

Scope of Data

The Congress API returns the following types of data:

  • Roll-call vote data: Only roll-call votes (not voice votes or division votes) are tracked by official Congressional data sources. Along with basic vote data, the ProPublica API returns additional information that is less readily available, such as party totals. Votes are available from 1991 for the House of Representatives and from 1989 for the Senate.
  • Member data: Along with general biographical information for current and past members of Congress, the API returns data about members’ Congressional roles. Role data includes the Congress number and chamber, as well as the member’s title, state and party. A single member may have more than one role in a particular Congress (for example, the member may switch parties or move from the House to the Senate). The API also helps you compare member data, including vote positions and bill cosponsorships. Member data is available for every member who has served in Congress, but those who have served more recently (since 1995) have more information.
  • Bill data: Along with standard bill summaries and details, the API returns bill subjects, amendments and related bills. You can also retrieve bills by member and view all the cosponsors of a bill. Bill information is available for bills from 1995 onward.
  • Nomination data: The API returns presidential civilian nomination lists and details. Military nominations are not included. For general information about presidential nominations, see Congress.gov. Nomination data is available from 2001 onward.
  • Committee data: The API returns data about House and Senate committees, along with the memberships of those committees.
  • Statement data: The API returns data about press releases published by members of the House and Senate.
  • Lobbying data: The API returns data about filings from registered lobbyists. More details on lobbying data.
  • Other data: The API returns various supplemental information, including party counts by state; and committees and committee rosters.

Most of the data in the ProPublica Congress API is updated daily, while votes are updated every 30 minutes.

Terms of Use

Use of this API is available under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 United States license. Commercial users may be subject to additional use fees. To request permission for any commercial use, please fill out the API key request form.

All users are required to abide by the following terms of use for data provided by the API:

  1. You can’t republish the raw data in its entirety, or otherwise distribute the data (in whole or in part) on a stand-alone basis.
  2. You can’t change the data except to update or correct it.
  3. Unless authorized, you can’t charge people money to look at the data, or sell advertising specifically against it. (It may be used on advertising-supported websites or on paid-access sites that provide other content, benefits and/or services.)
  4. You can’t sub-license or resell the data to others.
  5. If you use the data for publication, you must cite ProPublica.
  6. We do not guarantee the accuracy or completeness of the data. You acknowledge that the data may contain errors and omissions.
  7. We are not obligated to update the data, but in the event we do, you are solely responsible for checking our site for any updates.
  8. You will indemnify, hold harmless, and defend ProPublica from and against any claims arising out of your use of the data.

Authentication

To use the Congress API, you must sign up for an API key. Usage is limited to 5000 requests per day (rate limits are subject to change). The API key must be included in all API requests to the server, as a header:

X-API-Key: PROPUBLICA_API_KEY

To authorize, use this code:

With shell, you can just pass the correct header with each request
curl "api_endpoint_here"
  -H "X-API-Key: PROPUBLICA_API_KEY"

Make sure to replace PROPUBLICA_API_KEY with your API key.

Requests

The Congress API uses a RESTful style. See individual methods below for permitted requests. The API only accepts GET requests. All requests begin with:

https://api.propublica.org/congress/{version}/

The current version is v1. For requests that have a congress parameter, the current Congress is 117.

Common Parameters

These parameters are used in all request types. See below for URI structures and additional parameters for each type of request.

  • version The API version (in URI path). The current version is v1.

The following parameters are optional:

  • callback JSONP callback function (in query string).

Responses

The API provides JSON and XML responses for every type of request, and supports JSONP callbacks. Responses that are not date-based return the first 20 results; pagination is available via an offset query string parameter using multiples of 20 for most votes, nomination and bill requests that return more than one object.

Errors

This error section is stored in a separate file in includes/_errors.md. Slate allows you to optionally separate out your docs into many files…just save them to the includes folder and add them to the top of your index.md’s frontmatter. Files are included in the order listed.

The ProPublica Congress API uses the following error codes:

Error Code Meaning
400 Bad Request – Your request is improperly formed
403 Forbidden – Your request did not include an authorization header
404 Not Found – The specified record(s) could not be found
406 Not Acceptable – You requested a format that isn’t json or xml
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – The service is currently not working. Please try again later.

Data Sources

The data returned by the Congress API is compiled from the following sources:

Certain fields in the API responses (such as party totals and vote agreement percentages) are calculated by ProPublica, based on these data sources. The data returned by the Congress API is in the public domain.

Data Update Schedules

  • Bill data, including sponsorships, subjects and amendments, is updated six times a day at the following times (all Eastern Standard Time): 7:00 a.m., 9:45 a.m., 12:45 p.m., 4:45 p.m., 9:45 p.m. and 1:45 a.m.
  • House and Senate votes, along with House and Senate floor actions, are updated every 30 minutes.
  • Nomination data and committee hearing data is updated at 12 p.m. every day.
  • Data on personal explanations and leaves of absence is updated at 12 p.m. every day.

Sunlight Congress API Users

Welcome, former Sunlight Congress API users! We want you to be able to use the ProPublica Congress API for your projects, and are here to try and help make the transition process easier. ProPublica took over the Sunlight Congress API in Nov. 2016 and was sun-setted on Oct. 1, 2017. In between, we’ve added support for many Sunlight Congress API features to the ProPublica Congress API. We post about that work on our Nerd Blog and offer a changelog of updates as well.

The ProPublica Congress differs from the Sunlight Congress API in several important respects:

  • The ProPublica Congress API does not offer a location-based lookup service. We recommend that developers use the Google Civic Information API to accomplish this task. Operating your own geography-based service is another option.
  • The ProPublica Congress API does not offer an endpoint to retrieve an image of a member of Congress. Instead, we recommend that developers use the images provided by the United States project on GitHub.
  • The ProPublica Congress API does not offer a filtering syntax on requests in the way that the Sunlight Congress API did, instead offering a more REST-ful style with fewer querystring options.
  • Authentication for the ProPublica Congress API is by key, but the key is sent as a custom header with requests, not as a query string argument.
  • The ProPublica Congress API does not support the experimental RSS format output that the Sunlight Congress API did.
  • Developers and users can file error reports or ask questions on GitHub or via email at [email protected].