Search Candidates
search_candidatesSearch federal election candidates by name, state, or party. Returns candidate ID, name, party, office, state, district, and election years. Example: search_candidates("Biden", state="DE", party="DEM")
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "Sanders"
},
"name": "search_candidates"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| party | No | Party code: "DEM", "REP", "LIB", "GRE", etc. | |
| query | Yes | Candidate name to search (e.g., "Sanders") | |
| state | No | Two-letter state code (e.g., "CA", "NY") | |
| _apiKey | Yes | OpenFEC API key |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| total | Yes | Total count of candidates matching search criteria | |
| returned | Yes | Number of candidates returned in this response | |
| candidates | Yes | Array of candidate records |