|
PVS Application Programming Interface
General Information
Current Status: Public Beta
The PVS Application Programming Interface (API) will allow you to integrate our data into your applications. An application could be a website, 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.' Each type of request (get bio, get votes) has to be planned for, and the initial release of the API will provide the responses for what we expect to be our more frequent requests.
Our first release includes the following classes: Address, CandidateBio, Candidates, Committee, District, Election, Leadership, Local, Political Courage Test, Office, Rating, State, and Votes. Current methods are listed below. Please note that this list is subject to change as we add new features.
Before signing up, please review our terms of service. When you are ready to sign up for API access, please register.
Register
Technical Details
The PVS API is developed on the REST principal. 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. In this initial release, we have provided PHP and Python libraries, and others are planned for the future. You may also interact with our backend directly.
Classes
Local
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 PVS tracks according to various criteria.
- getBranches
- getLevels
- getOfficesByBranchLevel
- getOfficesByLevel
- getOfficesByType
- getOfficesByTypeLevel
- getTypes
Rating
This class provides information on special interest groups(SIGs) and their ratings on candidates.
- getCandidateRating
- getCategories
- getSig
- getSigList
State
Returns basic info on states.
Votes
Votes provides information on state and federal key legislation and the candidate's respective votes.
- getBill
- getBillAction
- getBillActionVoteByCandidate
- getBillActionVotes
- getBillsByCandidateCategoryOffice
- getBillsByCandidateYearOffice
- getBillsByCategoryYearState
- getBillsBySponsorCategory
- getBillsBySponsorYear
- getBillsByStateRecent
- getBillsByYearState
- getByBillNumber
- getCategories
- getVetoes
Address
This class will fetch address and contact information for various offices for incumbents and candidates.
- getCampaign
- getOffice
- getOfficeByOfficeState
CandidateBio
CandidateBio provides all the various biographical data we collect on candidates.
Candidates
This class fetches a list of candidates according to the criteria of the method.
- getByElection
- getByLastname
- getByLevenstein
- getByOfficeState
Committee
Provides information on committees and their members.
- getTypes
- getCommitteesByTypeState
- getCommittee
- getCommitteeMembers
District
Returns lists of districts according to the criteria supplied.
Election
This class provides basic election information and candidates in the election.
- getElection
- getElectionByYearState
- getStageCandidates
Leadership
Information on officials that hold certain leadership positions.
- getPositions
- getCandidates
Downloads
Libraries
All libraries are released on the BSD License.
Widgets
We also now provide widgets that utilize our API. No registration is required and they can be used anywhere HTML can be inserted.
|