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

# GET /v1/presidential/contributions/by_candidate/

`GET /v1/presidential/contributions/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/presidential/contributions/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/presidential/contributions/by_candidate/get.ts> (a function with typed inputs; its response is checked against the schema)

Net receipts per candidate.

Filter with `contributor_state='US'` for national totals

## Query parameters

- `page` integer
- `per_page` integer
- `election_year` integer[]
- `contributor_state` string[]
- `sort` string
- `sort_hide_null` boolean
- `sort_null_only` boolean
- `sort_nulls_last` boolean
- `api_key` string

## Response `default`

Default response

- PresidentialByCandidatePage
  - `pagination` OffsetInfo
    - `count` integer
    - `is_count_exact` boolean
    - `page` integer
    - `pages` integer
    - `per_page` integer
  - `results` PresidentialByCandidate[]
    - `candidate_id` string, nullable: A unique identifier assigned to each candidate registered with the FEC. If a person runs for several offices, that person will have separate candidate IDs for each office. First character indicates office - [P]residential, [H]ouse, [S]enate]. Second character is the last digit of the two-year period the ID was created. Third and fourth is the candidate state. Presidential IDs don't have state. Fifth and sixth is the district when the candidate first ran. This does not change if the candidate/member's district changes during re-districting. Presidential IDs don't have districts. The rest is sequence. -P00000001 All candidates -P00000002 Democrats -P00000003 Republicans
    - `candidate_last_name` string, nullable: Candidate last name
    - `candidate_party_affiliation` string, nullable: Three-letter code for the party affiliated with a candidate or committee. For example, DEM for Democratic Party and REP for Republican Party.
    - `contributor_state` string, nullable: State of contributor
    - `election_year` integer, nullable: Year of election
    - `net_receipts` number
    - `rounded_net_receipts` 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)
