Sunlight Labs API Transition Guide

Those familiar with the old Sunlight Labs API may look at the new API and wonder if the drastically reduced method count means reduced functionality. The new API only disposes of a few rarely used methods, and in fact introduces new functionality and flexibility that we think will make the new API more useful to practically all users.

If you are new to the Sunlight Labs API 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.

In addition, the data in the old API will no longer be actively maintained, whereas the new API has an automated update mechanism that ensures that the latest members of congress are available typically within a week of their election, often earlier.

Because we encourage all users of the old API to update to the new API, we have provided this transition guide that explains how old methods map to new methods, and in the case where we did have to remove some functionality, where we recommend you go for similar data.

people methods

In addition, the specific parameters that varied across the people-related methods have all been standardized:
Old APINew API
state_full_nameremoved, use state
member110congressuse current_member
senator_classremoved
photosee photos
state_abbreviationstate
URLwebsite
CRPcandIdcrp_id
WashPost_IDbioguide_id
BioGuide_IDbioguide_id
VoteSmart_IDvotesmart_id
FEC_IDfec_id
congresspediacongresspedia_url
Eventful_IDeventful_id
GovTrack_IDgovtrack_id
entity_idsunlight_old_id
There is no longer a unique ID introduced by the Sunlight API, the sunlight_old_id is provided for those which had entity_ids in the new API but no more will be assigned and the use of the fakeopenID is discouraged. We recommend using the BioGuide ID as it is the most authoritative standard identifier presently available.

state methods

Both state related methods (states.getAbbreviationFromName and states.getNameFromAbbreviation) were infrequently used and unnecessary. It is not wise to use a webservice to do this conversion as it is trivial to obtain a table of this data and store it within the application without the repeated overhead of making an HTTP request.

places methods

A fair number of methods were removed from the places-related methods, but everything related to districts has been preserved as these were the only methods that saw any real usage and for which we are reasonably confident about the sources of our data.