Sunlight Labs API

About the API

The Sunlight Labs API provides methods for obtaining basic information on Members of Congress, legislator IDs used by various websites, and lookups between places and the politicians that represent them. The primary purpose of the API is to facilitate mashups involving politicians and the various other APIs that are out there.

Anyone can use the Sunlight Labs API, all it takes is a 15 second sign-up so that we can keep track of how many people are using the API and have a way to get in contact with you should there be any changes or API related news.

Getting Started

Updates

To subscribe to updates follow sunlightlabsapi on twitter

Terms of Service

Use of the Sunlight Labs API is subject to the following terms:

Libraries

All client libraries are unofficial and not endorsed or supported by Sunlight Labs unless otherwise noted.

About the Data

Our data comes from a variety of sources and updated regularly, a list of all sources with their update dates are listed below.

SourceLast Update
US Census Boundary Files2007-03-01
Project Vote Smart2008-06-19
Congresspedia2008-06-20
Eventful2008-06-20
GovTrack.us2008-06-20
Congressional Biographical Directory2008-06-20
FEC Disclosure Database2008-06-20
Center for Responsive Politics2008-06-20
Congressional Directory2008-06-20

To find out specific details about what sources were involved in the data from any given call append the metadata=true option onto the parameters of any function call.

Download All Data

Occasionally we make a dump of all of the data in the API for those users that are best served by a full copy of this data. If you are making heavy use of the API, particularly in an application that involves pulling in nearly all of the information the API provides it is recommended that you use this archive.

Photos of the 110th Congress

We also have taken the effort to compile all of the images of Members of Congress into an archive. The following two archives are provided for convenience with images pulled from the Congressional Directory.

Historical Information

In 2006 Sunlight Labs launched an API aimed at helping people get their political mashups off the ground. In the last two years many new resources have come into creation such as OpenCongress and MAPLight.org and existing sites like Project Vote Smart have introduced APIs of their own.

In July of 2008, Sunlight Labs launched a major update to the Labs API that greatly simplifies usage and reduces the number of calls most users will need to make to get the data they want. While users of the old API may see less methods and assume reduced functionality, nearly all of the old functionality is present, but redundant or unnecessary methods have been removed. (Details on transitioning from the old API to the new are available in the transition guide.)