# FEC Campaign Finance Scraper (`themineworks/fec-campaign-finance`) Actor

Scrape US federal campaign finance from the official OpenFEC API as clean JSON — search candidates & committees, or pull itemized Schedule A contributions for a committee. No login, no browser needed. Works in Claude, ChatGPT & any MCP agent.

- **URL**: https://apify.com/themineworks/fec-campaign-finance.md
- **Developed by:** [The Mine Works](https://apify.com/themineworks) (community)
- **Categories:** Business, News, MCP servers
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 result scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## FEC Campaign Finance Scraper — Candidates, Committees & Itemized Contributions

Scrape **US federal campaign finance** straight from the official [OpenFEC API](https://api.open.fec.gov/) as clean, structured JSON. No login, no browser — pure HTTP against the same public data source that powers fec.gov itself.

✅ Official FEC data | ✅ No proxy needed | ✅ Candidates, committees & itemized donations | ✅ MCP-ready for AI agents

Built for political journalism, opposition research, campaign compliance, donor and PAC research, and any RAG/agent pipeline that needs a live feed of who's raising and spending money in US federal elections.

Reliability posture: empty searches and failed runs are **never charged**. You only pay for a result actually delivered.

### What it does — three modes

| Mode | What you get | You provide |
|---|---|---|
| `candidates` | Federal candidates matching a name — ID, party, office, state, district, incumbent/challenger status, election years | `query` |
| `committees` | Political committees / PACs matching a name — ID, type, party, state, treasurer | `query` |
| `contributions` | Itemized individual contributions (Schedule A) for one committee — contributor name, employer, occupation, state, amount, date | `committeeId` |

### 🔑 Bring your own free API key (optional for small tests)

`apiKey` defaults to FEC's public `DEMO_KEY`, which works for quick tests but is heavily rate-limited. For any real volume, get a **free** key in seconds:

1. Go to **https://api.data.gov/signup/**.
2. Fill in name + email, submit.
3. Copy the key from the confirmation page/email and paste it into the `apiKey` field.

The key is marked secret — this actor never stores or shares it.

### 🧾 Input configuration

```json
{
  "mode": "candidates",
  "query": "Warren",
  "maxResults": 25
}
```

Itemized contributions for a specific committee:

```json
{
  "mode": "contributions",
  "committeeId": "C00401224",
  "maxResults": 50,
  "apiKey": "YOUR_FREE_API_DATA_GOV_KEY"
}
```

| Input | Description |
| --- | --- |
| `mode` | **Required.** `candidates`, `committees`, or `contributions`. |
| `query` | Name to search — for `candidates` or `committees` modes. |
| `committeeId` | FEC committee ID (e.g. `C00401224`) — required for `contributions` mode. Find it via `committees` mode first. |
| `apiKey` | Your free api.data.gov key. Defaults to `DEMO_KEY` for small tests. |
| `maxResults` | Rows to return (1–100). Default 25. |

### 📤 Output format (one row per result)

**Candidate:**

```json
{
  "_mode": "candidate",
  "candidate_id": "S8MA00017",
  "name": "WARREN, ELIZABETH",
  "party": "Democratic Party",
  "office": "Senate",
  "state": "MA",
  "incumbent_challenge": "Incumbent",
  "election_years": [2012, 2018, 2024],
  "scraped_at": "2026-07-31T12:00:00.000Z"
}
```

**Committee:**

```json
{
  "_mode": "committee",
  "committee_id": "C00401224",
  "name": "ACTBLUE",
  "committee_type": "Independent Expenditure-Only Committee (Super PAC)",
  "party": "",
  "state": "MA",
  "treasurer_name": "SMITH, JOHN",
  "scraped_at": "2026-07-31T12:00:00.000Z"
}
```

**Contribution:**

```json
{
  "_mode": "contribution",
  "contributor_name": "SMITH, JANE",
  "contributor_employer": "SELF",
  "contributor_occupation": "ATTORNEY",
  "contributor_state": "CA",
  "amount": 250.0,
  "date": "2024-03-11",
  "recipient_committee": "ACTBLUE",
  "scraped_at": "2026-07-31T12:00:00.000Z"
}
```

### 💼 Common use cases

**Political journalism and opposition research** — pull a candidate's full committee network and itemized donor list in one call, instead of clicking through fec.gov page by page.

**Donor and PAC research** — search committees by name, then drill into Schedule A itemized contributions to see who's actually funding them.

**Campaign finance compliance monitoring** — watch a committee's contribution feed on a schedule to flag large or unusual donations early.

**Academic and data-journalism research** — build datasets of candidate, committee, and contribution data for election-finance studies without hand-scraping fec.gov.

**AI research agents** — give a political-research copilot live FEC data via MCP so it can answer "who funds this candidate?" or "what committees is this donor giving to?"

### 🚀 Getting started

1. Pick a `mode`.
2. For `candidates`/`committees`, set `query` to the name you're searching.
3. For `contributions`, set `committeeId` (find it via a `committees` search first).
4. Optionally add your free `apiKey` for higher rate limits, set `maxResults`, then click **Start**.
5. Download the dataset as JSON, CSV, or Excel, or pull it via API or MCP.

### Run on a schedule

Apify Console → this Actor → **Schedules** → Add schedule → pick a cadence (e.g. daily) → Save. It reruns with the same input automatically — useful for watching a committee's contribution feed over an election cycle.

### FAQ

**Do I need an API key?** No — `DEMO_KEY` works for small tests. For real volume, get a free api.data.gov key (see above); it removes DEMO\_KEY's tight rate limit.

**How much does it cost?** You pay per result actually delivered (tiered — cheaper the more you run). Empty searches and failed runs cost nothing.

**Is this official data?** Yes — served straight from the official OpenFEC API (api.open.fec.gov), the Federal Election Commission's own public data source.

**Can I look up a specific committee's donors directly?** Yes — use `committees` mode to find the committee's ID, then `contributions` mode with that `committeeId`.

**How current is the data?** OpenFEC reflects FEC filings as they're processed — the same source and freshness as fec.gov itself.

### Use in Claude, ChatGPT & any MCP agent

```
https://mcp.apify.com/?tools=themineworks/fec-campaign-finance
```

Or call it programmatically:

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('themineworks/fec-campaign-finance').call({
  mode: 'candidates',
  query: 'Warren',
  maxResults: 25,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

Data source: Federal Election Commission via api.open.fec.gov. Public-domain US government data. This is an independent tool and is not affiliated with or endorsed by the FEC.

# Actor input Schema

## `mode` (type: `string`):

What to fetch. 'candidates' and 'committees' search by name (use Query). 'contributions' pulls itemized individual donations for one committee (use Committee ID).

## `query` (type: `string`):

Name to search — for candidates or committees modes (e.g. Warren, ActBlue). Ignored in contributions mode.

## `committeeId` (type: `string`):

FEC committee ID (e.g. C00401224) — required for contributions mode. Find it via committees mode.

## `apiKey` (type: `string`):

Your free api.data.gov key. Leave blank to fall back to DEMO\_KEY for small tests; DEMO\_KEY is rate-limited, so get a free key at https://api.data.gov/signup/ for any real volume.

## `maxResults` (type: `integer`):

Maximum number of rows to return.

## Actor input object example

```json
{
  "mode": "candidates",
  "query": "Warren",
  "maxResults": 25
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "Warren",
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("themineworks/fec-campaign-finance").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "Warren",
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("themineworks/fec-campaign-finance").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "Warren",
  "maxResults": 25
}' |
apify call themineworks/fec-campaign-finance --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=themineworks/fec-campaign-finance",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/s2XsOE7ljmjtJrtOO/builds/6UnSPqgEpC2qfCQTn/openapi.json
