{"openapi":"3.1.0","info":{"title":"openFEC (BYOK) API","version":"0.1.0","description":"openFEC (BYOK) lets an AI assistant read your own openFEC data through the openFEC API with a key you supply (api.data.gov API key for openFEC). Read-only: 8 tools (search_candidates, get_candidate, get_candidate_totals, search_committees, get_committee, get_committee_totals, search_itemized_contributions, list_filings). The BYOK key travels with each request, is used for that one call only and...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-openfec.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-openfec/docs"},"termsOfService":"https://connectorbay.com/byok-openfec/terms"},"servers":[{"url":"https://byok-openfec.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-openfec/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/search_candidates":{"post":{"operationId":"search_candidates","summary":"Search federal candidates registered with the FEC by name, office (H, S or P), state, party, election year or cycle; ret","description":"Search federal candidates registered with the FEC by name, office (H, S or P), state, party, election year or cycle; returns id, name, office, party, state, district and filing dates. Use for \"Find Senate candidates named Warren in Massachusetts\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Part of the candidate's name.","title":"Q"},"office":{"anyOf":[{"enum":["H","S","P"],"type":"string"},{"type":"null"}],"default":null,"description":"Office sought: H (House), S (Senate) or P (President).","title":"Office"},"state":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Two-letter state or territory code, for example MA.","title":"State"},"party":{"anyOf":[{"maxLength":3,"type":"string"},{"type":"null"}],"default":null,"description":"Three-letter party code, for example DEM or REP.","title":"Party"},"election_year":{"anyOf":[{"maximum":2100,"minimum":1976,"type":"integer"},{"type":"null"}],"default":null,"description":"Election year, for example 2026.","title":"Election Year"},"cycle":{"anyOf":[{"maximum":2100,"minimum":1976,"type":"integer"},{"type":"null"}],"default":null,"description":"Two-year election cycle, named for its even year, for example 2026.","title":"Cycle"},"is_active_candidate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for candidates currently seeking office only.","title":"Is Active Candidate"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page, 1 to 100.","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"search_candidatesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_candidate":{"post":{"operationId":"get_candidate","summary":"Get the FEC's current record for one candidate id: name, office, party, state, district, status, election years and fili","description":"Get the FEC's current record for one candidate id: name, office, party, state, district, status, election years and filing dates. Use for \"Show the FEC record of candidate P80001571\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"candidate_id":{"description":"FEC candidate id, for example P80001571 (letter H, S or P, then digits).","maxLength":12,"title":"Candidate Id","type":"string"}},"required":["candidate_id"],"title":"get_candidateArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_candidate_totals":{"post":{"operationId":"get_candidate_totals","summary":"Get a candidate's campaign finance totals per two-year cycle (receipts, disbursements, individual contributions, cash on","description":"Get a candidate's campaign finance totals per two-year cycle (receipts, disbursements, individual contributions, cash on hand, debts), summed over the candidate's committees. Use for \"How much money did candidate H8CA05035 raise and spend\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"candidate_id":{"description":"FEC candidate id, for example H8CA05035.","maxLength":12,"title":"Candidate Id","type":"string"},"cycle":{"anyOf":[{"maximum":2100,"minimum":1976,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this two-year cycle, for example 2024.","title":"Cycle"},"election_full":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for totals over the candidate's full election period, false for two-year cycles.","title":"Election Full"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page, 1 to 100.","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["candidate_id"],"title":"get_candidate_totalsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_committees":{"post":{"operationId":"search_committees","summary":"Search political committees (campaigns, PACs, parties) by name, state, party, type or candidate; returns id, name, type,","description":"Search political committees (campaigns, PACs, parties) by name, state, party, type or candidate; returns id, name, type, designation, treasurer and filing dates. Use for \"Find PACs with 'climate' in their name\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Part of the committee's name.","title":"Q"},"state":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Two-letter state or territory code.","title":"State"},"party":{"anyOf":[{"maxLength":3,"type":"string"},{"type":"null"}],"default":null,"description":"Three-letter party code, for example DEM.","title":"Party"},"committee_type":{"anyOf":[{"maxLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"One-letter committee type code: H house, S senate, P presidential, N or Q PAC, O super PAC, X or Y party, I independent expenditure filer.","title":"Committee Type"},"candidate_id":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Only committees tied to this FEC candidate id.","title":"Candidate Id"},"cycle":{"anyOf":[{"maximum":2100,"minimum":1976,"type":"integer"},{"type":"null"}],"default":null,"description":"Only committees active in this two-year cycle.","title":"Cycle"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page, 1 to 100.","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"search_committeesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_committee":{"post":{"operationId":"get_committee","summary":"Get the FEC's current record for one committee id: name, type, designation, party, state, treasurer, filing frequency an","description":"Get the FEC's current record for one committee id: name, type, designation, party, state, treasurer, filing frequency and linked candidate ids. Use for \"Show the FEC record of committee C00703975\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"committee_id":{"description":"FEC committee id, for example C00703975 (letter C then eight digits).","maxLength":12,"title":"Committee Id","type":"string"}},"required":["committee_id"],"title":"get_committeeArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_committee_totals":{"post":{"operationId":"get_committee_totals","summary":"Get a committee's financial totals per two-year cycle: receipts, disbursements, individual contributions, independent ex","description":"Get a committee's financial totals per two-year cycle: receipts, disbursements, individual contributions, independent expenditures, cash on hand and debts. Use for \"What are the totals for committee C00703975 in 2024\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"committee_id":{"description":"FEC committee id, for example C00703975 (letter C then eight digits).","maxLength":12,"title":"Committee Id","type":"string"},"cycle":{"anyOf":[{"maximum":2100,"minimum":1976,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this two-year cycle, for example 2024.","title":"Cycle"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page, 1 to 100.","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["committee_id"],"title":"get_committee_totalsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_itemized_contributions":{"post":{"operationId":"search_itemized_contributions","summary":"Search itemized receipts (Schedule A) reported by committees: amount, date, contributor name, city, state, employer, occ","description":"Search itemized receipts (Schedule A) reported by committees: amount, date, contributor name, city, state, employer, occupation and receiving committee. Pages by cursor: pass last_index and the last date or amount from the previous answer's pagination.last_indexes. FEC rules bar using contributor names or addresses to solicit contributions or for commercial purposes. Use for \"Show contributions over $2,000 to committee C00703975 in 2024\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"committee_id":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Only receipts of this committee id.","title":"Committee Id"},"contributor_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Contributor name to match.","title":"Contributor Name"},"contributor_state":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Contributor's two-letter state code.","title":"Contributor State"},"contributor_employer":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Contributor's employer as reported.","title":"Contributor Employer"},"contributor_occupation":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Contributor's occupation as reported.","title":"Contributor Occupation"},"min_amount":{"anyOf":[{"maximum":100000000,"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"Only amounts of at least this many dollars.","title":"Min Amount"},"max_amount":{"anyOf":[{"maximum":100000000,"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"Only amounts of at most this many dollars.","title":"Max Amount"},"min_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only receipts on or after this date, YYYY-MM-DD.","title":"Min Date"},"max_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only receipts on or before this date, YYYY-MM-DD.","title":"Max Date"},"two_year_transaction_period":{"anyOf":[{"maximum":2100,"minimum":1976,"type":"integer"},{"type":"null"}],"default":null,"description":"Two-year period of the transaction, named for its even year, for example 2024.","title":"Two Year Transaction Period"},"is_individual":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for non-earmarked contributions from individuals only.","title":"Is Individual"},"sort":{"anyOf":[{"enum":["-contribution_receipt_date","contribution_receipt_date","-contribution_receipt_amount","contribution_receipt_amount"],"type":"string"},{"type":"null"}],"default":null,"description":"Order: -contribution_receipt_date (default), contribution_receipt_date, -contribution_receipt_amount or contribution_receipt_amount.","title":"Sort"},"last_index":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer (pagination.last_indexes.last_index); omit for the first page.","title":"Last Index"},"last_contribution_receipt_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor date from the previous answer when sorting by date.","title":"Last Contribution Receipt Date"},"last_contribution_receipt_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Cursor amount from the previous answer when sorting by amount.","title":"Last Contribution Receipt Amount"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page, 1 to 100.","title":"Per Page"}},"title":"search_itemized_contributionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_filings":{"post":{"operationId":"list_filings","summary":"List reports and forms filed with the FEC, newest first by default, for a committee or candidate: form and report type, ","description":"List reports and forms filed with the FEC, newest first by default, for a committee or candidate: form and report type, receipt date, coverage period, receipts, disbursements, cash on hand and PDF link. Use for \"What reports did committee C00703975 file in 2025\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"committee_id":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Only filings of this committee id.","title":"Committee Id"},"candidate_id":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Only filings tied to this candidate id.","title":"Candidate Id"},"form_type":{"anyOf":[{"maxLength":6,"type":"string"},{"type":"null"}],"default":null,"description":"FEC form code, for example F1 (statement of organization), F2 (statement of candidacy) or F3 (report of an authorized committee).","title":"Form Type"},"report_year":{"anyOf":[{"maximum":2100,"minimum":1976,"type":"integer"},{"type":"null"}],"default":null,"description":"Year of the coverage end date, for example 2025.","title":"Report Year"},"cycle":{"anyOf":[{"maximum":2100,"minimum":1976,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this two-year cycle.","title":"Cycle"},"most_recent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to keep only the newest version of each report.","title":"Most Recent"},"min_receipt_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only filings received on or after this date, YYYY-MM-DD.","title":"Min Receipt Date"},"max_receipt_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only filings received on or before this date, YYYY-MM-DD.","title":"Max Receipt Date"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page, 1 to 100.","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_filingsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}