The Vote Smart Application Programming Interface (API) will allow you to integrate our data into your applications. An application could be a Web site, standalone program, or pretty much anything in the computer world. The API will respond to simple requests for data, such as 'get bio information for candidate Y' and 'get Votes for candidate X.'
The Vote Smart API is developed on the REST principle. Our backend is simply a Web server interface that takes GET requests and returns the data in the format of your choice. The API provides data in either XML or JSON.
The data is output in a strict and expected format as outlined in our documentation. We have provided Java, PHP and VisualBasic libraries, and third parties have developed other things that interact with our API. You may also interact with our backend directly.
Basic local information on cities and counties.Political Courage Test
Returns a candidates most recently filled out Political Courage Test.Office
Get various lists of offices that Vote Smart tracks according to various criteria.Officials
This class fetches a list of officials according to the criteria of the method.Rating
This class provides information on special interest groups(SIGs) and their ratings on candidates.State
Returns basic info on states.Votes
Votes provides information on state and federal key legislation and the candidate's respective votes.Address
This class will fetch address and contact information for various offices for incumbents and candidates.CandidateBio
CandidateBio provides all the various biographical data we collect on candidates and officials.Candidates
This class fetches a list of candidates according to the criteria of the method.Committee
Provides information on committees and their members.District
Returns lists of districts according to the criteria supplied.Election
This class provides basic election information and candidates in the election.Leadership
Information on officials that hold certain leadership positions.
All libraries are released on the BSD License.
- Java - VoteSmart.jar(20090421)
- PHP - php-votesmart
PHP Library requires the SimpleXML PHP extension which is installed by default.
We also now provide widgets that utilize our API. No registration is required and they can be used anywhere HTML can be inserted.
Please note that the following software comes in varied licenses and is not under Project Vote Smart's control.
Libraries for interacting with our API.
- Java - votesmart-clientThis program is a RESTful Client API for the VoteSmart.org Website.
Provided by Karl Nicholas
- Python - python-votesmartPython client library for interacting with Project Vote Smart API.
Provided by: Sunlight Labs
- Ruby - ruby-votesmartA wrapper for the Project Vote Smart API.
- R - pvsRAn R package for the PVS API.
Provided by: Ulrich Matter
Modules or addons for other pieces of software
- Drupal ModuleThis module provides integration with the Project Vote Smart API.
Provided by: Allie Micka
If you know of any other third party tools using our API, please let us know by mailing email@example.com.