Data dictionaries

Ballot at an address

The ballot at one street address: the districts it is in, and the contests on each election’s ballot there.

Returned by
POST /v1/ballot
Shapes
The full record is in POST /v1/ballot. The shorter forms in each election, each contest, each choice, each district and the request leave some fields out; a field that isn’t in every form says where it is.

How it connects

  • Each contest is in brief; GET /v1/contests/{id} has it in full with every endorser’s position, and GET /v1/candidates/{id} has a choice’s candidate.
  • A contest’s district_id is one of districts[].id.

Good to know

  • The address is found with the U.S. Census Bureau’s geocoder and used for that request only. It is never stored.
  • Districts are today’s: an address is matched on the current congressional and legislative maps, so a past election in an area that was redistricted can show the wrong district’s contests.
  • elections is empty when we have no contests at the address, and districts lists only districts we have.
  • Contests in a state or election the account hasn’t bought are counted in contests_outside_purchase and left out.

Fields

FieldTypeMeaningExample
statestringor nullTwo capital letters (USPS code)The state the address is in.Only in POST /v1/ballot and each district.CA
matched_addressstringor nullThe address as the Census Bureau’s geocoder matched it, to check it is the right place; null for a point.Only in POST /v1/ballot.1 DR CARLTON P GOODLETT PL, SAN FRANCISCO, CA, 94102
districtsarray of Ballot at an addressEvery district we have that the address is in, on today’s lines, from federal down to special districts.Only in POST /v1/ballot.—
electionsarray of Ballot at an addressThe elections with contests at the address, earliest first. Empty when we have none for it.Only in POST /v1/ballot and the request.—
electionElectionThe election the contest is in.Only in each election.—
contestsarray of Ballot at an addressThe contests on this ballot, in ballot order: federal, state, then local offices, then measures.Only in each election.—
contests_outside_purchaseintegerContests on this ballot in a state or election your account hasn’t bought: counted, not shown.Only in each election.0
idintegerContest id: GET /v1/contests/{id} has the contest in full, with every endorser’s position.Only in each contest, each choice and each district.14
slugstringContest slug.Only in each contest and each choice.ca-2026-11-03-general/united-states-representative-district-11
titlestringTitle as printed on the ballot.Only in each contest.United States Representative, District 11
short_titlestringor nullShorter title.Only in each contest.U.S. Representative
kindstringcandidate (an office), measure (a proposition) or retention (keep a judge?).candidate, measure, retention meaningsOnly in each contest.candidate
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 meaningsOnly in each contest.plurality
votes_allowedintegeror nullHow many choices a voter may mark (vote for N).Only in each contest.1
ranks_allowedintegeror nullRanked choice: how many choices a voter may rank.Only in each contest.—
measure_codestringor nullThe measure’s letter or number: “K”, “Prop 1”.Only in each contest.5
officeobjector nullThe office a candidate or retention contest fills; null for a measure.Only in each contest.—
office.typestringThe office, normalized across states: us_representative, governor, state_senator, mayor, school_board, trial_court, sheriff, …51 values: meaningsOnly in each contest.us_representative
office.levelstringLevel of government the office belongs to (state courts are state, whatever district they sit in).federal, state, local meaningsOnly in each contest.federal
office.branchstringBranch of government.executive, legislative, judicial meaningsOnly in each contest.legislative
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 meaningsOnly in each contest.regular
partisanbooleanor nullCandidates run with a party label on the ballot; null for a measure or retention question.Only in each contest.true
partyPartyor nullFor a party primary, the party whose ballot it is on.Only in each contest, each choice and the request.Democratic
unopposedbooleanA candidate contest with no more candidates still running than seats. Always false for measures.Only in each contest.false
on_ballotbooleanPrinted on the ballot. false for a race the state or county left off, usually because it was unopposed and the candidates were declared elected; off_ballot_reason says why. endorsedby.org shows only contests on the ballot; filter with on_ballot=true for the same.Only in each contest and the request.true
off_ballot_reasonstringor nullWhy the contest is not on the ballot: unopposed or cancelled. null when on_ballot is true.unopposed, cancelled meaningsOnly in each contest.—
district_idintegerThe district it is voted in: one of districts[].id.Only in each contest.2
endorsement_countintegerEndorsers who took a position in this contest.Only in each contest and each choice.177
result_statusstringor nullunofficial or certified once a source has a result; null before then.unofficial, certified meaningsOnly in each contest.unofficial
choicesarray of Ballot at an addressEvery choice, in ballot order.Only in each contest.—
labelstringAs printed: the candidate’s ballot name, or Yes / No.Only in each choice.Connie Chan
measure_answerstringor nullyes or no for a measure or retention question; null for a candidate.yes, no meaningsOnly in each choice.yes
ballot_designationstringor nullOccupation line printed under the name, e.g. “Transit Planner”.Only in each choice.San Francisco Supervisor
incumbentbooleanor nullThe candidate holds this seat now: true or false where we know, null where we don’t yet (and for a measure answer).Only in each choice.false
withdrawnbooleanThe candidate withdrew but is still printed on the ballot.Only in each choice.false
candidate_idintegeror nullThe candidate (GET /v1/candidates/{id}); null for a measure answer.Only in each choice.1
winnerbooleanor nulltrue for a winner, false for a choice that lost, null when there is no result yet or it doesn’t say (GET /v1/contests/{id} has the votes).Only in each choice.—
ocd_idstringor nullOpen Civic Data division id, used in districts= filters.Only in each district.ocd-division/country:us/state:ca/cd:11
namestringDistrict name.Only in each district.California Congressional District 11
levelstringLevel of government.federal, state, county, city, school, special meaningsOnly in each district.federal
typestringKind of district: statewide, congressional, state_upper, state_lower, county, council, school, …151 values so far: meaningsOnly in each district.congressional
addressstringoptionalA street address with a house number, on one line: "1 Dr Carlton B Goodlett Pl, San Francisco, CA 94102". Include the city and state or the ZIP code. A ZIP code, city or state alone is refused. Send address, or latitude and longitude.Only in the request.—
latitudenumberoptionalLatitude of the place, instead of an address (WGS 84 degrees).Only in the request.—
longitudenumberoptionalLongitude of the place, with latitude.Only in the request.—
langstringoptionales for Spanish ballot text where the state publishes it; English otherwise.en, es meaningsOnly in the request.—

Download every dictionary as CSV or JSON.

Sample (JSON)

One ballot at an address as the API returns it, in POST /v1/ballot. More in the sample data.

{
  "state": "CA",
  "matched_address": "1 DR CARLTON P GOODLETT PL, SAN FRANCISCO, CA, 94102",
  "districts": [
    {
      "id": 2,
      "ocd_id": "ocd-division/country:us/state:ca/cd:11",
      "name": "California Congressional District 11",
      "level": "federal",
      "type": "congressional",
      "state": "CA"
    },
    {
      "id": 1,
      "ocd_id": "ocd-division/country:us/state:ca",
      "name": "California",
      "level": "state",
      "type": "statewide",
      "state": "CA"
    }
  ],
  "elections": [
    {
      "election": {
        "id": 1,
        "slug": "ca-2026-11-03-general",
        "name": "California General Election",
        "short_name": "CA General",
        "date": "2026-11-03",
        "state": "CA",
        "type": "general",
        "primary_system": "none",
        "info_url": "https://www.sf.gov/november-3-2026-consolidated-general-election",
        "details": {
          "consolidated_with": [
            "San Francisco Consolidated General Election"
          ]
        }
      },
      "contests": [
        {
          "id": 14,
          "slug": "ca-2026-11-03-general/united-states-representative-district-11",
          "title": "United States Representative, District 11",
          "short_title": "U.S. Representative",
          "kind": "candidate",
          "vote_method": "plurality",
          "votes_allowed": 1,
          "ranks_allowed": null,
          "measure_code": null,
          "office": {
            "type": "us_representative",
            "level": "federal",
            "branch": "legislative"
          },
          "race_type": "regular",
          "partisan": true,
          "party": null,
          "unopposed": false,
          "on_ballot": true,
          "off_ballot_reason": null,
          "district_id": 2,
          "endorsement_count": 177,
          "result_status": "unofficial",
          "choices": [
            {
              "id": 66,
              "slug": "ca-2026-11-03-general/united-states-representative-district-11/connie-chan",
              "label": "Connie Chan",
              "measure_answer": null,
              "party": "Democratic",
              "ballot_designation": "San Francisco Supervisor",
              "incumbent": false,
              "withdrawn": false,
              "candidate_id": 1,
              "endorsement_count": 99,
              "winner": null
            },
            {
              "id": 67,
              "slug": "ca-2026-11-03-general/united-states-representative-district-11/scott-wiener",
              "label": "Scott Wiener",
              "measure_answer": null,
              "party": "Democratic",
              "ballot_designation": "State Senator",
              "incumbent": false,
              "withdrawn": false,
              "candidate_id": 2,
              "endorsement_count": 78,
              "winner": null
            }
          ]
        },
        {
          "id": 1,
          "slug": "ca-2026-11-03-general/proposition-5-changes-recall-election-process-for-statewide-officers",
          "title": "Proposition 5: Changes Recall Election Process for Statewide Officers",
          "short_title": "Prop 5",
          "kind": "measure",
          "vote_method": "yes_no",
          "votes_allowed": 1,
          "ranks_allowed": null,
          "measure_code": "5",
          "office": null,
          "race_type": null,
          "partisan": null,
          "party": null,
          "unopposed": false,
          "on_ballot": true,
          "off_ballot_reason": null,
          "district_id": 1,
          "endorsement_count": 72,
          "result_status": "unofficial",
          "choices": [
            {
              "id": 104,
              "slug": "ca-2026-11-03-general/proposition-5-changes-recall-election-process-for-statewide-officers/yes",
              "label": "Yes",
              "measure_answer": "yes",
              "party": null,
              "ballot_designation": null,
              "incumbent": null,
              "withdrawn": false,
              "candidate_id": null,
              "endorsement_count": 56,
              "winner": null
            },
            {
              "id": 105,
              "slug": "ca-2026-11-03-general/proposition-5-changes-recall-election-process-for-statewide-officers/no",
              "label": "No",
              "measure_answer": "no",
              "party": null,
              "ballot_designation": null,
              "incumbent": null,
              "withdrawn": false,
              "candidate_id": null,
              "endorsement_count": 16,
              "winner": null
            }
          ]
        }
      ],
      "contests_outside_purchase": 0
    }
  ]
}
Ballot at an address data dictionary · BallotData API