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.
Register for your Sunlight Labs API key now!
For details on available methods and how to make use of the API, view the Sunlight Labs API Documentation.
We also recommend that you sign up for the API discussion list to communicate with other users and receive email alerts of the latest updates.
Terms of Service
Use of the Sunlight Labs API is subject to the following terms:- The Sunlight Foundation/Sunlight Labs can not be held liable for the accuracy or availability of the service provided and do not make any claims to accuracy, completeness, availability, or any other warranty or guarantee.
- When using the Sunlight Labs API, attribution is appreciated but not required. Implication or claim of endorsement is strictly prohibited.
- Usage of the API depends upon an API key which should only be used by the individual/organization which requested it. Sharing or distribution of API keys is not permitted.
- Usage is currently not limited, but excessive usage is monitored and may be grounds for the termination of service. If you plan to make heavy use of the Sunlight Labs API please contact us beforehand so we can be sure.
- Sunlight Labs does not distribute specifics of API usage except in cases where we have obtained your permission, we do however reserve the right to track and publish aggregate statistics on usage.
- These terms may be modified at any time, users will be notified of any changes via the email address on file.
- Service may be terminated at any time at the discretion of Sunlight Labs.
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.
| Source | Last Update |
|---|---|
| US Census Boundary Files | 2007-03-01 |
| Project Vote Smart | 2008-06-19 |
| Congresspedia | 2008-06-20 |
| Eventful | 2008-06-20 |
| GovTrack.us | 2008-06-20 |
| Congressional Biographical Directory | 2008-06-20 |
| FEC Disclosure Database | 2008-06-20 |
| Center for Responsive Politics | 2008-06-20 |
| Congressional Directory | 2008-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.
- Latest Sunlight Labs API Legislator Dump updated July 3rd (added Donna Edwards for MD-04)
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.)