{
  "openapi": "3.0.1",
  "info": {
    "title": "⚖️ Campaign Finance Scraper",
    "description": "Track federal campaign filings and lobbying activity to ensure compliance. Extract docket numbers, filing dates, and direct URLs for your watchlist.",
    "version": "0.1",
    "x-build-id": "SYe31FOAhgWjTjD6E"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taroyamada~campaign-finance-lobbying-digest/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taroyamada-campaign-finance-lobbying-digest",
        "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/taroyamada~campaign-finance-lobbying-digest/runs": {
      "post": {
        "operationId": "runs-sync-taroyamada-campaign-finance-lobbying-digest",
        "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/taroyamada~campaign-finance-lobbying-digest/run-sync": {
      "post": {
        "operationId": "run-sync-taroyamada-campaign-finance-lobbying-digest",
        "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": {
          "feeds": {
            "title": "Feeds",
            "minItems": 1,
            "type": "array",
            "description": "One digest row is emitted per configured feed. Use lda_filings for anonymous/no-key quickstarts. Use fec_committee when you can provide fecApiKey or FEC_API_KEY.",
            "items": {
              "type": "object",
              "required": [
                "source"
              ],
              "properties": {
                "id": {
                  "title": "Feed ID",
                  "type": "string",
                  "description": "Stable identifier used for snapshots and recurring runs."
                },
                "name": {
                  "title": "Feed name",
                  "type": "string",
                  "description": "Human-readable label for the digest row."
                },
                "source": {
                  "title": "Source",
                  "type": "string",
                  "enum": [
                    "fec_committee",
                    "lda_filings"
                  ],
                  "enumTitles": [
                    "FEC committee reports",
                    "LDA filings"
                  ],
                  "description": "fec_committee monitors official OpenFEC committee reports. lda_filings monitors official LDA.gov filing activity."
                },
                "committeeId": {
                  "title": "FEC committee ID",
                  "type": "string",
                  "description": "Required for fec_committee feeds."
                },
                "cycle": {
                  "title": "Election cycle",
                  "type": "integer",
                  "description": "Optional FEC cycle filter such as 2024 or 2026."
                },
                "registrantId": {
                  "title": "LDA registrant ID",
                  "type": "string",
                  "description": "Optional exact registrant identifier for narrowing LDA filing results."
                },
                "registrantName": {
                  "title": "LDA registrant name",
                  "type": "string",
                  "description": "Optional registrant-name filter for LDA filings."
                },
                "clientId": {
                  "title": "LDA client ID",
                  "type": "string",
                  "description": "Optional exact client identifier for narrowing LDA filing results."
                },
                "clientName": {
                  "title": "LDA client name",
                  "type": "string",
                  "description": "Optional client-name filter for LDA filings."
                },
                "filingTypes": {
                  "title": "LDA filing types",
                  "type": "array",
                  "description": "Optional LDA filing type filters. Leave empty for a broader watch.",
                  "items": {
                    "type": "string"
                  }
                },
                "lookbackDays": {
                  "title": "Feed-specific lookback days",
                  "type": "integer",
                  "description": "Optional override for the global lookback window."
                }
              }
            }
          },
          "watchTerms": {
            "title": "Watch terms",
            "type": "string",
            "description": "Comma- or newline-separated terms. Matching committees, clients, issues, or agencies elevate digests to action_needed."
          },
          "lookbackDays": {
            "title": "Lookback days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Default lookback window used when a feed-specific override is not provided.",
            "default": 45
          },
          "maxEvidencePerFeed": {
            "title": "Max evidence per feed",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Upper bound on normalized evidence items retained for each feed.",
            "default": 25
          },
          "maxPagesPerFeed": {
            "title": "Max pages per feed",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Upper bound on paginated API requests per feed during one run.",
            "default": 2
          },
          "delivery": {
            "title": "Delivery",
            "enum": [
              "dataset",
              "webhook"
            ],
            "type": "string",
            "description": "dataset writes digest rows to the Apify dataset. webhook POSTs the digest payload to webhookUrl.",
            "default": "dataset"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST target used when delivery=webhook."
          },
          "datasetMode": {
            "title": "Dataset mode",
            "enum": [
              "all",
              "action_needed",
              "new_only"
            ],
            "type": "string",
            "description": "Choose whether dataset/webhook delivery includes all digests, only action-needed digests, or only feeds with new evidence.",
            "default": "all"
          },
          "snapshotKey": {
            "title": "Snapshot key",
            "type": "string",
            "description": "Stable key used to persist seen evidence across recurring runs.",
            "default": "campaign-finance-lobbying-digest-state"
          },
          "fecApiKey": {
            "title": "FEC API key",
            "type": "string",
            "description": "Optional here, or provide FEC_API_KEY in the environment."
          },
          "ldaApiToken": {
            "title": "LDA API token",
            "type": "string",
            "description": "Optional. Anonymous LDA requests work for modest quickstarts."
          },
          "requestTimeoutSeconds": {
            "title": "Request timeout seconds",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for each FEC or LDA HTTP request.",
            "default": 30
          },
          "notifyOnNoNew": {
            "title": "Notify when no new filings",
            "type": "boolean",
            "description": "When false, stable feeds are omitted from delivery outputs unless they errored.",
            "default": true
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Skip snapshot writes and delivery while still producing local output.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}