{
  "openapi": "3.0.1",
  "info": {
    "title": "Capitol Trades Scraper: Congress Stock Trades and Monitor Mode",
    "description": "Extract every Congress stock trade from Capitol Trades: politician bio, sector tags, and a disclosure comment field competitors miss. Turn on monitor mode for scheduled trade alerts, the automation Unusual Whales charges $60 a month for. Pay per event, no subscription: $0.62 per 1,000 trades.",
    "version": "0.3",
    "x-build-id": "nRESRBiamEK0yOQ6s"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~capitol-trades-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-capitol-trades-scraper",
        "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/getascraper~capitol-trades-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-capitol-trades-scraper",
        "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/getascraper~capitol-trades-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-capitol-trades-scraper",
        "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": {
          "politicians": {
            "title": "Politicians",
            "type": "array",
            "description": "Optional bioguide IDs to filter to specific members of Congress (e.g. P000197 for Nancy Pelosi). Leave empty to scrape all politicians.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "party": {
            "title": "Party",
            "enum": [
              "",
              "democrat",
              "republican"
            ],
            "type": "string",
            "description": "Filter to trades by members of one party.",
            "default": ""
          },
          "chamber": {
            "title": "Chamber",
            "enum": [
              "",
              "house",
              "senate"
            ],
            "type": "string",
            "description": "Filter to trades by House or Senate members.",
            "default": ""
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Two-letter state code to filter to (e.g. ca, ny).",
            "default": ""
          },
          "txType": {
            "title": "Transaction type",
            "enum": [
              "",
              "buy",
              "sell"
            ],
            "type": "string",
            "description": "Filter to buy or sell trades only.",
            "default": ""
          },
          "tickerOrIssuer": {
            "title": "Ticker or issuer",
            "type": "array",
            "description": "Keep only trades in specific companies, by stock ticker (e.g. NVDA, AAPL) or issuer name (e.g. Apple, Nvidia). Case-insensitive: a ticker must match exactly, an issuer name matches on partial text of three or more letters. Specific tickers and companies are looked up directly, so only their trades are read and the search is quick. Leave empty for every company. The competing solidcode scraper exposes an issuer filter but no feed; pairing this with Monitor mode turns a scheduled run into a per-stock trade-alert feed.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Traded on or after",
            "type": "string",
            "description": "Keep only trades whose trade date is on or after this day (YYYY-MM-DD). Leave empty for no lower bound.",
            "default": ""
          },
          "dateTo": {
            "title": "Traded on or before",
            "type": "string",
            "description": "Keep only trades whose trade date is on or before this day (YYYY-MM-DD). Leave empty for no upper bound.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "A real browser session is required to load Capitol Trades. Residential is recommended for reliability.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "When enabled, each run only pushes trades that earlier runs of the same search have not delivered yet, so a scheduled run acts as a trade-alert feed. Trades already delivered are not pushed or charged again. The first run returns the newest trades and sets the starting point. Changing any filter starts a separate feed.",
            "default": false
          },
          "resetMonitor": {
            "title": "Start monitor mode fresh",
            "type": "boolean",
            "description": "Only used with Monitor mode. Forget which trades earlier runs of this same search already delivered, so this run starts the feed again from the newest trades. Leave off for normal scheduled runs.",
            "default": false
          },
          "maxItems": {
            "title": "Max trades",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many trade records.",
            "default": 20
          },
          "maxScanSeconds": {
            "title": "Maximum search time",
            "minimum": 0,
            "maximum": 3000,
            "type": "integer",
            "description": "Only used when the search has to look through the newest trades page by page: a trade-date range, or a company text that matches too many companies to pick out (for example \"inc\"). Searching for a specific ticker or company does not need it. The run stops after this many seconds and returns what it found. Raise it to search further back, or add a politician, party, chamber or state filter. 0 means no limit.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}