---
title: "Election Analysis"
method: GET
path: "/elections/summary"
tags: ["US Elections"]
---

# Election Analysis

`GET /elections/summary`

## Request

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

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

## Query parameters

- `view` string
- `year` integer
- `office` string
- `level` string
- `state` string
- `chamber` string
- `kind` string
- `min_elections` integer
- `sort` string
- `order` string
- `limit` integer
- `offset` 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)
