Election Race Summary
election_race_summaryAggregated summary of a U.S. election race -- total votes, each candidate's vote share, the winner and the winning margin -- for one state/year/office. Uses the most aggregated level actually available for that race: a statewide/district number when MEDSL or FEC data covers it (President/Senate nationwide 1976-2024; House nationwide for 2020+2022 by FEC), otherwise summed from whatever county/precinct detail exists (OpenElections). For a district office (House) returns one summary per district. Use for "who won the 2024 PA Senate race and by how much" rather than reading every county row yourself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | Election year, e.g. 2024. | |
| state | Yes | US state, postal code ("PA") or full name ("Pennsylvania"). | |
| office | Yes | "president", "senate", or "house". |