FEC API: Get candidate fundraising
Gets a federal candidate's fundraising and spending for a two-year FEC cycle. If several names match, returns the match with the most reported receipts.
Unofficial. Not affiliated with or endorsed by FEC.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- State optional
state State postal abbreviation to distinguish candidates, for example MA.
NY
- Office optional
office Office to distinguish candidates, for example senate. Defaults to any.
house
One of
any,president,senate,house. Defaultany.- Candidate, required
candidate Candidate name, for example Elizabeth Warren.
Alexandria Ocasio-Cortez
- Election Year optional
election_year Two-year election cycle, for example 2024. Defaults to the FEC's current cycle.
2024
Whole number.
Input as JSON
{ "state": "NY", "office": "house", "candidate": "Alexandria Ocasio-Cortez", "election_year": 2024}Output
{ "cycle": 2024, "debts": 0, "party": "Democratic Party", "state": "NY", "office": "House", "currency": "USD", "district": "14", "total_spent": 16716492.89, "cash_on_hand": 3734646.88, "total_raised": 15299235.57, "candidate_link": "https://www.fec.gov/data/candidate/H8NY15148/?cycle=2024&election_full=false" , "candidate_name": "Alexandria Ocasio-Cortez", "fec_candidate_id": "H8NY15148", "fec_committee_id": "C00639591", "coverage_end_date": "2024-12-31", "individual_contributions": 14866494.81, "principal_campaign_committee": "Alexandria Ocasio-Cortez For Congress", "incumbent_challenger_open_seat": "Incumbent"}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"fec.gov/get_candidate_fundraising","input":{"state":"NY","office":"house","candidate":"Alexandria Ocasio-Cortez","election_year":2024}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "fec.gov/get_candidate_fundraising" , "input": { "state": "NY", "office": "house", "candidate": "Alexandria Ocasio-Cortez", "election_year": 2024 }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "fec.gov/get_candidate_fundraising" , "input": { "state": "NY", "office": "house", "candidate": "Alexandria Ocasio-Cortez", "election_year": 2024 } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run fec.gov/get_candidate_fundraising# with {"state":"NY","office":"house","candidate":"Alexandria Ocasio-Cortez","election_year":2024}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "candidate" ], "properties": { "state": { "type": "string", "description": "State postal abbreviation to distinguish candidates, for example MA." }, "office": { "enum": [ "any", "president", "senate", "house" ], "type": "string", "default": "any", "description": "Office to distinguish candidates, for example senate. Defaults to any." }, "candidate": { "type": "string", "description": "Candidate name, for example Elizabeth Warren." }, "election_year": { "type": "integer", "description": "Two-year election cycle, for example 2024. Defaults to the FEC's current cycle." } }}Output schema
{ "type": "object", "required": [ "candidate_name", "office", "party", "state", "district", "incumbent_challenger_open_seat", "cycle", "total_raised", "total_spent", "cash_on_hand", "debts", "individual_contributions", "currency", "coverage_end_date", "principal_campaign_committee", "candidate_link", "fec_candidate_id", "fec_committee_id" ], "properties": { "cycle": { "type": "integer" }, "debts": { "type": [ "number", "null" ] }, "party": { "type": [ "string", "null" ] }, "state": { "type": [ "string", "null" ] }, "office": { "type": "string" }, "currency": { "type": "string", "const": "USD" }, "district": { "type": [ "string", "null" ] }, "total_spent": { "type": [ "number", "null" ] }, "cash_on_hand": { "type": [ "number", "null" ] }, "total_raised": { "type": [ "number", "null" ] }, "candidate_link": { "type": "string" }, "candidate_name": { "type": "string" }, "fec_candidate_id": { "type": "string" }, "fec_committee_id": { "type": [ "string", "null" ] }, "coverage_end_date": { "type": [ "string", "null" ] }, "individual_contributions": { "type": [ "number", "null" ] }, "principal_campaign_committee": { "type": [ "string", "null" ] }, "incumbent_challenger_open_seat": { "type": [ "string", "null" ] } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
fec.gov/get_candidate_fundraising- Returns
- candidate name, office, party, state, district, total raised, total spent, cash on hand, debts, individual contributions, coverage end date, principal committee, FEC ids
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method fec.gov/get_candidate_fundraising with the inputs above.
Ask your agent
- How much has Elizabeth Warren raised and spent in the 2024 federal cycle?
- What are the total receipts, cash on hand, and debts for the Senate candidate Ted Cruz from Texas in 2022?
- Show me the individual contributions and coverage end date for the House candidate Alexandria Ocasio-Cortez in New York for the 2024 cycle.
- I need the FEC fundraising totals for presidential candidate Ron DeSantis for the 2024 election, including his principal committee.
- Look up campaign finance figures for Massachusetts Senate candidate Ed Markey for the 2020 cycle, including party and FEC IDs.
See more
All FEC methodsLists federal candidates for an office and election year from FEC data, ranked by total money raised. Senate and House searches require a state; a House search can be narrowed to one district.
fec.gov/search_candidatesLooks up a public company by name or ticker on SEC EDGAR and returns its reported annual or quarterly financial figures from XBRL company facts. Quarterly flows are derived from year-to-date totals when no quarterly figure is filed. Unavailable figures are null.
sec.gov/get_company_financialsLooks up a Ballotpedia candidate or officeholder profile by name, with election results, background and published links. An optional state narrows people with the same name; unreported details are left blank.
ballotpedia.org/get_candidateFinds a public company by name or ticker in SEC EDGAR and lists its filings, newest first, optionally narrowed by filing type and filing date.
sec.gov/get_company_filingsSee a member of Congress's disclosed trades from a chosen date, newest trade first. Capitol Trades provides up to three years of history; prices and other details may be unavailable for some trades.
capitoltrades.com/get_politician_tradesScreens a name against the OFAC SDN and non-SDN sanctions lists. Returns scored entries with identifying details. Similar names are potential matches, not confirmed identities.
sanctionssearch.ofac.treas.gov/check_sanctionsLists the Fortune 500 for a year. You can filter by industry or sector and by headquarters state. Each company comes with its public financial and company details.
fortune.com/list_fortune_500Finds SEC EDGAR company filings that mention an exact phrase, optionally limited to a company, a filing category and a filing date range, ranked by search relevance; one entry per filing.
sec.gov/search_filings