candidate

GET /v1/candidates/

Fetch basic information about candidates, and use parameters to filter results to the candidates you're looking for.

Each result reflects a unique FEC candidate ID. That ID is particular to the candidate for a particular office sought. If a candidate runs for the same office multiple times, the ID stays the same. If the same person runs for another office — for example, a House candidate runs for a Senate office — that candidate will get a unique ID for each office.

Request

  • Base URL
    https://api.open.fec.gov (the document declares no server; this is the origin it was published from)
  • 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
    A function with typed inputs. Its response is checked against the schema.

Query parameters

pageinteger

For paginating through results, starting at page 1

per_pageinteger

The number of results returned per page. Defaults to 20.

qstring[]

Name of candidate running for office

candidate_idstring[]

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.

min_first_file_datestring

Selects all candidates whose first filing was received by the FEC after this date.

max_first_file_datestring

Selects all candidates whose first filing was received by the FEC before this date.

is_active_candidateboolean

Candidates who are actively seeking office. If no value is specified, all candidates are returned. When True is specified, only active candidates are returned. When False is specified, only inactive candidates are returned.

cycleinteger[]

Two-year election cycle in which a candidate runs for office. Calculated from Form 2. The cycle begins with an odd year and is named for its ending, even year. This cycle follows the traditional house election cycle and subdivides the presidential and Senate elections into comparable two-year blocks. To retrieve data for the entire four years of a presidential term or six years of a senatorial term, you will need the election_full flag.

election_yearinteger[]

Year of election

officestring[]

Federal office candidate runs for: H, S or P

statestring[]

US state or territory where a candidate runs for office

partystring[]

Three-letter code for the party affiliated with a candidate or committee. For example, DEM for Democratic Party and REP for Republican Party.

yearstring

Retrieve records pertaining to a particular election year. The list of election years is based on a candidate filing a statement of candidacy (F2) for that year.

districtstring[]

Two-digit US House distirict of the office the candidate is running for. Presidential, Senate and House at-large candidates will have District 00.

candidate_statusstring[]

One-letter code explaining if the candidate is: - C present candidate - F future candidate - N not yet a candidate - P prior candidate

incumbent_challengestring[]

One-letter code ('I', 'C', 'O') explaining if the candidate is an incumbent, a challenger, or if the seat is open.

federal_funds_flagboolean

A boolean the describes if a presidential candidate has accepted federal funds. The flag will be false for House and Senate candidates.

has_raised_fundsboolean

A boolean that describes if a candidate's committee has ever received any receipts for their campaign for this particular office. (Candidates have separate candidate IDs for each office.)

namestring[]

Name (candidate or committee) to search for. Alias for 'q'.

sortstring

Provide a field to sort by. Use - for descending order.

sort_hide_nullboolean

Hide null values on sorted column(s).

sort_null_onlyboolean

Toggle that filters out all rows having sort column that is non-null

sort_nulls_lastboolean

Toggle that sorts null values last

api_keystring

Response

Default response

Changes

No recorded changes to this operation across all 20 revisions of this API.