{
  "openapi": "3.0.1",
  "info": {
    "title": "US LDA Lobbying Client & Registrant New-Filing Watchlist",
    "description": "Watch lobbying client and/or registrant firm names; poll the official Senate LDA REST API (lda.gov); emit typed events only for new filing_uuid values for your book. Not an LDA dump; not Quorum/FiscalNote; not HTML scrape.",
    "version": "0.1",
    "x-build-id": "kr2DTwAvKZq2W2uGX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plym-actor-factory~us-lda-lobbying-filing-watchlist/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plym-actor-factory-us-lda-lobbying-filing-watchlist",
        "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/plym-actor-factory~us-lda-lobbying-filing-watchlist/runs": {
      "post": {
        "operationId": "runs-sync-plym-actor-factory-us-lda-lobbying-filing-watchlist",
        "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/plym-actor-factory~us-lda-lobbying-filing-watchlist/run-sync": {
      "post": {
        "operationId": "run-sync-plym-actor-factory-us-lda-lobbying-filing-watchlist",
        "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": {
          "clientNames": {
            "title": "Client names (watchlist)",
            "type": "array",
            "description": "Lobbying client names to watch (case-insensitive; normalized string / substring match). Prefer clientIds when known. DBA aliases may miss.",
            "default": [
              "ACME ENERGY CORP",
              "CONTOSO HEALTH INC"
            ],
            "items": {
              "type": "string"
            }
          },
          "registrantNames": {
            "title": "Registrant names (watchlist)",
            "type": "array",
            "description": "Lobbying registrant firm names to watch (case-insensitive; normalized string / substring match).",
            "default": [
              "SMITH & JONES LLP"
            ],
            "items": {
              "type": "string"
            }
          },
          "clientIds": {
            "title": "Client IDs (exact)",
            "type": "array",
            "description": "Optional Senate LDA client IDs (exact).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "registrantIds": {
            "title": "Registrant IDs (exact)",
            "type": "array",
            "description": "Optional Senate LDA registrant IDs (exact).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "filingYears": {
            "title": "Filing years",
            "type": "array",
            "description": "Filing years to poll (default: current calendar year).",
            "default": [
              2026
            ]
          },
          "postedAfter": {
            "title": "Posted after (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional lower bound on dt_posted (filing_dt_posted_after)."
          },
          "maxRunSeconds": {
            "title": "Max run seconds",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Wall-clock budget for this scheduled poll.",
            "default": 55
          },
          "maxEvents": {
            "title": "Max delivered filing events",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many unique billable filing events (excludes RUN_STATUS).",
            "default": 500
          },
          "resumeFromCheckpoint": {
            "title": "Resume from stored checkpoint",
            "type": "boolean",
            "description": "If true, resume seen filing_uuid values and event_uids from the default Key-Value Store.",
            "default": true
          },
          "sourceMode": {
            "title": "Source mode",
            "enum": [
              "fixture",
              "live"
            ],
            "type": "string",
            "description": "fixture = Store/CI default (RUN_STATUS only unless emitFixtureDemoEvents=true). live = official Senate LDA REST API.",
            "default": "fixture"
          },
          "emitFixtureDemoEvents": {
            "title": "Emit fixture demo filing events",
            "type": "boolean",
            "description": "When sourceMode=fixture, if true push fabricated filing events from local fixtures. Default false so Store auto-tests never charge lda-filing-event-delivered. SAMPLE rows only: demo events use placeholder entities (never real companies/IDs), are flagged sample=true / isSample=true, and are NEVER charged.",
            "default": false
          },
          "requestPaceMs": {
            "title": "Request pace (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Delay between LDA HTTP requests. Anonymous ≈ 15/min — default 4500ms. Optional ldaApiKey raises limit.",
            "default": 4500
          },
          "ldaApiKey": {
            "title": "LDA API key (optional)",
            "type": "string",
            "description": "Optional Senate LDA API key (Authorization: Token …) for higher rate limits."
          },
          "pageSize": {
            "title": "Page size",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "LDA filings page size (1–25).",
            "default": 25
          },
          "maxPagesPerQuery": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Max pages per watchlist query (CU / rate guard).",
            "default": 3
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}