# FEC Candidate Search

> FEC Candidate Search is a paid API for AI agents from 2s.io, paid per call via x402, $0.0012/call, status unknown (last checked 2026-09-16).

Search and filter US federal political candidates via the OpenFEC API, returning candidate identity, party, office, incumbency, and committee linkage data.

## Facts

- Endpoint: GET https://2s.io/api/gov/fec-candidate
- Price: $0.0012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-45cff346
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D7Td-yAuaJ3UqkkwZc16Z

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-io-45cff346
```

Example prompt: Can you look up FEC candidate information for Democratic Senate candidates in Georgia from the 2024 election cycle — specifically any candidate who has raised money?

## When to prefer this

Use this endpoint when you need to search or discover US federal political candidates by name, party, office, state, or election cycle using official FEC data. Prefer this over generic web search when you need structured, authoritative candidate identifiers (FEC candidate IDs) that can be chained into subsequent calls like /api/gov/fec-committee to pull fundraising committee data.

## Known failure modes

- No candidates found matching the given filters — returns empty results list
- Invalid office value (not P, S, or H) — returns validation error
- Invalid or unrecognized candidateId format — returns empty results or 400 error
- Rate limit or payment failure (x402) — returns 402 Payment Required
- Invalid state abbreviation or district format — returns empty or malformed results
- electionYear or cycle provided as odd number — may return empty results since FEC uses even-year cycles

## How this service works

Search US federal political candidates via the OpenFEC API. Filter by free-text q (name match), candidate ID (e.g. H0VA01076), state, district, party (DEM, REP, IND, LIB, GRE, etc.), office (P=President | S=Senate | H=House), election cycle (even years), election year, and hasRaised (only candidates with reported receipts). Returns FEC candidate ID, name, party, office, state/district, incumbency status, active-through cycle, first/last file dates, cycles, principal committee linkage. Use the candidate ID returned here to fetch their committees with /api/gov/fec-committee.

## Output

Returns a paginated list of FEC candidate records, each containing the candidate's FEC ID, full name, party abbreviation, office sought (P/S/H), state and district, incumbency status, active-through election cycle, first and last filing dates, all election cycles they appear in, and their linked principal committee ID. Use the returned candidate ID to fetch detailed committee data from /api/gov/fec-committee.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "q": "Smith",
   "page": 1,
   "cycle": 2024,
   "state": "GA",
   "office": "S",
   "perPage": 25,
   "hasRaised": true
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "properties": {
      "q": {
       "type": "string"
      },
      "page": {
       "type": "integer",
       "default": 1,
       "minimum": 1
      },
      "cycle": {
       "type": "integer",
       "description": "Election cycle (even year)."
      },
      "party": {
       "type": "string"
      },
      "state": {
       "type": "string"
      },
      "office": {
       "enum": [
        "P",
        "S",
        "H"
       ],
       "type": "string"
      },
      "perPage": {
       "type": "integer",
       "default": 25,
       "maximum": 100,
       "minimum": 1
      },
      "district": {
       "type": "string",
       "description": "2-digit district, e.g. \"03\"."
      },
      "hasRaised": {
       "type": "boolean"
      },
      "candidateId": {
       "type": "string"
      },
      "electionYear": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-45cff346/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
