Documentation
API Endpoints
API Endpoints
Using our API is free and easy! All you need to do is start making HTTP requests to any of the REST endpoints below (there's no authentication or cost). If you want a guided tour of what endpoints there are and what kind of data you can access, check out the Quickstart.
Elections
/elections
Elections are groups of contests to be voted on at the same time (e.g. "2020 General Election"). These can be anywhere from nation-wide elections to single-district special elections and primaries.
-
GET
/elections
- List elections (can be searched and filtered). -
GET
/elections/{id}
- Get a specific election.
Precincts
/precincts
Precincts contain information for a particular geographical area. They are the lowest common denominator for ballot contests in a particular election, so any location with that precinct will have the same list of ballot contests.
-
GET
/precincts
- List precincts (can be searched and filtered). -
GET
/precincts/{id}
- Get a specific precinct.
Contests
/contests
Contests are individual races and ballot measures that will be on a ballot (e.g. "Oakland Mayor", "Prop 12", etc.). We include whatever information will be on the ballot, but don't include any analysis or news reports on the contests. We encourage you to use our ballot API and data in your own analysis and apps!
-
GET
/contests
- List contests (can be searched and filtered). -
GET
/contests/{id}
- Get a specific contest.