Election Results
election_resultsCandidate-level U.S. election results for one state, year and office, at state, county, or precinct granularity. State-level President and Senate cover every state 1976-2024, including 2020 and 2022 (MIT Election Data + Science Lab / MEDSL, Harvard Dataverse, CC0). Official FEC district-by-district U.S. House results (FEC, "Federal Elections" statistical publication, public domain) cover the 2020 and 2022 general elections nationwide -- FEC has not yet published its compiled 2024 edition, and House is not otherwise available nationwide (MEDSL's own House file is guestbook-gated). County-level President/Senate/House results (OpenElections, county/state election-board certified counts) cover the 2024 general election in Georgia, Mississippi, New Mexico, North Dakota, South Dakota, Tennessee, Utah, West Virginia, Colorado, Missouri, Oregon, South Carolina and Kentucky; Pennsylvania and Michigan additionally keep true precinct-level rows. Pass state as a postal code ("PA") or full name ("Pennsylvania"), office as "president", "senate" or "house". For a House race, pass district (e.g. "09") to scope one district; omit it to get every district returned for that state/year. Use county to scope a county/precinct query (e.g. county="Allegheny"); omit it at level="county" to get every county in the state. Returns candidate, party, votes, the race total and the share of the vote, plus source/licence/data_as_of on every row. A state/year/office/level combination with no data returns a loud not-found (reason + available_levels hint), never an empty success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | Election year, e.g. 2024. | |
| level | No | Granularity: "state", "county", or "precinct". Default "county". FEC official House results are stored at level="state" (FEC publishes one final count per district, with no further sub-division). | |
| limit | No | Max rows, 1-500. Default 50. A truncated response carries truncated:true, total_matching, and a hint for narrowing (county, level="county"). | |
| state | Yes | US state, postal code ("PA") or full name ("Pennsylvania"). | |
| county | No | County name to scope a county- or precinct-level query (case-insensitive). Optional. | |
| office | Yes | "president", "senate", or "house". | |
| offset | No | Pagination offset. Default 0. | |
| district | No | House district to scope to one race, e.g. "09" or "9" (normalized to 2 digits). Optional; only meaningful for office="house". |