FEC API
Overview
The FEC (Federal Election Commission) API lets you explore campaign finance data from US federal elections, including donations, candidate financials, and committee information. You need a free API key from api.data.gov to get started. This API is great for journalists, researchers, and civic tech developers who want to follow the money in US politics.
Beginner Tip
Register for a free API key at api.data.gov/signup and you'll be approved instantly. The interactive documentation at api.open.fec.gov/developers lets you try every endpoint in your browser before writing any code.
Available Data
Example Response
{
"name": "Japan",
"capital": "Tokyo",
"population": 125800000,
"region": "Asia",
"languages": [
"Japanese"
],
"flag": "https://flagcdn.com/jp.svg",
"currencies": [
{
"code": "JPY",
"name": "Japanese yen"
}
]
} Field Reference
results Array of candidate or financial record objects matching the query name Full name of the candidate office Federal office sought: P for President, S for Senate, H for House party Political party abbreviation (e.g., DEM, REP) total_receipts Total campaign contributions received in dollars pagination Object containing count, page, pages, and per_page for navigating large result sets Implementation Example
const url = "https://api.open.fec.gov/developers/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →City, Nantes Open Data
City, Nantes Open Data gives developers access to datasets published by Nantes Métropole in France, covering transport, environment, and urban planning.
Code.gov
Code.gov is the U.S.
Data.gov
⭐ Beginner's PickData.gov is the central repository for open data published by U.S.
Deutscher Bundestag DIP
Deutscher Bundestag DIP (Dokumentations- und Informationssystem) provides read access to official German Bundestag data including parliamentary activities, printed materials, persons, and procedures.
Gun Policy
Gun Policy provides programmatic access to international firearm injury prevention and policy via REST API.