{
  "openapi": "3.0.1",
  "info": {
    "title": "Congress Stock Trades Scraper - House and Senate PTRs",
    "description": "Stock trades members of Congress disclose in their periodic transaction reports, one row per trade: member, state, owner, ticker, purchase or sale, trade and disclosure dates, amount range and a link to the filing. Read from the House Clerk's and the Senate's own sites. No API key.",
    "version": "0.1",
    "x-build-id": "dn6GlXNfYqLdxJvEC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~congress-stock-trades-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-congress-stock-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/dami_studio~congress-stock-trades-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-congress-stock-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/dami_studio~congress-stock-trades-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-congress-stock-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": {
          "lastDays": {
            "title": "Last days",
            "minimum": 1,
            "maximum": 3660,
            "type": "integer",
            "description": "Filings disclosed in the last N days, today included. 7 means this week's filings, which suits a daily or weekly schedule. Used when Disclosed from is empty."
          },
          "disclosedFrom": {
            "title": "Disclosed from",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "The first day a filing was disclosed, as YYYY-MM-DD. Periodic transaction reports start in 2012. Leave it empty to use Last days instead."
          },
          "disclosedTo": {
            "title": "Disclosed to",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "The last day. Leave it empty to run up to today."
          },
          "chamber": {
            "title": "Chamber",
            "enum": [
              "both",
              "house",
              "senate"
            ],
            "type": "string",
            "description": "Which chamber's filings to read.",
            "default": "both"
          },
          "members": {
            "title": "Members",
            "maxItems": 100,
            "type": "array",
            "description": "Names, whole or in part: Pelosi, Nancy Pelosi, Tuberville. A filing matches when the member's name holds every word of one of these. Leave it empty for everyone.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Members from these states. The House also has delegates for DC and the territories. Leave it empty for every state.",
            "items": {
              "type": "string",
              "enum": [
                "AL",
                "AK",
                "AZ",
                "AR",
                "CA",
                "CO",
                "CT",
                "DE",
                "FL",
                "GA",
                "HI",
                "ID",
                "IL",
                "IN",
                "IA",
                "KS",
                "KY",
                "LA",
                "ME",
                "MD",
                "MA",
                "MI",
                "MN",
                "MS",
                "MO",
                "MT",
                "NE",
                "NV",
                "NH",
                "NJ",
                "NM",
                "NY",
                "NC",
                "ND",
                "OH",
                "OK",
                "OR",
                "PA",
                "RI",
                "SC",
                "SD",
                "TN",
                "TX",
                "UT",
                "VT",
                "VA",
                "WA",
                "WV",
                "WI",
                "WY",
                "DC",
                "PR",
                "GU",
                "VI",
                "AS",
                "MP"
              ],
              "enumTitles": [
                "Alabama",
                "Alaska",
                "Arizona",
                "Arkansas",
                "California",
                "Colorado",
                "Connecticut",
                "Delaware",
                "Florida",
                "Georgia",
                "Hawaii",
                "Idaho",
                "Illinois",
                "Indiana",
                "Iowa",
                "Kansas",
                "Kentucky",
                "Louisiana",
                "Maine",
                "Maryland",
                "Massachusetts",
                "Michigan",
                "Minnesota",
                "Mississippi",
                "Missouri",
                "Montana",
                "Nebraska",
                "Nevada",
                "New Hampshire",
                "New Jersey",
                "New Mexico",
                "New York",
                "North Carolina",
                "North Dakota",
                "Ohio",
                "Oklahoma",
                "Oregon",
                "Pennsylvania",
                "Rhode Island",
                "South Carolina",
                "South Dakota",
                "Tennessee",
                "Texas",
                "Utah",
                "Vermont",
                "Virginia",
                "Washington",
                "West Virginia",
                "Wisconsin",
                "Wyoming",
                "District of Columbia",
                "Puerto Rico",
                "Guam",
                "U.S. Virgin Islands",
                "American Samoa",
                "Northern Mariana Islands"
              ]
            }
          },
          "districts": {
            "title": "House districts",
            "maxItems": 200,
            "type": "array",
            "description": "Seats written like CA11 or NY14. An at-large seat is 00, as in AK00. Senators have no district, so giving one reads House filings only.",
            "items": {
              "type": "string"
            }
          },
          "tradedFrom": {
            "title": "Traded from",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only trades made on or after this day. Members have up to 45 days to disclose a trade, so a trade from last month can sit in a filing disclosed this week."
          },
          "tradedTo": {
            "title": "Traded to",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only trades made on or before this day."
          },
          "tickers": {
            "title": "Tickers",
            "maxItems": 200,
            "type": "array",
            "description": "Only these tickers, such as NVDA or BRK.B. Many rows have no ticker at all (bonds, private companies, funds held in an account), and those never match.",
            "items": {
              "type": "string"
            }
          },
          "transactionTypes": {
            "title": "Transaction types",
            "type": "array",
            "description": "Leave it empty for all four.",
            "items": {
              "type": "string",
              "enum": [
                "purchase",
                "sale",
                "partial-sale",
                "exchange"
              ],
              "enumTitles": [
                "Purchase",
                "Sale (the whole holding)",
                "Partial sale",
                "Exchange"
              ]
            }
          },
          "minAmount": {
            "title": "Minimum amount",
            "enum": [
              "1001",
              "15001",
              "50001",
              "100001",
              "250001",
              "500001",
              "1000001",
              "5000001",
              "25000001",
              "50000001"
            ],
            "type": "string",
            "description": "Filings give an amount range, not a figure. This keeps trades whose range starts at or above the one you pick."
          },
          "assetTypes": {
            "title": "Asset types",
            "type": "array",
            "description": "Each row's category comes from how the member filed it. The Senate files most ETFs under Stock, for instance, so ETF finds mostly House rows.",
            "items": {
              "type": "string",
              "enum": [
                "stock",
                "option",
                "etf",
                "mutual-fund",
                "bond",
                "corporate-bond",
                "private-stock",
                "crypto",
                "other"
              ],
              "enumTitles": [
                "Stock",
                "Option",
                "ETF",
                "Mutual fund",
                "Government or municipal bond",
                "Corporate bond",
                "Stock not publicly traded",
                "Cryptocurrency",
                "Anything else"
              ]
            }
          },
          "owners": {
            "title": "Owners",
            "type": "array",
            "description": "Whose holding the trade was in. Leave it empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "self",
                "spouse",
                "joint",
                "dependent-child"
              ],
              "enumTitles": [
                "The member",
                "Spouse",
                "Joint",
                "Dependent child"
              ]
            }
          },
          "includePaperFilings": {
            "title": "List paper filings",
            "type": "boolean",
            "description": "Some members still file on paper. Those filings are scans, so their trades aren't read; each one comes back as a single row with its link, and none of them is charged. The trade filters above can't see inside them.",
            "default": true
          },
          "maxTrades": {
            "title": "Maximum trades",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "The most trades returned in one run, newest filings first. Each trade returned is one charge.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}