Data dictionaries

Search match

One record that a name search found: an election, contest, person, candidate record, endorser or office, with the slug or id that gets it.

Returned by
GET /v1/search

How it connects

  • Pass an election’s slug in any elections= filter; a nationwide one (2026-11-03-general, 2026-11-03) stands for every election of that type, or every election, that day.
  • A person’s slug is the person= of GET /v1/candidates, and candidate_ids are their candidate records; an endorser’s or office’s slug goes in GET /v1/endorsers/{slug} or GET /v1/offices/{slug}; a contest’s or candidate record’s id in GET /v1/contests/{id} or GET /v1/candidates/{id}. path is that request.

Good to know

  • Endorsers, people and offices are searched in a copy of their names the API refreshes every few minutes, so one added in the last few minutes may not be found yet.
  • One page of the best matches: use types and states to narrow it, or the q of a list endpoint to page through every match of one kind.

Fields

FieldTypeMeaningExample
typestringWhat it is.election, contest, person, candidate, endorser, office meaningsoffice
slugstringor nullIts slug: an election’s (or a nationwide date and type, such as 2026-11-03-general), a contest’s, a person’s, an endorser’s or an office’s. null for a candidate record, which has an id.ga-state-senate-43
idintegeror nullIts id: a contest’s, a candidate record’s or an election’s. null for a person, endorser, office or nationwide date.10861
labelstringIts name: the election’s, the contest’s title, the person’s, the endorser’s or the office’s.Georgia Senate District 43
detailstringor nullA few words to tell matches apart: the state and date of an election, the district and election of a contest, a person’s latest contest, an endorser’s category and home state, an office’s seat and state.Georgia
statestringor nullTwo capital letters (USPS code)Its state; null for a national endorser or a nationwide date.GA
datestringor nullYYYY-MM-DDThe election date: the election’s, the contest’s, or a person’s or candidate’s latest.2026-11-03
pathstringThe API path that gets it (or, for an election, lists its contests)./v1/offices/ga-state-senate-43
candidate_idsarray of integeroptionalA person’s candidate records (GET /v1/candidates/{id}). Only on type person.—
matchintegerHow well it matched, best first: 0 the slug or whole name, 1 the name starts with the words, 2 every word starts a word of the name, 3 the words matched elsewhere (state, category, district, election, other names or candidates).2

Download every dictionary as CSV or JSON.

Sample (JSON)

One search match as the API returns it. More in the sample data.

{
  "type": "office",
  "slug": "ga-state-senate-43",
  "id": null,
  "label": "Georgia Senate District 43",
  "detail": "Georgia",
  "state": "GA",
  "date": null,
  "path": "/v1/offices/ga-state-senate-43",
  "match": 2
}
Search match data dictionary · BallotData API