Data dictionaries

Election

One election in one state on one day: a general, a primary, a runoff or a special election.

Returned by
GET /v1/elections
Found in
Contest (election), Election export (JSON) (election)
Shapes
The full record is in GET /v1/elections. The shorter forms in a contest’s election leave some fields out; a field that isn’t in every form says where it is.

How it connects

  • An election has many contests: GET /v1/contests?elections={slug}, or the whole election at once with GET /v1/elections/{slug}/export.
  • The slug is stable and readable (<state>-<date>-<type>); use it in every elections= filter.

Good to know

  • details holds only the voting rules that apply, so most elections have one or two keys and some have none.
  • Past elections (November 2020, 2022, 2023, 2024 and 2025) are kept for their results and history and have details.historical set to true. upcoming=true leaves them out.
  • result_count rises as sources publish results; it is 0 for an upcoming election.

Fields

FieldTypeMeaningExample
idintegerElection id.1
slugstringElection slug, used in elections= filters: <state>-<date>-<type>.ca-2026-11-03-general
namestringElection name.California General Election
short_namestringor nullShorter name.CA General
datestringYYYY-MM-DDElection day.2026-11-03
statestringor nullTwo capital letters (USPS code)State; null for a multi-state election.CA
typestringKind of election.general, primary, special, special_primary, runoff, consolidated meaningsgeneral
primary_systemstringor nullHow the state runs primaries.none, closed, semi_closed, open, top_two, top_four, nonpartisan meaningsnone
info_urlstringor nullURLOfficial election page.https://www.sf.gov/november-3-2026-consolidated-general-election
detailsobjectVoting rules for the election. Only keys that apply are present.—
details.all_mailbooleanoptionalEvery voter is mailed a ballot.—
details.ranked_choicebooleanoptionalSome contests in this election use ranked choice voting.—
details.fusion_votingbooleanoptionalCandidates can appear on more than one party’s line (New York, Connecticut).—
details.partisan_primarybooleanoptionalA party primary.—
details.primarystringoptionalWhich primary, where a state holds several.—
details.consolidated_withstring or array of stringoptionalElections held on the same ballot: a name, or a list of names.["San Francisco Consolidated General Election"]
details.runoff_datestringoptionalYYYY-MM-DDDate of a runoff, if one is needed.—
details.runoff_election_datestringoptionalYYYY-MM-DDDate of the runoff election.—
details.top_two_primary_datestringoptionalYYYY-MM-DDDate of the top-two primary that chose these candidates.—
details.louisiana_open_primarybooleanoptionalLouisiana’s open (jungle) primary.—
details.notestringoptionalAnything else voters should know.—
details.historicalbooleanoptionalA past election kept for its results and history (the November 5, 2024 general, for example). Never shown to voters on endorsedby.org.true
contest_countintegerContests on the ballot.Only in GET /v1/elections.2477
endorsement_countintegerEndorsements in those contests.Only in GET /v1/elections.8156
result_countintegerContests on the ballot with a result.Only in GET /v1/elections.242

Download every dictionary as CSV or JSON.

Election data dictionary · BallotData API