US Elections

Election Analysis

Analysis views over the election data: national presidential vote by year, seats won in Congress and governorships, control of state legislatures, areas that flipped or swung most, bellwether states and counties, split tickets, partisan lean, county results next to demographics, and what is loaded.

The answer is {view, total, limit, offset, rows, about}.

get/elections/summary

Request

  • Base URL: https://api.dataporium.io
  • URL: https://api.dataporium.io/elections/summary
  • Auth: API key in query parameter apikey

Query parameters

viewstring

trend, seats, legislatures, flips, swing, bellwethers, split_tickets, lean, demographics or coverage

yearinteger

Election year

officestring

Office filter (flips and swing). For demographics: president (default), us_senate, governor or us_house, the county results of that race next to county demographics

levelstring

state, county or cd

statestring

State code(s)

chamberstring

us_house, us_senate, governor, state_senate or state_house

kindstring

split_tickets: senate, house or governor

min_electionsinteger

bellwethers: fewest presidential elections

sortstring

Sort field (depends on the view)

orderstring

asc or desc

limitinteger

Rows per page, 1 to 3500 (default 100)

offsetinteger

Rows to skip, for paging

Response

Successful response (JSON).

object required

Changes

No recorded changes to this operation across all 1 revision of this API.