Data dictionaries

One dictionary for each kind of record the API returns. Each lists every field with its type, whether it is always present, whether it can be null, its format, what it means, the values a coded field takes and an example from real data, and says how the record connects to the others and what to watch for.

The dictionaries are built from the same description as /openapi.json and the API reference, so they always match what the API returns. Examples come from the sample data; what each coded value means is on Field values.

Download as CSV Download as JSON

The CSV has one row per field: record, field, type, always_present, nullable, format, description, values, value_set, example and where (which responses have it, when not all do). The JSON has the same, grouped by record, with each record’s endpoints, relations and notes.

Records

RecordWhat one isFields
Elections and ballots
ElectionOne election in one state on one day: a general, a primary, a runoff or a special election.25
ContestOne race or question on the ballot: an office to fill, a measure to pass, or a judge to keep.46
ChoiceOne line a voter can mark in a contest: a candidate, or a Yes or No answer to a measure or retention question.16
DistrictThe area a contest is voted in: a state, a congressional or legislative district, a county, a city, a ward or a school district.6
Contest resultThe vote count of one contest, with its source. Each choice’s own votes are on the choice.27
PartyA political party, as printed beside a candidate or as an endorser’s party.3
Measure topicA subject ballot measures are tagged with.2
StateA state, or the District of Columbia.3
Candidates and officeholders
CandidateA person on the ballot, with the contests they run in, how to reach them, campaign finance and where they stand on issues.81
IssueA policy issue we record candidates’ positions on, framed as a yes or no question.4
Issue positionWhere one candidate stands on one issue, with a neutral summary, their own words where we have them, and the sources.24
OfficeholderWho holds a seat now: a governor, a member of Congress or a state legislator.32
Endorsements
EndorserAn organization or person that endorses: a union, a newspaper, a party, an advocacy group or an elected official.15
PositionOne endorser’s position in one contest: the choice, choices or ranking they endorsed.2
EndorsementOne endorser endorsing one choice in one contest, with what they said and where they published it.33
Endorsement historyOne change to one endorsement: created, updated or deleted, with its values before and after.17
ChangeOne entry in the feed of every endorsement added, changed or deleted, for keeping a copy up to date.31
Endorser categoryA kind of endorser: labor, editorial, party, business and the rest.4
Exports and coverage
Election export (JSON)A whole election in one download: the election, then every contest with its choices, result and every endorser’s position.2
Election export (CSV)The election export as CSV: one row per endorsement, with its election, contest, district, choice and result.40
CoverageHow much data we have for one state.11
ErrorWhat every endpoint returns when a request fails.4
Endorsement Stream
Stream eventOne endorsement change as the Endorsement Stream delivers it, by Server-Sent Events, polling, email, file or postback.57
SubscriptionA saved filter for the Endorsement Stream: which endorsements’ changes to send you.13

Reading a dictionary

Field
The field’s path from the record. details.all_mail is all_mail inside details; choices[].id is the id of each item in the choices array.
Type
string, integer, number, boolean, object or an array of one of them, or another record (a link to its dictionary). or null means the value can be null; optional means the key itself is present only when it applies, as in details. Every other field is always present.
Format
How a string is written: dates are YYYY-MM-DD, times are ISO 8601 with a time zone, and URLs are absolute. Amounts are in U.S. dollars and percentages run from 0 to 100, as each field says.
Values
For a coded field, the values it takes, linked to their meanings on Field values. Open sets come from election offices’ own classifications and can gain values.
Example
A real value from the sample data, or from the reference’s example where no sample has one.

Election export (CSV)

GET /v1/elections/{slug}/export?format=csv has one row per endorsement (per endorser and choice, so a ranked-choice ranking is a row per rank), each repeating its election, contest, district and choice. Contests no one endorsed in have no rows; the JSON export has every contest. An empty cell is a null or a missing value: no candidate on a measure, no result yet.

ColumnTypeMeaningExample
election_slugstringThe election’s slug, the same on every row.From election.slug in the JSON export.ca-2026-11-03-general
election_datestringYYYY-MM-DDElection day.From election.date in the JSON export.2026-11-03
contest_idintegerContest id (GET /v1/contests/{id}).From contests[].id in the JSON export.225
contest_titlestringContest title as printed on the ballot.From contests[].title in the JSON export.United States Representative, District 44
contest_kindstringcandidate, measure or retention.candidate, measure, retention meaningsFrom contests[].kind in the JSON export.candidate
vote_methodstringHow votes are cast: plurality, multi_seat, ranked_choice, approval or yes_no.plurality, multi_seat, ranked_choice, approval, yes_no meaningsFrom contests[].vote_method in the JSON export.plurality
votes_allowedintegercan be emptyHow many choices a voter may mark (vote for N).From contests[].votes_allowed in the JSON export.1
ranks_allowedintegercan be emptyRanked choice: how many choices a voter may rank.From contests[].ranks_allowed in the JSON export.5
measure_codestringcan be emptyA measure’s letter or number.From contests[].measure_code in the JSON export.37
district_idintegerThe contest’s district id.From contests[].district.id in the JSON export.170
district_namestringThe district’s name.From contests[].district.name in the JSON export.California Congressional District 44
district_levelstringThe district’s level of government.federal, state, county, city, school, special meaningsFrom contests[].district.level in the JSON export.federal
district_ocd_idstringcan be emptyThe district’s Open Civic Data division id.From contests[].district.ocd_id in the JSON export.ocd-division/country:us/state:ca/cd:44
statestringcan be emptyTwo capital letters (USPS code)The district’s state (the election’s state where the district has none).From contests[].district.state in the JSON export.CA
choice_idintegerThe choice endorsed.From contests[].endorsements[].picks[].choice_id in the JSON export.783
choice_labelstringThat choice as printed: the candidate’s ballot name, or Yes or No.From contests[].endorsements[].picks[].label in the JSON export.Nanette Diaz Barragán
measure_answerstringcan be emptyyes or no for a measure; empty for a candidate.yes, no meaningsFrom contests[].endorsements[].picks[].measure_answer in the JSON export.yes
candidate_idintegercan be emptyThe endorsed candidate’s id (GET /v1/candidates/{id}); empty for a measure.From contests[].choices[].candidate.id in the JSON export.392
candidate_namestringcan be emptyThe endorsed candidate’s full name; empty for a measure.From contests[].choices[].candidate.full_name in the JSON export.Nanette Diaz Barragán
partystringcan be emptyThe party as printed beside the name (party_label where there is one, else the party’s name).From contests[].choices[].party_label in the JSON export.Democratic
incumbentbooleancan be emptytrue when the candidate holds the seat now, false when not, empty where we don’t know.From contests[].choices[].incumbent in the JSON export.true
withdrawnbooleantrue when the candidate withdrew but is still printed on the ballot.From contests[].choices[].withdrawn in the JSON export.false
endorsement_idintegerEndorsement id (GET /v1/endorsements/{id}).From contests[].endorsements[].picks[].endorsement_id in the JSON export.2128
endorser_idintegerEndorser id.From contests[].endorsements[].endorser.id in the JSON export.23
endorser_slugstringEndorser slug (GET /v1/endorsers/{slug}).From contests[].endorsements[].endorser.slug in the JSON export.california-democratic-party
endorser_namestringEndorser name.From contests[].endorsements[].endorser.name in the JSON export.California Democratic Party
endorser_categorystringThe endorser’s category slug.editorial, labor, environment, business, party, club, community, officials, … meaningsFrom contests[].endorsements[].endorser.category.slug in the JSON export.party
endorser_statestringcan be emptyTwo capital letters (USPS code)The endorser’s home state; empty for a national endorser.From contests[].endorsements[].endorser.state in the JSON export.CA
rankintegercan be emptyRanked choice: 1 for first choice, 2 for second, and so on; empty otherwise.From contests[].endorsements[].picks[].rank in the JSON export.1
statementstringcan be emptyWhat the endorser said about it.From contests[].endorsements[].picks[].statement in the JSON export.—
source_urlstringcan be emptyURLWhere the endorsement was published.From contests[].endorsements[].picks[].source_url in the JSON export.https://cadem.org/wp-content/uploads/2026/08/FINAL-2026-General-Election-Endorsements.pdf
published_onstringcan be emptyYYYY-MM-DDWhen it was published.From contests[].endorsements[].picks[].published_on in the JSON export.—
added_bystringHow the endorsement got here: automatic, staff or data_load.automatic, staff, data_load meaningsFrom contests[].endorsements[].picks[].added_by in the JSON export.data_load
choice_votesintegercan be emptyVotes for the endorsed choice; empty until the contest has a result.From contests[].choices[].result.votes in the JSON export.147571
choice_vote_pctnumbercan be emptyThe endorsed choice’s share of the vote, 0 to 100.From contests[].choices[].result.vote_pct in the JSON export.81.725
choice_winnerbooleancan be emptytrue when the endorsed choice won, false when it lost, empty when not decided or not stated.From contests[].choices[].result.winner in the JSON export.—
result_statusstringcan be emptyunofficial or certified; empty until the contest has a result.unofficial, certified meaningsFrom contests[].result.status in the JSON export.unofficial
result_source_kindstringcan be emptyWhere the result comes from: official, compiled or party.official, compiled, party meaningsFrom contests[].result.source_kind in the JSON export.official
result_total_votesintegercan be emptyVotes cast in the contest.From contests[].result.total_votes in the JSON export.180571
result_source_urlstringcan be emptyURLWhere the result was published.From contests[].result.source.url in the JSON export.https://api.sos.ca.gov/returns/us-rep/district/44
Data dictionaries · BallotData API