---
title: "Election Area Profile"
method: GET
path: "/elections/geography/{level}/{code}"
tags: ["US Elections"]
---

# Election Area Profile

`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`

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}.

## Path parameters

- `level` string, required
- `code` string, required

## Query parameters

- `offices` string
- `year_from` integer
- `year_to` integer

## Response `200`

Successful response (JSON).

- object

## Other responses

- `401`: No API key in the request.
- `403`: The API key is not valid or has expired.

---

[API](https://skmtc.dev/dataporium/apis/dataporium-data-api.md) · [All operations](https://skmtc.dev/dataporium/apis/dataporium-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dataporium/apis/dataporium-data-api/revisions/8bc593179dc8?raw)
