{
  "openapi": "3.0.1",
  "info": {
    "title": "FEC Campaign-Finance Delta, Concentration & Donor Graph API",
    "description": "Track FEC filings & receipts: new-filing delta feed, donor/vendor concentration (HHI) analytics, and a contributor-committee graph. OpenFEC source.",
    "version": "1.0",
    "x-build-id": "zlIQybbXBxXqZxRtt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~fec-campaign-finance-delta/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-fec-campaign-finance-delta",
        "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/malonestar~fec-campaign-finance-delta/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-fec-campaign-finance-delta",
        "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/malonestar~fec-campaign-finance-delta/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-fec-campaign-finance-delta",
        "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": {
          "apiKey": {
            "title": "api.data.gov API key",
            "type": "string",
            "description": "Your FREE api.data.gov key for the OpenFEC API, sent as ?api_key=. Register in seconds at https://api.open.fec.gov/developers . DEMO_KEY works only for light testing (~30 requests/hour, shared IP) — bring your own key for real runs."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "delta",
              "concentration",
              "graph"
            ],
            "type": "string",
            "description": "search = list matching filings/receipts/disbursements; delta = only NEW rows (since a date and/or not seen in a prior run); concentration = top donors/vendors by summed amount with a Herfindahl (HHI) score; graph = contributor<->committee edge list.",
            "default": "search"
          },
          "dataType": {
            "title": "Data type",
            "enum": [
              "receipts",
              "disbursements",
              "filings"
            ],
            "type": "string",
            "description": "Which OpenFEC feed to pull: receipts = itemized contributions (schedule_a), disbursements = committee spending / vendor payments (schedule_b), filings = report filings feed (/filings). Concentration/graph work on receipts (donors) or disbursements (vendors).",
            "default": "receipts"
          },
          "committeeId": {
            "title": "Committee ID",
            "type": "string",
            "description": "FEC committee id to scope to, e.g. C00401224 (ActBlue). Strongly recommended for receipts/disbursements — narrows the huge itemized tables and avoids rate limits."
          },
          "candidateId": {
            "title": "Candidate ID",
            "type": "string",
            "description": "FEC candidate id to scope to, e.g. P80001571. Returns rows tied to that candidate's committees."
          },
          "name": {
            "title": "Contributor / recipient name",
            "type": "string",
            "description": "Free-text name filter. For receipts it matches the contributor name; for disbursements it matches the recipient/payee name. Ignored for filings."
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Two-letter state code, e.g. CA. For receipts = contributor state; for disbursements = recipient state; for filings = committee state."
          },
          "sinceDate": {
            "title": "Since date (YYYY-MM-DD)",
            "type": "string",
            "description": "Lower date bound. Maps to min_date (receipts/disbursements) or min_receipt_date (filings). Drives the delta/monitoring window. Empty = no lower bound."
          },
          "untilDate": {
            "title": "Until date (YYYY-MM-DD)",
            "type": "string",
            "description": "Upper date bound. Maps to max_date (receipts/disbursements) or max_receipt_date (filings). Empty = no upper bound."
          },
          "minAmount": {
            "title": "Minimum amount",
            "type": "string",
            "description": "Only return transactions at or above this dollar amount (receipts/disbursements only). Empty = no minimum."
          },
          "priorItems": {
            "title": "Prior items (delta mode)",
            "type": "array",
            "description": "Delta mode: the previous run's results (or a list of sub_id strings). Any row already present is treated as seen and excluded, leaving only new activity. The actor also keeps its own rolling seen-set in the key-value store for scheduled runs.",
            "default": []
          },
          "concentrationBy": {
            "title": "Concentration / graph entity",
            "enum": [
              "contributor",
              "employer",
              "recipient",
              "committee"
            ],
            "type": "string",
            "description": "Which entity to roll up for concentration/graph modes: contributor = donor name, employer = donor employer (industry concentration), recipient = vendor/payee (disbursements), committee = receiving committee.",
            "default": "contributor"
          },
          "topN": {
            "title": "Top N (concentration / graph)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Keep only the top N entities (concentration) or edges (graph), ranked by summed amount.",
            "default": 100
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Maximum number of itemized rows to fetch before delta/concentration/graph processing. Higher = more complete analytics but more API calls.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}