
Building a Political Donor Tracker with FEC Campaign Finance Data
Campaign finance data is public by law. The FEC publishes every donation over $200 to federal candidates. This data powers investigative journalism, civic tech, and political research. Here's how to build a donor tracking system. FEC Data Sources Bulk data : Downloadable CSV files updated nightly API : REST API at api.open.fec.gov (free API key required) Website : fec.gov with searchable database Using the FEC API import requests import time from collections import defaultdict class FECTracker : BASE_URL = " https://api.open.fec.gov/v1 " def __init__ ( self , api_key ): self . api_key = api_key self . session = requests . Session () self . session . params = { " api_key " : api_key } def search_donors ( self , name = None , employer = None , state = None , min_amount = None , cycle = 2024 ): params = { " two_year_transaction_period " : cycle , " per_page " : 100 , " sort " : " -contribution_receipt_amount " , } if name : params [ " contributor_name " ] = name if employer : params [ " c
Continue reading on Dev.to Tutorial
Opens in a new tab



![[MM’s] Boot Notes — The Day Zero Blueprint — Test Smarter on Day One](/_next/image?url=https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1368%2F1*AvVpFzkFJBm-xns4niPLAA.png&w=1200&q=75)