The FEC provides access to campaign finance data, including information on political contributions, campaign expenditures, fundraising activities and financial disclosures filed by political candidates, parties and committees in the United States.
The FEC API provides JSON endpoints for candidates, committees, and financial filings. The `fecfile` Python library parses raw FEC electronic filing data. Engineers use `requests` against the FEC Open Data API with pagination to collect full campaign finance records.
FEC data enables AI tools for campaign finance transparency and political research. Build a RAG system indexed on FEC filings so LLMs can answer 'Who are the top donors to Senate campaigns in 2024?' with official data. AI anomaly detection models trained on FEC data flag suspicious contribution patterns.
# pip install requests pandas
import requests, pandas as pd
resp = requests.get(
"https://api.open.fec.gov/v1/candidates/",
params={"api_key": "YOUR_API_KEY", "office": "S",
"election_year": 2024, "per_page": 10}
)
candidates = resp.json()["results"]
df = pd.DataFrame(candidates)[["name", "party", "state", "total_receipts"]]
print(df.sort_values("total_receipts", ascending=False).head())Official dataset source
More datasets used by Python data engineers.
The Federal Reserve Bank of St. Louis FRED database provides over 800,000 economic time series from 100+ sources, including interest rates, inflation, GDP, and employment data. Widely used in financial and economic data pipelines via the fredapi Python library for loading macro data into analytical systems.
The US Federal Aviation Administration publishes datasets on aircraft registrations, pilot certifications, airport data, accident reports, and air traffic statistics. Used in data engineering for aviation analytics pipelines, safety analysis systems, and building aeronautical intelligence dashboards in Python.
Access demographic, economic, social, and geographic datasets from the US Census Bureau including the American Community Survey, decennial census, and economic census. Used in data engineering for population analysis pipelines, market research, geospatial enrichment, and building socioeconomic dashboards in Python.