---
title: "GET /v1/electioneering/by_candidate/"
method: GET
path: "/v1/electioneering/by_candidate/"
tags: ["electioneering"]
---

# GET /v1/electioneering/by_candidate/

`GET /v1/electioneering/by_candidate/`

## Request

- Base URL: `https://api.open.fec.gov` (the document declares no server; this is the origin it was published from)
- URL: `https://api.open.fec.gov/v1/electioneering/by_candidate/`
- Auth: API key in header `X-Api-Key` and API key in query parameter `api_key` and API key in query parameter `api_key`
- TypeScript: <https://skmtc.dev/fec/apis/openfec/docs/v1/electioneering/by_candidate/get.ts> (a function with typed inputs; its response is checked against the schema)

Electioneering costs aggregated by candidate

## Query parameters

- `page` integer
- `per_page` integer
- `state` string
- `district` string
- `cycle` integer[]
- `office` 'house' | 'senate' | 'president'
- `election_full` boolean
- `candidate_id` string[]
- `sort` string
- `sort_hide_null` boolean
- `sort_null_only` boolean
- `sort_nulls_last` boolean
- `api_key` string

## Response `default`

Default response

- ElectioneeringByCandidatePage
  - `pagination` OffsetInfo
    - `count` integer
    - `is_count_exact` boolean
    - `page` integer
    - `pages` integer
    - `per_page` integer
  - `results` ElectioneeringByCandidate[]
    - `candidate_id` string
    - `candidate_name` string
    - `committee_id` string
    - `committee_name` string
    - `count` integer, nullable: Number of records making up the total.
    - `cycle` integer, required: Filter records to only those that were applicable to a given two-year period.The cycle begins with an odd year and is named for its ending, even year.
    - `total` number

---

[API](https://skmtc.dev/fec/apis/openfec.md) - [All operations](https://skmtc.dev/fec/apis/openfec/llms.txt) - [OpenAPI document](https://skmtc.dev/fec/apis/openfec/revisions/d2eb3171e225?raw)
