Data dictionaries

Contest

One race or question on the ballot: an office to fill, a measure to pass, or a judge to keep.

Returned by
GET /v1/contests, GET /v1/contests/{id}, GET /v1/elections/{slug}/export
Found in
Endorsement (contest), Election export (JSON) (contests)
Shapes
The full record is in GET /v1/contests/{id}. The shorter forms in GET /v1/contests, an endorsement’s contest and the export leave some fields out; a field that isn’t in every form says where it is.

How it connects

  • A contest belongs to one election and is voted in one district.
  • Its choices are the lines a voter can mark, in ballot order; each endorser’s position points at those choices by choice_id.
  • Every endorsement (GET /v1/endorsements) names its contest by id.

Good to know

  • Every contest is on the printed ballot, worded as printed. Where a state leaves unopposed races off the ballot, so do we.
  • office, race_type and partisan are null for a measure; topics is empty for a candidate contest.
  • ballot_text is the measure’s printed wording and is null where we don’t have it yet; description may be a summary.
  • result is null until a source publishes one. Results are read again every day until they are certified.
  • endorsements (GET /v1/contests/{id} only) lists only endorsers who took a position; an endorser with no entry took none.

Fields

FieldTypeMeaningExample
idintegerContest id.92
titlestringTitle as printed on the ballot.Member of City Council, District 1, City of Berkeley
short_titlestringor nullShorter title.Berkeley Council, D1
kindstringcandidate (an office), measure (a proposition) or retention (keep a judge?).candidate, measure, retention meaningscandidate
vote_methodstringHow votes are cast: plurality (vote for one), multi_seat (vote for up to votes_allowed), ranked_choice (rank up to ranks_allowed), approval, or yes_no.plurality, multi_seat, ranked_choice, approval, yes_no meaningsranked_choice
votes_allowedintegeror nullHow many choices a voter may mark (vote for N).1
ranks_allowedintegeror nullRanked choice: how many choices a voter may rank.5
measure_codestringor nullThe measure’s letter or number: “K”, “Prop 1”.5
descriptionstringor nullA short description or question. For a measure with ballot_text, often a summary.Changes Recall Election Process for Statewide Officers
ballot_textstringor nullA measure’s wording exactly as printed on the ballot; null where we don’t have it yet.CHANGES RECALL ELECTION PROCESS FOR STATEWIDE OFFICERS. LEGISLATIVE CONSTITUTIONAL AMENDM…
full_text_urlstringor nullURLThe official full text of a measure.https://vig.cdn.sos.ca.gov/2026/general/pdf/prop5-text-proposed-laws.pdf
unopposedbooleanA candidate contest with no more candidates still running than seats (the same rule endorsedby.org uses). Always false for measures.true
ballot_orderintegeror nullPosition on the printed ballot.151
partyPartyor nullFor a party primary, the party.—
detailsobjectFacts about the contest. Only keys that apply are present.—
details.uncontestedbooleanoptionalOnly one candidate is running.—
details.nonpartisanbooleanoptionalCandidates appear without a party.—
details.measure_typestringoptionalWhat kind of measure, as the election office classes it.105 values so far: meaningslegislative constitutional amendment
details.vote_requiredstringoptionalShare of the vote needed to pass, e.g. "2/3" or "55%".—
details.majority_requiredbooleanoptionalA candidate needs a majority to win outright (else a runoff).—
details.amountnumberoptionalDollar amount of a bond or tax measure.—
details.termstringoptionalLength of the term, e.g. "4 years".—
details.short_termbooleanoptionalThe seat is for the remainder of an unexpired term.—
details.justicestringoptionalThe judge or justice a retention question is about.Kelli M. Evans
details.runoff_datestringoptionalYYYY-MM-DDDate of a runoff, if one is needed.—
details.stagestringoptionalWhich round of a multi-round contest this is.open_primary, runoff, general, … meanings—
details.elected_at_largebooleanoptionalElected by the whole jurisdiction, not by district.—
details.none_of_thesebooleanoptionalThe ballot offers “None of these candidates” (Nevada).—
details.primary_nominatingbooleanoptionalThe primary nominates a party’s candidate.—
details.winnersintegeroptionalNumber of winners, where it differs from votes_allowed.—
details.ref_typestringoptionalKind of referendum.nonrecurring, debt, operating, other, … meanings—
details.party_lines_unverifiedbooleanoptionalThe candidates are known, but their party lines haven’t been checked against a printed ballot yet.—
details.question_wordingstringoptionalHow description relates to the printed question.notice, … meanings—
source_urlstringor nullURLThe official source the contest was loaded from.—
officeobjector nullThe office a candidate or retention contest fills; null for a measure.—
office.typestringThe office, normalized across states: us_representative, governor, state_senator, mayor, school_board, trial_court, sheriff, …51 values: meaningscity_council
office.levelstringLevel of government the office belongs to (state courts are state, whatever district they sit in).federal, state, local meaningslocal
office.branchstringBranch of government.executive, legislative, judicial meaningslegislative
race_typestringor nullregular (a full term), special (the rest of an unexpired term, or a special election), recall, or retention (keep a judge?); null for a measure.regular, special, recall, retention meaningsregular
partisanbooleanor nullCandidates run with a party label on the ballot; null for a measure or retention question.true
topicsarray of stringA measure’s topics (GET /v1/measure-topics), assigned by rule from its title, summary and wording; empty for candidate contests.36 values: meanings["housing","elections","government"]
districtDistrictThe district a contest is voted in.—
resultContest resultor nullThe election result, once a source has one; null before then.—
electionElectionThe election the contest is in.Not in the export.—
choicesarray of ChoiceEvery choice, in ballot order.Only in GET /v1/contests/{id} and GET /v1/contests.—
endorsementsarray of PositionEvery (matching) endorser’s position, by endorser name.Only in GET /v1/contests/{id}.—

Download every dictionary as CSV or JSON.

Contest data dictionary · BallotData API