US Elections

Election Results by Area

The result of one race by area: the race header and every candidate with votes and share, then one row per state, congressional district, county, city or town, or precinct with total votes, Democratic, Republican and other shares, the leader, margin, party margin, swing, flip and turnout.

The answer is {race, choices, level, total, limit, offset, sort, order, rows, about}. sort is name, total_votes, rd_margin, margin, swing, dem_pct, rep_pct, turnout or state.

get/elections/results

Request

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

Query parameters

racestring required

The race_id from /elections/races

levelstring

state, county, cousub, cd or precinct (default: the top level of the race)

statestring

Only areas of this state

countystring

Only areas inside this county (5-digit code); needed for precincts

qstring

Area name contains this text

include_choicesboolean

true = each candidate's votes in every row (top 8)

compactboolean

true = short rows for maps, up to 4000 rows

sortstring

Sort field (see the endpoint description)

orderstring

asc or desc

limitinteger

Rows per page (default 50 to 100, at most 1000)

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.