Bulk Data, Research/Records Requests, and the API
Table of Contents
Terms of Use and Enforcement
Use of our data is governed by the following:As of 2013, our key stated use policy is: "Vote Smart does not permit the use of its name or programs in any campaign activity, including advertising, debates, and speeches."
This is displayed on each candidate's Political Courage Test webpage, on our section describing what the political courage test is, as part of our website's copyright notice, and on our webpage "For Candidates." It is also distributed to all candidates as part of our Political Courage Test Bulk Communications. Violations of this particular policy are addressed as "Candidate Fights," while other violations are addressed by the National Director
Data Restrictions for Redistribution
Data we're generally comfortable giving out:- Information sourced from the public domain (government websites, campaign websites, etc.)
- Unique content generated by Project Vote Smart (for example, ratings reports, legislative summaries, PCT questions)
- Candidate-submitted content that we otherwise display publicly
- Content we are using under fair use but do not have clear authorization to redistribute (speeches)
- Content which may be of an unclear origin and thus our rights to redistribute are unclear (photos)
- Candidate-submitted content not publicly-available on our website (except at the request of the candidate who authored it, journalists, and academics)
Content we will NOT give out:
- raw data provided by our data partners, including Aristotle (though zip-to-district queries may be done via the API and our widget)
- information about our members and users (see: our privacy policy)
Special Delivery Mechanisms for Bulk Data Users
- The primary delivery mechanism for Vote Smart's bulk data is through our API, though this typically requires the use of a developer. The API is an application that queries our database and produces an output for the API user. API users will use this to get bulk data or may directly integrate it into their own websites and applications. Direct people here first: it's relatively low-maintenance on our end and will fulfill most needs.
- We may allow "scraping" of our website on a case-by-case basis, but generally discourage this practice
- Special permission may be granted on a case-by-case basis to our "PCT" (for journalists and academics only), as long as they abide by our terms of use. The Director of Elections Research and National Director should be consulted for approval. They must create a MyVoteSmart account on our site first. Then, they can be granted access via Django Admin: the user permission "pctarch" will grant access. They would then access the data by logging in and going to their User Panel. As of 6/7/16 the PCT Archives may be a little buggy, but we currently do not have the resources to apply to updates at present, or to provide users with this historical data in bulk in some other format
- Neither API PCT calls nor the PCT Archives include researched Issue Position Data, only answers from candidate who have taken the PCT
- 2016 PCT Archive Data is limited because we changed questions and retested during the GE Election. The Archives only store the answers from candidates who took it after the change. Candidate 171448 is an example of a candidate who passed in 2016 but is not included in the archives.
- The difference between API PCT calls and the PCT Archives is that the API only offers access to candidates' most recent PCT responses, whereas the PCT Archives include all past PCT questions and candidate answers
- Message to academics that we give PCT Archive access to: "Please cite us if you end up publishing a paper/article that uses our data, and do not make the PCT archive raw data directly accessible to the public. Publishing conclusions based on analysis of our data is alright and encouraged, however our proprietary raw data needs to be protected from redistribution. Feel free to call or email any questions on this."
- In 2020, we had success granting access to issue position research via UndocumentedAPIMethods. These still require a key for access. This data is typically treated as more valuable and proprietary than others.
- Non-developers who wish to incorporate our content on their website may wish to use our widget, RSS feeds, and linking options available on our website
If none of these solutions meet their needs:
- Determine if they truly need bulk data? depending on their needs, they may actually find want they're looking for on our voter-oriented tools listed here
- As of 2014, we do not provide "data dumps" or bulk data that requires IT assistance or significant staff time, though this may be considered for a fee or for partners. Research staff and interns may fulfill simple requests as part of SQL skill development.
What is the API?
Most of Vote Smart’s data is available through the API (Application Program Interface). Subscribers of the API obtain access to a vast database of information that has been collected by Vote Smart’s staff, interns, and volunteers since 1992.Some of the data Vote Smart covers includes:
- candidates: basic background, educational experience, political experience, professional experience, contact information, issue positions;
- elections: ballot measures, primary and general election tracking;
- special interest groups (SIGs): ratings;
- legislation: original bill summaries, federal and state voting records, and executive vetoes.
Inquiries about campaign finance data should be directed to CRP and NIMSP. We do offer ID matching in order to help subscribers use both data sets.
Purpose of the API:
The API allows people outside of Vote Smart to integrate our data into their applications. Some people even use it for their personal use, news articles, and school research papers. The API responds to simple requests for data, such as ‘get biographical information for candidate Y’ and ‘get votes information for candidate X.’ Each type of request (get bio, get votes) has to be planned for. Our API provides data in XML or JSON format.
Widgets - Vote Smart provides some ‘widgets’ which are essentially completed code so users can just cut and paste them into their websites. This is an easy way for users to integrate Vote Smart data. Widgets are built on top of the API and will require a valid key.
Libraries- Vote Smart provides libraries, which are pieces of code that will directly connect to Vote Smart servers through our API. This gives users controlled access to our database where we provide the data in a way we think will be useful to the users. This is a powerful way for an outside entity to access our data but it does require some technical ability. Multiple libraries are provided so outside developers can work with their preferred programming language; currently we have libraries in Java, Ruby, Python, PHP, and R.
Scope of Data Available in the API
Read:- the API documentation
- API Fact Sheet for Subscribers
- PVS data coverage
- Outreach>partnerships & api sales>cribsheets on scope of data available through the API
- Data Restrictions for Redistribution
How To Use the API
Read:
API Info Sheet
About the API
API Documentation
Undocumented API Methods - used mostly for VoteEasy (may only be given out on a case-by-case basis, with permission from the National Director)
About the API
API Documentation
Undocumented API Methods - used mostly for VoteEasy (may only be given out on a case-by-case basis, with permission from the National Director)
Register for a Key to Access It:
http://votesmart.org/share/api/register: You should receive an email from officemgr@votesmart.org with your API Key once payment is made.
Getting Started with the API:
Here is a basic formula for directly interacting with the API in a web browser:
http://api.votesmart.org/<method>?key=<your_key>&<input>
NOTE: The key is case-sensitive and should use the case as listed in the documentation; Semi-Static Data may provide some input values, while others may be retrieved through a combination of API calls; for multiple inputs, separate each input with an ampersand ("&")
For example, the Candidate Bio API method would translate into the following URL: http://api.votesmart.org/CandidateBio.getBio?key=<your_key>&candidateId=9490. In this example, if I didn't know a candidateId, I would look for another method whose output was candidateId. I might start with the Officials.getByLevenshtein() method, where the required input is lastName, because I know the official's last name. Using this: http://api.votesmart.org/CandidateBio.getBio?key=<your_key>&lastName=bullock I discover that Steve Bullock's candidateId is 110899, which I can then use as the input in the first example
By default, the output will be in XML. This is fairly readable as is, but it can be converted into another format of your choosing. For example, a quick search for "xml to csv converter" on Google produces over 3 million results.
Random Note: Caching data helps the stress on our organization's servers. Since most of our data is not updated every day, subscribers don't need to call on our API as frequently. Most large subscribers cache our data. It's our job to give them a sense of the frequency that data updates.
- In a call, ? indicates a command (similar to the WHERE clause in SQL)
- In a call, & indicates a section command
- The method you use is important (JSON vs XML)
Additional API Resources
- History of API Subscriptions and Future Considerations
- DevComm: How To Administer the API (registering users, pricing, subscription length, etc.)
- The pricing policy is stated in the registration form
Routing API-Related Communications
DevComm is the primary manager of API subscriptions and is generally the first point of contact with API users. They take the payment and log it in DonorPerfect, activate keys (if needed), answer billing/ account questions. Questions about the fee schedule and API policies are generally answered by the DevComm. High-volume users, name-brand users, users looking to relicense or resell data, users looking for a separate contract, partnership requests, or other unusual questions will be run by the National Director, via DevComm. The National Director may need to consult the President.Data questions (such as those about our research processes; frequency of update; or sources) should be forwarded to the Research Director at research@votesmart.org.
Technical questions, API bug reports, or API feature requests should be forwarded to IT at webmaster@votesmart.org.
| File | Last modified | Size |
|---|---|---|
| API Information Sheet.docx | 2017-04-21 14:43 | 6Kb |
| VS API Fact Sheet.pdf | 2020-12-10 08:49 | 89Kb |
| Vote Smart Data Coverage.ods | 2019-07-15 07:42 | 19Kb |