Openfec Search Candidates
openfec_search_candidatesFind federal candidates by name, state, office, party, or cycle. Retrieve a specific candidate by FEC ID with financial totals. Candidate IDs start with H (House), S (Senate), or P (President) followed by exactly eight letters or digits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Search-results page number (1-indexed). Defaults to 1 on the search path. | |
| cycle | No | Two-year election cycle (even year, e.g., 2024). | |
| party | No | Three-letter party code (e.g., DEM, REP, LIB). | |
| query | No | Full-text candidate name search. | |
| state | No | Two-letter US state code (e.g., AZ, CA). | |
| office | No | Filter by office: H=House, S=Senate, P=President. | |
| district | No | Two-digit district number for House candidates. | |
| per_page | No | Search results per page. Defaults to 20 on the search path. | |
| candidate_id | No | FEC candidate ID: H, S, or P followed by exactly eight letters or digits (e.g., P00003392, H2CO07170). Get IDs from openfec_search_candidates results. When provided, returns a single candidate with full detail. | |
| election_year | No | Specific election year the candidate ran in. | |
| include_totals | No | Include financial totals (receipts, disbursements, cash on hand). Defaults to true when fetching by candidate_id. | |
| candidate_status | No | Candidate status: C=present, F=future, N=not yet, P=prior. | |
| has_raised_funds | No | Only candidates whose committee has received receipts. | |
| incumbent_challenge | No | Incumbent status: I=incumbent, C=challenger, O=open seat. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Guidance when no candidates matched — echoes filters and suggests how to broaden. | |
| totals | No | Financial totals (receipts, disbursements, cash_on_hand) when include_totals is true. One row per candidate per cycle. | |
| candidates | No | Candidate result set; one record per match. | |
| pagination | No | Page-based pagination metadata. | |
| totalCount | No | Total matching candidates before pagination. | |
| missing_totals | No | Candidates whose financial totals were not retrieved because the totals fetch hit its page cap. Re-query each one on its own with candidate_id to get its totals. | |
| search_criteria | No | Echo of the search filters this call applied, as the server parsed them, minus paging arguments. Always present — compare it against what you sent to confirm every filter was honoured. |