US Elections

Election Area Profile

One area in full: a state, county, city or town, congressional district or the nation. Every race with a result in the area (leader, shares, margin, swing, flip), partisan lean, bellwether record, split tickets, turnout by election and main demographics.

The answer is {area, lean, bellwether, races, split_tickets, turnout, demographics, about}.

get/elections/geography/{level}/{code}

Request

  • Base URL: https://api.dataporium.io
  • URL: https://api.dataporium.io/elections/geography/{level}/{code}
  • Auth: API key in query parameter apikey

Path parameters

levelstring required

national, state, county, cousub, cd, sldu or sldl (in the path)

codestring required

Area code (in the path)

Query parameters

officesstring

Only these offices in the race list (comma-separated)

year_frominteger

First election year

year_tointeger

Last election year

Response

Successful response (JSON).

object required

Changes

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