Govkit is a Ruby gem that provides simple access to open government APIs around the web, including:
- OpenCongress, which has an API for federal bills, votes, people, and news and blog coverage
- The Open States project, which has a RESTful API for accessing data about state legislators, bills, votes, etc.
- Project Vote Smart, which has an API with congressional addresses, etc.
- Follow The Money, whose API reveals campaign contribution data for state officials.
gem install govkit
Add govkit to your environment.rb or Gemfile
rails generate govkit to copy a config file into
config/initializers/govkit.rb. You will need to add your API keys to this config file.
>> GovKit::OpenStates::State.find_by_abbreviation('CA') >> GovKit::VoteSmart::Address.find(votesmart_candidate_id) >> GovKit::OpenCongress::Bill.find(:number => 5479, :type => 'h', :congress => '111')
Please join the Govkit Google Group, especially if you'd like to talk about a new feature and get announcements.
Report a bug on our Lighthouse page.
Govkit's main repo is on Github: http://github.com/opengovernment/govkit, where your contributions, forks, and feedback are greatly welcomed.
Copyright (c) 2010 Participatory Politics Foundation, released under the MIT license