SourcesThe data family
electiondata.dev
Free, versioned US election returns: county presidential results from 2000 and House and Senate results from 1976, republished from the MIT Election Data and Science Lab with citable URLs.
What it is
electiondata.dev is a free public-data site for US election returns. It republishes the MIT Election Data and Science Lab’s (MEDSL) results files as plain files and a simple API, with no key or signup. Like this site, it’s run by Eric Ness.
It doesn’t count any votes itself. MEDSL compiles the results; the site reshapes them and keeps, on every row, the date MEDSL finalized it. The data is in the public domain (CC0), and the site gives the exact credit line for each file.
What it measures
The site has three datasets, each a table with one row per candidate.
- County presidential results, 2000–2024. Votes by county for every presidential election, with each county’s total presidential vote.
- US House results, 1976–2024. District returns for every House election, including special elections, one row per candidate per ballot line.
- US Senate results, 1976–2024. Statewide returns for every Senate election, including specials and runoffs, one row per candidate per ballot line.
The House and Senate tables keep a candidate’s votes on each ballot line and also a candidate_total_votes column that adds them up, which matters in states with fusion voting, where one candidate can run on several party lines. A writein flag marks write-ins and an unofficial flag marks rows MEDSL took from unofficial results. The site lists the House and Senate tables as updating every two years and the presidential table every four. It says certified 2026 results are to follow.
What the site adds: one schema and one place-ID scheme across all its sister sites (us-ca for states, us-county- plus the FIPS code for counties), files in JSON, CSV and Parquet, one file per election year, a version for every update, and checks before each one is published.
What it misses
MEDSL isn’t the official count. Certified results come from the states: state law sets the canvass and certification process, and a statewide body certifies the results. MEDSL compiles those returns into one format. For a close race, a recount or a legal question, go to the state’s certified results.
Some rows aren’t final. In the Senate table, 21 of about 3,900 rows were flagged as taken from unofficial results when checked. Filter on the unofficial column if that matters to you.
Uncontested races can have no count. Where MEDSL has no reported count for an uncontested race, the votes are null. In the 2024 House table, two candidates (in Florida’s 20th and Oklahoma’s 3rd districts) have no vote count. Any total that adds up House votes, such as a statewide House popular vote, is pulled toward the party that holds the uncontested seats. The site’s own House margin indicator says so.
Not every unit is a county. In the 2024 presidential table, Alaska is reported by district rather than by borough, and a few Missouri units have no county code. Where MEDSL reports a county only by voting method, the site adds the methods up and sets a from_modes flag.
Votes cast isn’t turnout. The site has no count of eligible voters, so it can’t give turnout rates.
It’s a copy, with its own window. County presidential data starts in 2000. Primaries, state and local races aren’t here. For anything high-stakes, check the figure against MEDSL’s file and the state’s certified results.
How to access it
1Browse the datasets
Start at electiondata.dev/datasets/. Each dataset page shows its schema, license, credit line and every endpoint, with a preview of the rows.
2Download the whole dataset
Each dataset is available as one CSV or Parquet file, at /v1/{dataset}/download/{dataset}.csv (or .parquet). Parquet keeps column types and is much smaller.
3Call the API
The base URL is https://api.electiondata.dev/v1. The catalog at /v1/catalog lists every dataset with its current version and coverage. Each table is split into one file per election year, at /v1/{dataset}/table/{year}.json (or .csv).
For example, https://api.electiondata.dev/v1/senate-results/table/2024.json returns every 2024 Senate candidate. Tested on 2026-11-14, it returned 148 rows; Montana’s four rows showed Tim Sheehy with 319,682 votes and Jon Tester with 276,305, out of 607,262.
4Read the docs
The docs cover the URL scheme, place IDs, formats, versions, caching and errors. The API reference lists the exact URLs for each dataset. Without a key you can make 120 requests a minute; for large pulls, download the bulk file instead.
How to cite it
Cite MEDSL with the exact text the site gives on each dataset page and on its sources page: it names the dataset’s DOI on Harvard Dataverse and the Dataverse version, such as V8 for the Senate file. Then cite the electiondata.dev version you used.
Every update gets a version ID: the publish date plus the start of a hash, such as 2026-10-25.247421eda6. Put it after the dataset ID with @ to pin it: a pinned URL always returns the same data. The site says to cite the monthly snapshots, the first version of each month, because those are kept permanently. Other versions may be removed after 30 days. /v1/{dataset}/versions lists them.
A worked example, for the 2024 Senate results in the October 2026 snapshot:
MIT Election Data and Science Lab, 2017, “U.S. Senate statewide 1976–2024,” https://doi.org/10.7910/DVN/PEJ5QU, Harvard Dataverse, V8. Retrieved via electiondata.dev, senate-results version 2026-10-25.247421eda6, https://api.electiondata.dev/v1/senate-results@2026-10-25.247421eda6/table/2024.csv, accessed 14 November 2026.
Sources & further reading
End of page · Back to top