Data dictionaries

Candidate background

Whether a candidate held elected office before, and which, their gender and their military service, each with its source.

Returned by
GET /v1/candidates, GET /v1/candidates/{id}
Found in
Candidate (background)
Shapes
The full record is in a candidate’s background. The shorter forms in each fact leave some fields out; a field that isn’t in every form says where it is.

How it connects

  • On every candidate as background; with format=csv, GET /v1/candidates has held_elected_office, prior_offices, gender and veteran.

Good to know

  • Only as our own results, our officeholder records (Open States, CC0), an official roster (the Congressional Directory, a U.S. government work, and the congress-legislators list, CC0) or the candidate’s own words state it. Never inferred from a name or a photo.
  • A null means unknown, not no: we never record that someone did not hold office or did not serve.
  • Coverage is fullest for federal and statewide candidates; most local candidates have none.
  • We don’t collect race, ethnicity, religion or sexual orientation.

Fields

FieldTypeMeaningExample
held_elected_officebooleanor nulltrue when the candidate held elected office before (our results, officeholder records or an official roster show it); null where we don’t know. Never false: no source shows a negative.Only in a candidate’s background.true
prior_officesarray of stringElected offices the candidate held, by title. Empty where we know of none.Only in a candidate’s background.["U.S. Representative, District 31","United States Representative, District 31","United S…
genderstringor nullwoman, man or nonbinary, only where an official roster or the candidate’s own words state it; null otherwise. Never inferred from a name or a photo.woman, man, nonbinary meaningsOnly in a candidate’s background.man
veteranbooleanor nulltrue when an official roster or the candidate’s own words say they served in the U.S. armed forces; null otherwise (not false).Only in a candidate’s background.true
sourcesarray of Candidate backgroundEvery fact above, each with its source.Only in a candidate’s background.—
attributestringWhich fact: held_elected_office, prior_office, gender or veteran.held_elected_office, prior_office, gender, veteran meaningsOnly in each fact.gender
valuestringThe value: true, an office title, or woman, man or nonbinary.Only in each fact.man
basisstringWhat it rests on: our_results, officeholder_record, official_roster or candidate_statement.our_results, officeholder_record, official_roster, candidate_statement meaningsOnly in each fact.official_roster
quotestringor nullThe candidate’s own words, one sentence, for a candidate_statement (or the roster’s words for military service).Only in each fact.military service: U.S. Navy 1989-90, 1994-2004
sourceobjectThe source of the fact.Only in each fact.—
source.namestringWho published the fact.Only in each fact.congress-legislators project (CC0), bio.gender
source.urlstringURLWhere the fact was published.Only in each fact.https://unitedstates.github.io/congress-legislators/legislators-current.json
retrieved_onstringYYYY-MM-DDWhen we read it from the source.Only in each fact.2026-11-14

Download every dictionary as CSV or JSON.

Sample (JSON)

One candidate background as the API returns it, in a candidate’s background. More in the sample data.

{
  "held_elected_office": true,
  "prior_offices": [
    "U.S. Representative, District 31",
    "United States Representative, District 31",
    "United States Representative, District 39"
  ],
  "gender": "man",
  "veteran": true,
  "sources": [
    {
      "attribute": "gender",
      "value": "man",
      "basis": "official_roster",
      "quote": null,
      "source": {
        "name": "congress-legislators project (CC0), bio.gender",
        "url": "https://unitedstates.github.io/congress-legislators/legislators-current.json"
      },
      "retrieved_on": "2026-11-14"
    },
    {
      "attribute": "held_elected_office",
      "value": "true",
      "basis": "our_results",
      "quote": null,
      "source": {
        "name": "MIT Election Data and Science Lab, from official returns",
        "url": "https://dataverse.harvard.edu/file.xhtml?fileId=13731130"
      },
      "retrieved_on": "2026-11-14"
    },
    {
      "attribute": "prior_office",
      "value": "U.S. Representative, District 31",
      "basis": "officeholder_record",
      "quote": null,
      "source": {
        "name": "Open States officeholder record",
        "url": "https://ballotpedia.org/Gil_Cisneros"
      },
      "retrieved_on": "2026-11-14"
    },
    {
      "attribute": "prior_office",
      "value": "United States Representative, District 31",
      "basis": "our_results",
      "quote": null,
      "source": {
        "name": "MIT Election Data and Science Lab, from official returns",
        "url": "https://dataverse.harvard.edu/file.xhtml?fileId=13731130"
      },
      "retrieved_on": "2026-11-14"
    },
    {
      "attribute": "prior_office",
      "value": "United States Representative, District 39",
      "basis": "our_results",
      "quote": null,
      "source": {
        "name": "Federal Election Commission, Federal Elections 2018 (official results)",
        "url": "https://www.fec.gov/resources/cms-content/documents/federalelections2018.xlsx"
      },
      "retrieved_on": "2026-11-14"
    },
    {
      "attribute": "veteran",
      "value": "true",
      "basis": "official_roster",
      "quote": "military service: U.S. Navy 1989-90, 1994-2004",
      "source": {
        "name": "Congressional Directory for the 119th Congress (February 20, 2026), Joint Committee on Printing",
        "url": "https://www.govinfo.gov/app/details/CDIR-2026-02-20"
      },
      "retrieved_on": "2026-11-14"
    }
  ]
}
Candidate background data dictionary · BallotData API