{
  "openapi": "3.0.1",
  "info": {
    "title": "Congress & Insider Trades API — STOCK Act PTRs + SEC Form 4",
    "description": "Every disclosed trade by people legally required to disclose one, in one schema: House and Senate periodic transaction reports and SEC Form 4. Ticker, side, parsed amount ranges, party, state, committees, days to disclose and late-filing flags on every row. Primary .gov sources only. No API key.",
    "version": "0.1",
    "x-build-id": "bqk0aKIgVCvXoKI2M"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insight.solutions~congress-insider-trades-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insight.solutions-congress-insider-trades-api",
        "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/insight.solutions~congress-insider-trades-api/runs": {
      "post": {
        "operationId": "runs-sync-insight.solutions-congress-insider-trades-api",
        "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/insight.solutions~congress-insider-trades-api/run-sync": {
      "post": {
        "operationId": "run-sync-insight.solutions-congress-insider-trades-api",
        "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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which disclosure systems to read. `house` and `senate` are STOCK Act periodic transaction reports filed by members of Congress; `form4` is the SEC Form 4 filed by corporate officers, directors and ten-percent owners. All three produce the same columns, so a run over all three is one table.",
            "items": {
              "type": "string",
              "enum": [
                "house",
                "senate",
                "form4"
              ],
              "enumTitles": [
                "House of Representatives (PTR)",
                "Senate (PTR)",
                "SEC Form 4 (corporate insiders)"
              ]
            },
            "default": [
              "house",
              "senate",
              "form4"
            ]
          },
          "chamber": {
            "title": "Chamber",
            "enum": [
              "both",
              "house",
              "senate"
            ],
            "type": "string",
            "description": "Restrict the congressional half to one chamber. Choosing one also switches the other one's source off, so nothing is fetched and then thrown away. Has no effect on Form 4.",
            "default": "both"
          },
          "dateBasis": {
            "title": "Date basis",
            "enum": [
              "disclosure",
              "transaction"
            ],
            "type": "string",
            "description": "Which date the window applies to. `disclosure` is the date the filing was submitted — use it for \"what was disclosed this week\". `transaction` is the date the trade happened — use it for \"what was traded in March\", remembering that those trades may not have been disclosed until 45 days later.",
            "default": "disclosure"
          },
          "userAgentContact": {
            "title": "SEC User-Agent contact (required for Form 4)",
            "type": "string",
            "description": "Your organisation and a working contact address, e.g. 'Acme Research data@acme.com'. The SEC requires every automated request to declare who is making it and how to reach them (sec.gov/os/accessing-edgar-data), and answers HTTP 403 without it. The pre-filled value is the publisher's own contact so the example run works out of the box; please replace it with yours for real use, so the SEC reaches you, not us, about your traffic."
          },
          "party": {
            "title": "Party",
            "enum": [
              "any",
              "D",
              "R",
              "I"
            ],
            "type": "string",
            "description": "Filter members of Congress by party. Party comes from the public `congress-legislators` dataset; a member who cannot be matched to it has no party and is excluded when you set this. Corporate insiders are not affected.",
            "default": "any"
          },
          "members": {
            "title": "Members of Congress",
            "type": "array",
            "description": "Only these members. Write them however you like — `Pelosi`, `Nancy Pelosi` or `Tuberville, Tommy`. Matched case-insensitively on the surname, with the given name as a prefix when you supply one. Leave empty for every member. Applied to the filing index before any document is downloaded, so a narrow list is a fast, cheap run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "tickers": {
            "title": "Tickers",
            "type": "array",
            "description": "Only trades in these tickers, e.g. `[\"NVDA\", \"AAPL\"]`. Applies to both halves of the table. A disclosed asset with no ticker — a bond, a fund, a private holding — cannot match a ticker filter and is excluded when you set one.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "issuers": {
            "title": "Form 4 issuers",
            "type": "array",
            "description": "Companies whose insiders you want, as tickers or CIKs, e.g. `[\"NVDA\", \"0000320193\"]`. Tickers are resolved through SEC's own `company_tickers.json`; a company name is not guessed at. Leave empty to take the latest Form 4s market-wide instead.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Date from (ISO)",
            "type": "string",
            "description": "Start of the window, e.g. `2026-01-01`. Leave empty and the run uses the last 60 days, computed when it starts. Which date this applies to is set by `dateBasis`.",
            "default": ""
          },
          "dateTo": {
            "title": "Date to (ISO)",
            "type": "string",
            "description": "End of the window, e.g. `2026-06-30`. Leave empty for \"up to today\". Setting an end date in the past switches the market-wide Form 4 half from the live latest-filings feed to EDGAR's settled daily index for those days.",
            "default": ""
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two-letter state codes, e.g. `[\"CA\", \"TX\"]`. Filters members of Congress by the state they represent. Corporate insiders have no state and are not affected.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "committees": {
            "title": "Committees",
            "type": "array",
            "description": "Only members who sit on a committee whose name contains one of these, e.g. `[\"Energy and Commerce\"]`. Case-insensitive substring match on the full committee name; top-level committees only, not subcommittees. Corporate insiders are not affected.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "ownerTypes": {
            "title": "Owner types",
            "type": "array",
            "description": "Whose account the trade was in: the member (`self`), their `spouse`, a `joint` account or a `dependent` child. Congressional filings only — Form 4 has no equivalent field and is not affected. Leave empty for all four.",
            "items": {
              "type": "string",
              "enum": [
                "self",
                "spouse",
                "joint",
                "dependent"
              ],
              "enumTitles": [
                "Self",
                "Spouse",
                "Joint",
                "Dependent child"
              ]
            },
            "default": []
          },
          "transactionTypes": {
            "title": "Transaction types",
            "type": "array",
            "description": "Filter by side. `buy` is a purchase (House `P`, Senate `Purchase`, Form 4 code `P`); `sell` is a sale; `exchange` is a House/Senate exchange; `other` is everything else, including Form 4 grants, option exercises, gifts and tax withholdings. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "buy",
                "sell",
                "exchange",
                "other"
              ],
              "enumTitles": [
                "Buy",
                "Sell",
                "Exchange",
                "Other"
              ]
            },
            "default": []
          },
          "transactionCodes": {
            "title": "Form 4 transaction codes",
            "type": "array",
            "description": "Section 16 transaction codes to keep, e.g. `[\"P\", \"S\"]` for open-market purchases and sales only. P purchase, S sale, A grant or award, F tax withholding, M option exercise, X exercise, G gift, D disposition to the issuer, C conversion, J other. Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "reporterRoles": {
            "title": "Form 4 reporter roles",
            "type": "array",
            "description": "Only Form 4s filed by someone in one of these roles. A filer can hold more than one. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "officer",
                "director",
                "tenPercentOwner",
                "other"
              ],
              "enumTitles": [
                "Officer",
                "Director",
                "Ten-percent owner",
                "Other"
              ]
            },
            "default": []
          },
          "includeDerivative": {
            "title": "Include derivative transactions",
            "type": "boolean",
            "description": "Include Form 4 Table II lines — options, RSUs, convertible securities — alongside the ordinary share transactions in Table I. They carry the underlying security in `assetName` and `derivative` in `assetType`.",
            "default": true
          },
          "minAmount": {
            "title": "Minimum amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only trades worth at least this much. Congressional filings report a band, so the comparison is against the top of the band — `50000` keeps a `$15,001 - $50,000` trade, because it may have been fifty thousand dollars. Form 4 reports a real figure and is compared to that; a Form 4 line with no price at all (a grant, a tax withholding) cannot satisfy a minimum and is excluded.",
            "default": 0
          },
          "lateFilingsOnly": {
            "title": "Late filings only",
            "type": "boolean",
            "description": "Only transactions disclosed after the deadline — more than 45 days after the trade for a member of Congress, more than two days for a Form 4. This is arithmetic on the two dates on the filing, not an allegation.",
            "default": false
          },
          "includeSummary": {
            "title": "Include free summary rows",
            "type": "boolean",
            "description": "Add per-ticker and per-member summary rows, plus cluster rows where three or more members bought the same ticker within 30 days of each other. Computed from this run's own rows, and never charged.",
            "default": true
          },
          "maxFilingsPerIssuer": {
            "title": "Max Form 4 filings per issuer",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many of each issuer's Form 4 filings to read, newest first. Only used when `issuers` is set.",
            "default": 25
          },
          "maxTransactions": {
            "title": "Max transactions",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "The most transaction rows this run may return, across every source. This is the number you are billed for. 0 means no cap.",
            "default": 500
          },
          "maxFilings": {
            "title": "Max filings per source",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The most filings to read from each source. A filing usually carries several transactions, so this is a bound on the work, not on the rows.",
            "default": 200
          },
          "maxHouseFilings": {
            "title": "Max House PDFs",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "A separate, lower ceiling on the House leg. Every House filing is a PDF that has to be downloaded and its text laid back out, which is the slowest thing this Actor does — so the House cap is the one to raise deliberately.",
            "default": 40
          },
          "incremental": {
            "title": "Incremental (only new filings)",
            "type": "boolean",
            "description": "Remember which House DocIDs, Senate report IDs and EDGAR accession numbers this Actor has already returned, and skip them next time. This is the cheap way to run a daily monitor: the first run reads the window, and every run after it returns only what was filed since.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "pattern": "^[a-zA-Z0-9-]{3,63}$",
            "type": "string",
            "description": "Name of the key-value store that keeps the incremental cursor (the House DocIDs, Senate report IDs and Form 4 accession numbers already returned). Only used when \"incremental\" is on. Use a different name to keep separate monitors apart.",
            "default": "congress-insider-trades-state"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many filings to read at once within a source. Each parallel worker keeps its own proxy session, so one blocked exit IP does not burn the others.",
            "default": 4
          },
          "maxRunSecs": {
            "title": "Max run seconds",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Wall-clock budget for the whole run. When it runs out, the rows already written are kept and a free diagnostic row says where the walk stopped.",
            "default": 240
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The House Clerk's site is behind a bot filter that refuses datacenter addresses, and Senate eFD is reachable from United States addresses only — hence the US residential default. SEC EDGAR requests always go direct, whatever you set here: EDGAR rate-limits per IP and asks for a contact address, so a proxy there buys nothing.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}