Elections API: Candidates, Officeholders, Ballots (Ballotpedia)
Pricing
from $10.00 / 1,000 elected official returneds
Elections API: Candidates, Officeholders, Ballots (Ballotpedia)
US elections data from the Ballotpedia API: current elected officials with contact details and voting districts for any address point, election dates, candidates on the ballot with results, and ballot measures by state or location, federal to local. Bring your own key.
Pricing
from $10.00 / 1,000 elected official returneds
Rating
0.0
(0)
Developer
Nabeel Hassan
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a month ago
Last modified
Categories
Features
Share
Look up US elected officials, voting districts, election dates, candidates with results and ballot measures for any address point or state, as one clean dataset row per record.
Ballotpedia, published by the Lucy Burns Institute, researches every federal and state office, state legislative seat, the largest cities and many counties, school districts and judicial seats, and every statewide ballot measure. This actor wraps the Ballotpedia Geographic APIs and Ballot measures endpoints on api4.ballotpedia.org: give latitude and longitude points or pick states and an election date, and get deduplicated rows with the officeholder or candidate, office, level, branch, district, party, contact details, vote totals and Ballotpedia links already flattened, ready to download as JSON, CSV or Excel, schedule before each election, or feed into sample ballot tools, "who represents me" lookups, voter guides, CRM enrichment, civic tech apps, RAG pipelines and AI agents.
Bring your own API key: Ballotpedia issues keys to its licensed data clients (see below).
What it does
- Officeholders by location: the current elected officials who represent a point, federal, state and local, with office, level (Federal, State, Local), branch (Executive, Legislative, Judicial), district, party, status, phone, email, website and Ballotpedia profile link.
- Voting districts by location: every district a point lies in (Congress, state legislative upper and lower, county, city, school district, judicial and special districts) with OCD division IDs, Census geo IDs and boundary end dates, optionally as of a past date around redistricting.
- Election dates by location: the elections at a point from one year back to one year ahead.
- Election dates by state, year and type: General, Primary, Special and Recall election dates from 2018 on, with district and whether candidate lists are complete.
- Ballot and results by location or by state: every race on the ballot for an election date, one row per candidate, with office, district, party, incumbency, write in, withdrawn but still on the ballot, status (such as On the Ballot, Advanced, Won or Lost), vote totals, ranked choice voting rounds, running mates, FEC IDs and Ballotpedia disclaimers. By state filters by office level, office branch and district type.
- Ballot measures: the dates with ballot measures in a year, and every state and local ballot measure for a state and election date, with type, status, yes and no vote totals and what a yes or no vote means.
- Pay only for results: refused and empty lookups become a free row that says why.
Nothing is written to any Ballotpedia account: only GET endpoints are called. Ballotpedia's bulk data file downloads are deliberately not offered, and every run is capped by Max results, as Ballotpedia's terms require.
How to use it
- Get a Ballotpedia API key from Ballotpedia's data sales team (developer.ballotpedia.org documents the API; keys come with a licensed data package).
- Paste it into the API key field (or set a
DATA_API_KEYenvironment variable on the actor). It is sent only to api4.ballotpedia.org in the x-api-key header and never logged. - Choose What to get. For a location mode, add points as latitude,longitude (geocode addresses first). For a state mode, pick States and set the Election date or Election year.
- Press Start and download the dataset, or schedule the actor for a recurring feed before each election.
The default Ballotpedia plan allows 5 requests a second with a burst of 100 and 200,000 a day; the actor paces itself at 120 a minute by default. Each point is one request. When the quota is used up the run ends cleanly and says so.
Input
| Field | Used by | Example |
|---|---|---|
| What to get | all | Officeholders by location |
| Locations (latitude, longitude) | officeholders, districts, election dates and ballot by location | 43.079896,-89.3818172 |
| Districts in effect on | Voting districts by location | 2022-06-01 |
| Extra details (collections) | officeholders, ballots | Contact details, Social media |
| States | election dates by state, ballot by state, ballot measures | Wisconsin, California |
| Election date | ballots, ballot measures, election dates filter | 2026-11-03 |
| Election year | election dates by state, ballot measure dates | 2026 |
| Election types | Election dates by state | General, Primary |
| Office levels, Office branches | Ballot by state | Federal, Legislative |
| District types | Ballot by state, ballot measures | State, County |
| Max results | all | 100 |
| Requests per minute | all | 120 |
| API key | all | your Ballotpedia key |
Example input for every candidate for federal office on the Wisconsin general election ballot:
{"mode": "electionsByState","states": ["WI"],"electionDate": "2024-11-05","officeLevels": ["Federal"],"collections": ["contact"],"maxResults": 200}
Example output
The shape of one officeholder row (values illustrative, from Ballotpedia's documented example):
{"mode": "officeholders","recordType": "officeholder","query": "43.079896,-89.3818172","found": true,"id": 37193,"name": "Mark Pocan","lastName": "Pocan","state": "WI","districtId": 430,"districtName": "Wisconsin District 2","districtType": "Congress","preciseBoundary": true,"officeId": 10859,"officeName": "U.S. House Wisconsin District 2","officeType": "Representative","officeLevel": "Federal","officeBranch": "Legislative","status": "Current","party": "Democratic Party","partyId": 2,"phone": "202-225-2906","website": "https://pocan.house.gov/","ballotpediaUrl": "https://ballotpedia.org/Mark_Pocan","note": null,"record": { "id": 37193, "...": "the full Ballotpedia officeholder with its office and district" }}
Candidate rows carry raceId, raceUrl, raceYear, raceType, stageType, stageParty, isIncumbent, isWriteIn, status, votes, rcvRounds, runningMate, fecId and disclaimers; ballot measure rows measureType, officialTitle, status, yesVotes, noVotes, yesVote and noVote; district rows districtOcdId, districtGeoId and districtEndDate; election date rows electionDate, electionType, description and candidateListsComplete. Every row keeps the full Ballotpedia record under record.
Pricing
| Event | Price |
|---|---|
| Elected official returned | 0.01 USD |
| Candidate on the ballot returned | 0.008 USD |
| Ballot measure returned | 0.008 USD |
| Voting district returned | 0.005 USD |
| Election date returned | 0.005 USD |
Refused and empty lookups are free rows. Platform usage is included. The Ballotpedia key and its data licence are billed by Ballotpedia separately.
FAQ
What is the Ballotpedia API?
Ballotpedia is the nonpartisan online encyclopedia of American politics, published by the Lucy Burns Institute. Its Geographic APIs on api4.ballotpedia.org return voting districts, current officeholders, election dates and ballots with results for a latitude and longitude or a state, and its Ballot measures endpoints return state and local ballot measures. Access needs an API key from Ballotpedia's data sales team.
Do I need an API key?
Yes. Ballotpedia answers nothing without one, and the actor ends the run with instructions if none is set. Keys come with a licensed Ballotpedia data package; contact Ballotpedia's data sales team through developer.ballotpedia.org. What each key reaches depends on the package: a ballot measures package, for example, covers only the two ballot measure modes.
How do I find who represents an address?
Geocode the address to latitude and longitude (with the Google Geocoding API, AWS Location or any geocoder), choose Officeholders by location and paste the point. You get the President, US senators and representative, governor and statewide officials, state legislators, and local officials Ballotpedia covers, with phone, email and website.
How do I build a sample ballot lookup?
Choose Election dates by location for the voter's point to find the upcoming election dates, then Ballot and results by location with that point and date. Each candidate row carries the race, office, district and party; ballot measures on that ballot come back as their own rows. This is the flow Ballotpedia's own practical guide describes.
Can I get election results and vote totals?
Yes, when your Ballotpedia package includes results. Candidate rows then carry the status (Won or Lost), votes, whether results are certified, and ranked choice voting rounds; ballot measure rows carry Approved or Defeated and yes and no vote totals.
How do I list every election in a state?
Choose Election dates by state, year and type, pick the state, and optionally a year and types such as Special or Primary. Leave States empty to list election dates in every state, 25 per request.
Which offices and districts are covered?
Ballotpedia's officeholder data covers Congress, statewide offices, state legislatures and elected officials in the 100 largest US cities; ballots also cover many county, school board, judicial and special district races. Districts follow Ballotpedia's district types, from Country and Congress down to School district subdivision.
Can I download Ballotpedia's whole data set?
No. Ballotpedia licenses its data for use in products as long as third parties cannot bulk download it, so this actor offers query lookups only, capped by Max results, and does not wrap the bulk data file endpoints. Licensed bulk data clients download their files from the Ballotpedia client portal.
Keyword map
Elections API, election data API, Ballotpedia API, Ballotpedia scraper, elected officials API, who represents me lookup, find my representative, officeholders API, legislator contact list, candidates API, candidate list by state, election results API, sample ballot API, ballot measures API, voting districts by address, OCD division IDs, election dates calendar, voter guide data, civic data, political data, Google Civic Information API alternative.
How to get your own key
Ballotpedia API keys are issued by Ballotpedia's data sales team to licensed data clients; the developer documentation is at developer.ballotpedia.org. Once you have the key, paste it into the API key field or store it as the DATA_API_KEY secret. If you call the API from a web page instead, Ballotpedia must whitelist your domain first; this actor calls it server side, so no whitelisting is needed.
Data licence and terms
Ballotpedia content is copyrighted by its editors and contributors, and licensed data sets are Ballotpedia's proprietary property. Ballotpedia's terms let licensees use the data in internal or external products as long as reasonable precautions prevent bulk downloads of the data set by third parties. Run this actor only with your own licensed key and keep the rows within your licence. This actor is not affiliated with or endorsed by Ballotpedia or the Lucy Burns Institute.
