Us Race Matchups

v0.2.1
io.github.pipeworx-io/us-race-matchups Checked 2 days ago Published 27 days ago

US race matchups — one call per federal race: who holds the seat, who is running, which of them…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

race_matchup

One US House district or Senate seat: who the sitting officeholder is (incumbent, with seeking_reelection and incumbent_note saying whether they are actually on the ballot or the seat is open), every FEC-registered candidate by party with money raised/spent/cash on hand, which candidates won their primary, primary and general election dates. Primary vote counts come from Wikipedia (non-official, labelled as such, cites the state election authority); money and incumbency are FEC. A district that does not exist returns an error naming the districts that do.

ParameterTypeDescription
office *string"house" or "senate".
state *stringUS state: postal code ("IA") or full name ("Iowa").
cyclenumberElection year, even. Default 2026.
districtstringHouse district number (1, "01") or "at-large". Required for house, ignored for senate.
specialbooleanSenate only: read the special-election primary page (Ohio and Florida in 2026).

list_races

Every federal race in a state for a cycle (the Senate seat if any, and each House district) with how many distinct people registered with the FEC and who the sitting officeholder is (incumbent; incumbent_note says when the seat is open and they are not a candidate). Use it to find the district number before calling race_matchup.

ParameterTypeDescription
state *stringUS state: postal code ("IA") or full name.
cyclenumberElection year, even. Default 2026.
officestringOptional: "house" or "senate" to restrict.