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
slugin anyelections=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
slugis theperson=ofGET /v1/candidates, andcandidate_idsare their candidate records; an endorser’s or office’ssluggoes inGET /v1/endorsers/{slug}orGET /v1/offices/{slug}; a contest’s or candidate record’sidinGET /v1/contests/{id}orGET /v1/candidates/{id}.pathis 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
typesandstatesto narrow it, or theqof a list endpoint to page through every match of one kind.
Fields
| Field | Type | Meaning | Example |
|---|---|---|---|
type | string | What it is.election, contest, person, candidate, endorser, office meanings | office |
slug | stringor null | Its 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 |
id | integeror null | Its id: a contest’s, a candidate record’s or an election’s. null for a person, endorser, office or nationwide date. | 10861 |
label | string | Its name: the election’s, the contest’s title, the person’s, the endorser’s or the office’s. | Georgia Senate District 43 |
detail | stringor null | A 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 |
state | stringor nullTwo capital letters (USPS code) | Its state; null for a national endorser or a nationwide date. | GA |
date | stringor nullYYYY-MM-DD | The election date: the election’s, the contest’s, or a person’s or candidate’s latest. | 2026-11-03 |
path | string | The API path that gets it (or, for an election, lists its contests). | /v1/offices/ga-state-senate-43 |
candidate_ids | array of integeroptional | A person’s candidate records (GET /v1/candidates/{id}). Only on type person. | — |
match | integer | How 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
}