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
| Record | What one is | Fields |
|---|---|---|
| Elections and ballots | ||
| Election | One election in one state on one day: a general, a primary, a runoff or a special election. | 25 |
| Contest | One race or question on the ballot: an office to fill, a measure to pass, or a judge to keep. | 46 |
| Choice | One line a voter can mark in a contest: a candidate, or a Yes or No answer to a measure or retention question. | 16 |
| District | The 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 result | The vote count of one contest, with its source. Each choice’s own votes are on the choice. | 27 |
| Party | A political party, as printed beside a candidate or as an endorser’s party. | 3 |
| Measure topic | A subject ballot measures are tagged with. | 2 |
| State | A state, or the District of Columbia. | 3 |
| Candidates and officeholders | ||
| Candidate | A person on the ballot, with the contests they run in, how to reach them, campaign finance and where they stand on issues. | 81 |
| Issue | A policy issue we record candidates’ positions on, framed as a yes or no question. | 4 |
| Issue position | Where one candidate stands on one issue, with a neutral summary, their own words where we have them, and the sources. | 24 |
| Officeholder | Who holds a seat now: a governor, a member of Congress or a state legislator. | 32 |
| Endorsements | ||
| Endorser | An organization or person that endorses: a union, a newspaper, a party, an advocacy group or an elected official. | 15 |
| Position | One endorser’s position in one contest: the choice, choices or ranking they endorsed. | 2 |
| Endorsement | One endorser endorsing one choice in one contest, with what they said and where they published it. | 33 |
| Endorsement history | One change to one endorsement: created, updated or deleted, with its values before and after. | 17 |
| Change | One entry in the feed of every endorsement added, changed or deleted, for keeping a copy up to date. | 31 |
| Endorser category | A 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 |
| Coverage | How much data we have for one state. | 11 |
| Error | What every endpoint returns when a request fails. | 4 |
| Endorsement Stream | ||
| Stream event | One endorsement change as the Endorsement Stream delivers it, by Server-Sent Events, polling, email, file or postback. | 57 |
| Subscription | A 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_mailisall_mailinsidedetails;choices[].idis theidof each item in thechoicesarray. - Type
string,integer,number,boolean,objector an array of one of them, or another record (a link to its dictionary). or null means the value can benull; optional means the key itself is present only when it applies, as indetails. 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.
| Column | Type | Meaning | Example |
|---|---|---|---|
election_slug | string | The election’s slug, the same on every row.From election.slug in the JSON export. | ca-2026-11-03-general |
election_date | stringYYYY-MM-DD | Election day.From election.date in the JSON export. | 2026-11-03 |
contest_id | integer | Contest id (GET /v1/contests/{id}).From contests[].id in the JSON export. | 225 |
contest_title | string | Contest title as printed on the ballot.From contests[].title in the JSON export. | United States Representative, District 44 |
contest_kind | string | candidate, measure or retention.candidate, measure, retention meaningsFrom contests[].kind in the JSON export. | candidate |
vote_method | string | How 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_allowed | integercan be empty | How many choices a voter may mark (vote for N).From contests[].votes_allowed in the JSON export. | 1 |
ranks_allowed | integercan be empty | Ranked choice: how many choices a voter may rank.From contests[].ranks_allowed in the JSON export. | 5 |
measure_code | stringcan be empty | A measure’s letter or number.From contests[].measure_code in the JSON export. | 37 |
district_id | integer | The contest’s district id.From contests[].district.id in the JSON export. | 170 |
district_name | string | The district’s name.From contests[].district.name in the JSON export. | California Congressional District 44 |
district_level | string | The district’s level of government.federal, state, county, city, school, special meaningsFrom contests[].district.level in the JSON export. | federal |
district_ocd_id | stringcan be empty | The district’s Open Civic Data division id.From contests[].district.ocd_id in the JSON export. | ocd-division/country:us/state:ca/cd:44 |
state | stringcan 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_id | integer | The choice endorsed.From contests[].endorsements[].picks[].choice_id in the JSON export. | 783 |
choice_label | string | That 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_answer | stringcan be empty | yes or no for a measure; empty for a candidate.yes, no meaningsFrom contests[].endorsements[].picks[].measure_answer in the JSON export. | yes |
candidate_id | integercan be empty | The endorsed candidate’s id (GET /v1/candidates/{id}); empty for a measure.From contests[].choices[].candidate.id in the JSON export. | 392 |
candidate_name | stringcan be empty | The endorsed candidate’s full name; empty for a measure.From contests[].choices[].candidate.full_name in the JSON export. | Nanette Diaz Barragán |
party | stringcan be empty | The 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 |
incumbent | booleancan be empty | true 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 |
withdrawn | boolean | true when the candidate withdrew but is still printed on the ballot.From contests[].choices[].withdrawn in the JSON export. | false |
endorsement_id | integer | Endorsement id (GET /v1/endorsements/{id}).From contests[].endorsements[].picks[].endorsement_id in the JSON export. | 2128 |
endorser_id | integer | Endorser id.From contests[].endorsements[].endorser.id in the JSON export. | 23 |
endorser_slug | string | Endorser slug (GET /v1/endorsers/{slug}).From contests[].endorsements[].endorser.slug in the JSON export. | california-democratic-party |
endorser_name | string | Endorser name.From contests[].endorsements[].endorser.name in the JSON export. | California Democratic Party |
endorser_category | string | The endorser’s category slug.editorial, labor, environment, business, party, club, community, officials, … meaningsFrom contests[].endorsements[].endorser.category.slug in the JSON export. | party |
endorser_state | stringcan 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 |
rank | integercan be empty | Ranked choice: 1 for first choice, 2 for second, and so on; empty otherwise.From contests[].endorsements[].picks[].rank in the JSON export. | 1 |
statement | stringcan be empty | What the endorser said about it.From contests[].endorsements[].picks[].statement in the JSON export. | — |
source_url | stringcan be emptyURL | Where 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_on | stringcan be emptyYYYY-MM-DD | When it was published.From contests[].endorsements[].picks[].published_on in the JSON export. | — |
added_by | string | How 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_votes | integercan be empty | Votes for the endorsed choice; empty until the contest has a result.From contests[].choices[].result.votes in the JSON export. | 147571 |
choice_vote_pct | numbercan be empty | The endorsed choice’s share of the vote, 0 to 100.From contests[].choices[].result.vote_pct in the JSON export. | 81.725 |
choice_winner | booleancan be empty | true 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_status | stringcan be empty | unofficial or certified; empty until the contest has a result.unofficial, certified meaningsFrom contests[].result.status in the JSON export. | unofficial |
result_source_kind | stringcan be empty | Where the result comes from: official, compiled or party.official, compiled, party meaningsFrom contests[].result.source_kind in the JSON export. | official |
result_total_votes | integercan be empty | Votes cast in the contest.From contests[].result.total_votes in the JSON export. | 180571 |
result_source_url | stringcan be emptyURL | Where the result was published.From contests[].result.source.url in the JSON export. | https://api.sos.ca.gov/returns/us-rep/district/44 |