{
  "openapi": "3.0.1",
  "info": {
    "title": "FEC Campaign Finance - Political Donations & Donors",
    "description": "Search US federal campaign finance data. Find political donations by donor name, candidate, committee, employer, and state. Returns amounts, dates, PDF filing links. Free FEC API, no key required.",
    "version": "3.1",
    "x-build-id": "HYxMQDKlzqfCPHro4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~fec-campaign-finance/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-fec-campaign-finance",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/ryanclinton~fec-campaign-finance/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-fec-campaign-finance",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/ryanclinton~fec-campaign-finance/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-fec-campaign-finance",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchMode": {
            "title": "Search Mode",
            "enum": [
              "contributions",
              "candidates"
            ],
            "type": "string",
            "description": "What to search for: individual contributions or candidates.",
            "default": "contributions"
          },
          "mode": {
            "title": "Mode preset",
            "enum": [
              "raw",
              "due-diligence",
              "donor-profile",
              "committee-watch",
              "prospect-research",
              "compliance-screen",
              "monitoring",
              "opposition-research",
              "lobbying-intelligence",
              "graph",
              "intel-feed",
              "network-intelligence",
              "network-traversal"
            ],
            "type": "string",
            "description": "Bundle of opinionated defaults for a workflow. 'raw' = original v1 behaviour (no decisions, no cohort summary). 'due-diligence' = KYC-style screening with decision verdict. 'donor-profile' = deep dossier on one donor. 'committee-watch' = profile a candidate's donor base. 'prospect-research' = surface high-tier individual donors for B2B sales. 'compliance-screen' = strict KYC/PEP with tightened SLA. 'monitoring' = cross-run change detection (requires watchlistName). 'opposition-research' = surfaces controversial donors, cross-party giving, max-out behaviour. 'lobbying-intelligence' = industry concentration + employer clusters + committee-influence mapping. 'graph' = emit nodes + edges for Neo4j / Cytoscape / NetworkX.",
            "default": "raw"
          },
          "contributorName": {
            "title": "Donor Name",
            "type": "string",
            "description": "Search contributions by donor name (e.g. 'Elon Musk', 'Warren Buffett'). Used in contributions mode.",
            "default": "Elon Musk"
          },
          "candidateName": {
            "title": "Candidate Name",
            "type": "string",
            "description": "Search by candidate name (e.g. 'Trump', 'Biden'). Used in candidates mode."
          },
          "committeeName": {
            "title": "Committee Name",
            "type": "string",
            "description": "Filter by receiving committee/PAC name (e.g. 'America PAC')."
          },
          "contributorEmployer": {
            "title": "Employer",
            "type": "string",
            "description": "Filter contributions by donor's employer (e.g. 'Google', 'Goldman Sachs')."
          },
          "contributorState": {
            "title": "State",
            "type": "string",
            "description": "Filter by donor/candidate state (2-letter code, e.g. 'CA', 'TX', 'NY')."
          },
          "minAmount": {
            "title": "Min Amount ($)",
            "type": "integer",
            "description": "Minimum contribution amount in dollars."
          },
          "electionYear": {
            "title": "Election Year",
            "type": "integer",
            "description": "Election cycle year (even years: 2020, 2022, 2024, 2026).",
            "default": 2024
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of records to return.",
            "default": 100
          },
          "persona": {
            "title": "Persona (advanced — overrides mode default)",
            "enum": [
              "compliance-officer",
              "journalist",
              "sales-intelligence",
              "political-strategist",
              "opposition-research",
              "lobbying-intelligence",
              "procurement-officer",
              "generic"
            ],
            "type": "string",
            "description": "Who consumes the output. Shapes which signals escalate and which are suppressed. 'compliance-officer' aggressively flags max-outs / foreign addresses / PAC concentration. 'journalist' surfaces large donations + partisan flips. 'sales-intelligence' surfaces individual donors with strong giving + employer signal. 'political-strategist' weights partisan + committee distribution. 'opposition-research' surfaces cross-party donors + super-PAC bundling + employer clusters. 'lobbying-intelligence' weights employer concentration + PAC concentration heavily. 'procurement-officer' flags vendors with significant political exposure for conflict-of-interest review. 'generic' = no shaping."
          },
          "goal": {
            "title": "Goal (advanced — overrides mode default)",
            "enum": [
              "screening",
              "dossier",
              "monitoring",
              "discovery",
              "generic"
            ],
            "type": "string",
            "description": "What outcome the user wants. 'screening' tightens flag threshold (fewer flags). 'dossier' lowers the threshold (more findings). 'monitoring' focuses on change detection. 'discovery' loosens flagging."
          },
          "outputProfile": {
            "title": "Output profile (advanced — overrides mode default)",
            "enum": [
              "minimal",
              "standard",
              "full",
              "llm"
            ],
            "type": "string",
            "description": "Field shape on every record. 'minimal' = key fields only. 'standard' = decisions + key context. 'full' = every internal field. 'llm' = decisions + reasons + actorGraph (LLM-friendly)."
          },
          "watchlistName": {
            "title": "Watchlist name (cross-run state)",
            "type": "string",
            "description": "Persistent watchlist key. When set, the actor stores donor snapshots in a named KV store and surfaces a 'delta' block per record (new / changed / unchanged / recovered / degraded). First run baselines; run 2+ surfaces deltas. Required for mode='monitoring'. Different watchlistName values keep separate state — pick a stable name per use case."
          },
          "enableCohortSummary": {
            "title": "Cohort summary (advanced — overrides mode default)",
            "type": "boolean",
            "description": "Emit a 'cohort-summary' record at end of run with totals, top employers/occupations/committees/states, partisan distribution, donor-tier distribution, and notable findings."
          },
          "enableDecisionEngine": {
            "title": "Decision engine (advanced — overrides mode default)",
            "type": "boolean",
            "description": "Apply per-donor decision engine: tier classification, partisan lean, max-out detection, risk level, escalation routing, suite navigation. Off in 'raw' mode."
          },
          "enableInfluenceScoring": {
            "title": "Influence scoring",
            "type": "boolean",
            "description": "Compute per-donor influence score (0-100) from total amount, committee spread, super-PAC / leadership-PAC weighting, candidate targeting, velocity, and max-out behaviour. Mirrored to DONOR_INFLUENCE_PROFILES KV.",
            "default": true
          },
          "enableGeoEnrichment": {
            "title": "Geographic enrichment",
            "type": "boolean",
            "description": "Enrich each contribution with metro area (top US metros), swing-state flag (PA/MI/WI/AZ/GA/NV/NC), and elite-ZIP detection (top-percentile mean AGI ZIPs).",
            "default": true
          },
          "enableSectorClassification": {
            "title": "Sector classification",
            "type": "boolean",
            "description": "Classify each contribution's employer into a sector (technology / finance / hedge-fund / private-equity / law / healthcare / pharmaceutical / energy / defense / etc.). Curated lookup of top FEC employers — use ryanclinton/company-deep-research for deeper company dossiers.",
            "default": true
          },
          "groupBy": {
            "title": "Group by (aggregation engine)",
            "enum": [
              "employer",
              "committee",
              "occupation",
              "state",
              "metro",
              "sector",
              "candidate",
              "donor",
              "committee-kind"
            ],
            "type": "string",
            "description": "Return one aggregate record per group — totals, donor counts, partisan lean, top flags. Distinct from cohort-summary's top-5 lists; this returns the full grouped breakdown for BI / dashboards."
          },
          "crossCycleYears": {
            "title": "Cross-cycle years (partisan-shift detection)",
            "type": "array",
            "description": "Re-fetch contributions across multiple election cycles for the supplied contributor name and detect partisan shifts (D→R, R→D, partisan→mixed). Requires contributorName. Each cycle is a separate FEC fetch — costs PPE per record returned. Example: [2020, 2022, 2024]."
          },
          "enableDataQualityReport": {
            "title": "Data-quality + coverage report",
            "type": "boolean",
            "description": "Emit a 'data-quality' record at the end of the run with coverage % per dimension (donor canonical-ID resolution, employer match, sector mapping, metro mapping, state, ZIP, candidate-party, amendments, memo text), weak-area callouts, unresolved employers, unknown sectors, weak donor matches, and an audit-trust level (high/medium/low). Mirrored to COVERAGE_SUMMARY KV.",
            "default": true
          },
          "explainabilityLevel": {
            "title": "Explainability level",
            "enum": [
              "none",
              "compact",
              "full"
            ],
            "type": "string",
            "description": "Verbosity of per-record explanation fields. 'none' strips evidence/counterEvidence/reasons/whyThisMatters (smallest payload). 'compact' (default) keeps top-2 evidence + top-2 reasons + summary/whyThisMatters. 'full' keeps the entire decision trace. Use 'none' for high-volume CRM ingest; 'full' for analyst review.",
            "default": "compact"
          },
          "enableRelationships": {
            "title": "Relationship intelligence (v3)",
            "type": "boolean",
            "description": "Detect households (same ZIP + last name), executive networks (same employer + senior title + significant amount), bundler clusters (5+ donors at same employer in 14-day window), and likely-spousal pairs. Emit `recordType: \"relationship-cluster\"` records + edges. Mirrored to RELATIONSHIPS KV.",
            "default": true
          },
          "enableCentrality": {
            "title": "Network centrality (v3)",
            "type": "boolean",
            "description": "Compute PageRank-style centrality on the donor↔committee↔candidate graph. Emit politicalReachIndex (0-100) + crossSectorReach + pagerankTier (top-1pct / top-5pct / top-10pct / top-25pct / rest). Mirrored to CENTRALITY KV (top-50 nodes).",
            "default": true
          },
          "enableEmergingDetection": {
            "title": "Emerging-influence detection (v3)",
            "type": "boolean",
            "description": "Detect breakout / accelerating / plateauing / declining donor trajectories. Emit `recordType: \"emerging-profile\"` records for breakout + accelerating donors with `eventType: POLITICAL.DONOR_BREAKOUT` for downstream automation. Mirrored to EMERGING_PROFILES KV.",
            "default": true
          },
          "enableNarratives": {
            "title": "Narrative engine (v3)",
            "type": "boolean",
            "description": "Emit typed `recordType: \"narrative\"` records — employer-coordination, executive-network-activation, household-cluster, super-pac-bundling-narrative, max-out-cluster, cross-party-pattern, breakout-emergence, committee-saturation. Each carries eventType / eventSeverity / eventDedupKey for idempotent webhook delivery. Mirrored to NARRATIVES KV.",
            "default": true
          },
          "enableReproducibilityHashes": {
            "title": "Reproducibility hashes (v3)",
            "type": "boolean",
            "description": "Add `decisionHash` / `classificationHash` / `evidenceHash` per contribution — SHA-256 digests of the decision shape + classification enums + evidence arrays. Same input + same internal rule version produces the same digest. Compliance audit unlock.",
            "default": true
          },
          "enablePriorityRanking": {
            "title": "Priority ranking (v3.1)",
            "type": "boolean",
            "description": "Collapse anomalies + narratives + emerging-profiles + clusters into a single ranked `recordType: \"priority-ranking\"` list. Each record gets `priorityScore` 0-100 + `priorityTier` (P0-investigate-now / P1-this-week / P2-monitor / P3-archive) + `priorityReasons[]`. Mirrored to PRIORITY_RANKING KV.",
            "default": true
          },
          "enableEliteClusterScoring": {
            "title": "Elite-cluster significance scoring (v3.1)",
            "type": "boolean",
            "description": "Score each relationship cluster on density × exclusivity × centrality × cross-sector reach × timing synchrony × committee overlap × seniority density. Emit `recordType: \"elite-cluster-significance\"` records with `significanceTier` (institutional / high / notable / background). Pure structural signals — NO semantic labels. Mirrored to ELITE_CLUSTERS KV.",
            "default": true
          },
          "enableForecasting": {
            "title": "Trajectory forecasting (v3.1)",
            "type": "boolean",
            "description": "Deterministic trajectory projections — emit `recordType: \"forecast\"` records: likely-emerging-mega-donor, likely-future-bundler, cluster-expansion-likely, cooling-trajectory. Heuristic projections, NOT ML predictions. Each carries explicit methodology + caveats. Mirrored to FORECASTS KV.",
            "default": true
          },
          "enablePoliticalMemory": {
            "title": "Political memory graph (v3.1)",
            "type": "boolean",
            "description": "Persistent network evolution across runs. Tracks per-cluster firstSeenAt / lastSeenAt / runsSeen / persistence (transient / recurring / durable / institutional) + per-donor lifecycleStage (new / returning / sustained / durable). Requires `watchlistName`. Mirrored to NETWORK_MEMORY + DONOR_LIFECYCLE KVs (separate named store from the standard watchlist).",
            "default": true
          },
          "seedDonor": {
            "title": "Seed donor (network-traversal mode)",
            "type": "string",
            "description": "donorCanonicalId from a prior run (format: donor_<12-char-hash>). Required when mode=network-traversal. The actor BFS-traverses the relationship graph from this seed."
          },
          "traversalDepth": {
            "title": "Traversal depth",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "BFS depth from the seed donor. 1 = direct connections only; 2 = friends-of-friends; 3+ = wider net. Defaults to 2.",
            "default": 2
          },
          "traversalEdgeTypes": {
            "title": "Traversal edge types",
            "type": "array",
            "description": "Which relationship-edge types to traverse. Defaults to same-household + executive-network + donor-network + bundler-cluster. Add likely-spousal for tighter household analysis."
          },
          "apiKey": {
            "title": "FEC API Key",
            "type": "string",
            "description": "Free API key from api.open.fec.gov (optional, DEMO_KEY used by default with 1000/hr rate limit)."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}