Elections API

API behavior, limitations and terminology, unless specified otherwise:

Jump to:

Home

Get a pre-selected group of results for an election on a specific date
/:election_date/home
/2018-11-06/home

Includes President (state candidate summary, top candidates, and Minnesota results), US Senate (results, map, balance of power), US House (results, map, balance of power), Governor (results, map, balance of power), balance of power for Minnesota Senate and House, Attorney General, Secretary of State, and Auditor results.

MPR News

Get a pre-selected group of results for the MPR News homepage for an election on a specific date
/:election_date/mprnews
/2018-11-06/mprnews

Includes results for important races for the most recent election.

Attorney General

Get the results of the Minnesota Attorney General race for a specific date
/:election_date/attorney_general_races
/2018-11-06/attorney_general_races

Auditor

Get the results of the Minnesota Auditor race for a specific date
/:election_date/auditor_races
/2018-11-06/auditor_races

Counties

Get the list of Minnesota counties with their county number
/:election_date/counties
/2016-11-08/counties
Get results for all races for a specific Minnesota county for a specific date
/:election_date/counties/:county_number
/2018-11-06/counties/27001

Governor

Get the results of the Minnesota Governor race for a specific date
/:election_date/governor_races
/2018-11-06/governor_races

Judicial

Get the results of judicial races for a specific date
/:election_date/judicial_races
/2018-11-06/judicial_races

Includes State Supreme Court, Court of Appeals, and District Court seats.

MN House

Get the results of the Minnesota House races for a specific date
/:election_date/mn_house_races
/2016-11-08/mn_house_races
Get the results of the Minnesota House races for one district on a specific date
/:election_date/mn_house_races/:seat_number
/2018-11-06/mn_house_races/12A

MN Senate

Get the results of the Minnesota Senate races for a specific date
/:election_date/mn_senate_races
/2016-11-08/mn_senate_races
Get the results of the Minnesota Senate races for one district on a specific date
/:election_date/mn_senate_races/:seat_number
/2018-11-06/mn_senate_races/5

National

Get the national balance of powers for a specific date
/:election_date/national_races
/2016-11-08/national_races

Includes US Senate, US House, and state Governor balance of powers.

Single Race

Get the results of a single race based off its oss race id for a specific date
/:election_date/races/:oss_race_id
/2022-11-08/races/980317659

President

Get the results of the US President race for a specific date
/:election_date/us_president_races
/2018-11-06/us_president_races

Secretary of State

Get the results of the Minnesota Secretary of State race for a specific date
/:election_date/secretary_of_state_races
/2018-11-06/secretary_of_state_races

Statewide

Get a pre-selected group of results for the great state of Minnesota on a specific date
/:election_date/statewide_races
/2018-11-06/statewide_races

Gives results and county level maps for Attorney General, Secretary of State, Auditor, and statewide amendments.

US House

Get the results of the US House races for a specific date
/:election_date/us_house_races
/2016-11-08/us_house_races
Get the results of the US House races for one district on a specific date
/:election_date/us_house_races/:seat_number
/2018-11-06/us_house_races/1

US Senate

Get the results of the US Senate races for a specific date
/:election_date/us_senate_races
/2016-11-08/us_senate_races

Presidential Primary Delegates

Get candidates' results and primary info for both parties for Presidential Primaries on a specific year
/:election_year/presidential_primary_delegates
/2020/presidential_primary_delegates
Get one candidate's results and the party's primary info for a Presidential Primary on a specific year
/:election_year/presidential_primary_delegates?candidate_id=:id
/2020/presidential_primary_delegates?candidate_id=51526
Get specific candidates' results and the parties' primary info for Presidential Primaries on a specific year
/:election_year/presidential_primary_delegates?candidate_id=:id1,:id2,:id3
/2020/presidential_primary_delegates?candidate_id=51526,8639
Get candidates' results and primary info for one party for Presidential Primaries on a specific year
/:election_year/presidential_primary_delegates?party=:party
/2024/presidential_primary_delegates?party=GOP

Current party options are case sensitive and include 'Dem' and 'GOP'.

Presidential Primary Races

Get candidates' results and primary info for both parties for Presidential Primaries on a specific year
/:election_year/presidential_primary_races
/2020/presidential_primary_races
Get one state's results and the parties' primary info for Presidential Primaries on a specific year
/:election_year/presidential_primary_races?state=:name
/2020/presidential_primary_races?state=California
/:election_year/presidential_primary_races?state_postal=:postal_code
/2020/presidential_primary_races?state_postal=AL

Current state/territory options are case sensitive.

Get specific states' results and the parties' primary info for Presidential Primaries on a specific year
/:election_year/presidential_primary_races?state=:name1,:name2,:name3
/2020/presidential_primary_races?state=California,Nebraska
/:election_year/presidential_primary_races?state_postal=:postal_code1,:postal_code2,:postal_code3
/2020/presidential_primary_races?state_postal=CA,NE
Get one candidate's results and the party's primary info for a Presidential Primary on a specific year
/:election_year/presidential_primary_races?candidate_id=:id
/2020/presidential_primary_races?candidate_id=51526
Get specific candidates' results and the parties' primary info for Presidential Primaries on a specific year
/:election_year/presidential_primary_races?candidate_id=:id1,:id2,:id3
/2020/presidential_primary_races?candidate_id=51526,8639
Get candidates' results and primary info for one party for Presidential Primaries on a specific year
/:election_year/presidential_primary_races?party=:party
/2024/presidential_primary_races?party=GOP

Current party options are case sensitive and include 'Dem', 'GOP', 'Grn', 'Lib', and 'CST'.

Get Minnesota's county map for each party for the Presidential Primaries on a specific year
/:election_year/presidential_primary_races?state=:name&include_county_map=:boolean
/2020/presidential_primary_races?state=Minnesota&include_county_map=true

Note that at this time we currently ingest this data for just Minnesota. The Elections API will raise if you attempt to retrieve county maps for any other state or territory besides Minnesota. Please let SWAG know if county maps are desired for other locations.