Sunlight Labs
Project of The Sunlight Foundation    
Read the labs blog

SunlightLabs API

Your API keys

Changelog

11.12.2007

New method: places.getDistrictFromAddress. Users have complained about the quality of data matching zips to districts. James Turk created a more accurate street address to congressional district translator. It is based on the most current information from census.gov. Method uses Google map API to geocode address and then identify the congressional district political boundary the latitutde longitude exists. Method also returns latitude and longitude of street address.

4.5.2007

New method: places.109th.getDistrictsFromZip5. Users have complained about the quality of data matching zips 2 districts. In the absense of comprehensive, publically-available data for the 110th congress, I created a new method: places.109th.getDistrictsFromZip5 which at least gives accurate data about zips to districts for 109th Congress. These data come from the 109th Congressional Directory.

4.2.2007

  1. Fixed bug in people.convertID if fromcode or tocode == entity_id and removed redundancy in output when fromcode == tocode. E.g.

    http://api.sunlightlabs.com/people.convertId.php?id=fakeopenID1&fromcode=entity_id&tocode=entity_id

    now returns

    { "entity_id" : "fakeopenID1" }

  2. people.getDataItem now returns "O: no data" correctly rather than "NULL"
  3. fixed people.getDataCondition so that it can handle some of the complex, ampersand-containing URLs as input. E.g.

    http://api.sunlightlabs.com/people.getDataCondition.php?webform=http://www.defazio.house.gov/index.php?option=com_content&task=view&id=118&Itemid=

    will now return

    { "condition": "webform=http://www.defazio.house.gov/index.php?option=com_content&task=view&id=118&Itemid=", "entity_ids": [ "fakeopenID101" ] }

3.25.2007

Fixed a bug with the At-Large states (AK,DE,MT,ND,SD,VT,WY) for people.reps.getRepFromDistrict.php. Will now accept &district=At-Large

3.22.2007

  1. Modified JSON output on all API methods: it nows returns standards-compliant JSON quoting around both names as well as values. For instance, instead of

    { name : "Joe Doe", title : "VP, Engineering', phone : "13-456-7890"}

    it now returns

    { "name" : "Joe Doe", "title" : "VP, Engineering', "phone" : "13-456-7890"}

  2. Created new API method: people.sens.getSensFromState.php
  3. Created a twitter stream for our API: http://twitter.com/sunlightlabsapi