{
  "openapi": "3.0.1",
  "info": {
    "title": "Form 4 Insider Trades Watch: Buys & Sells",
    "description": "Daily insider buys and sells from public Form 4 filings: one flat row per transaction with insider, role, shares, price, value and 10b5-1 flag. New-only mode.",
    "version": "0.1",
    "x-build-id": "HAhOaWPriAMZrINOG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/glaciological_huddle~form4-insider-watch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-glaciological_huddle-form4-insider-watch",
        "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/glaciological_huddle~form4-insider-watch/runs": {
      "post": {
        "operationId": "runs-sync-glaciological_huddle-form4-insider-watch",
        "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/glaciological_huddle~form4-insider-watch/run-sync": {
      "post": {
        "operationId": "run-sync-glaciological_huddle-form4-insider-watch",
        "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": {
          "tickers": {
            "title": "Tickers",
            "type": "array",
            "description": "Stock symbols of the companies to watch, e.g. AAPL, MSFT, NVDA. Mapped to the issuer's CIK with the SEC's public company ticker file, and used to pick filings from the daily index BEFORE anything is downloaded. Leave empty (and Issuer CIKs empty) for the whole market.",
            "items": {
              "type": "string"
            }
          },
          "issuerCiks": {
            "title": "Issuer CIKs",
            "type": "array",
            "description": "Optional Central Index Keys of issuers to watch (e.g. 320193 for Apple), for companies without a listed ticker. Combined with Tickers (either matches).",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Business days back",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many past business days of daily filing index files to read, plus today's if it has already been published (each day's index appears in the evening, US Eastern time). 1 is right for a daily schedule.",
            "default": 1
          },
          "transactionCodes": {
            "title": "Transaction codes",
            "type": "array",
            "description": "Which kinds of transactions to output (Form 4 transaction codes). Default: P and S (purchases and sales on the open market or in private deals). Clear the list to output every code.",
            "items": {
              "type": "string",
              "enum": [
                "P",
                "S",
                "A",
                "M",
                "F",
                "G",
                "D",
                "C",
                "X",
                "O",
                "E",
                "H",
                "I",
                "J",
                "K",
                "L",
                "U",
                "V",
                "W",
                "Z"
              ],
              "enumTitles": [
                "P: Open-market or private purchase",
                "S: Open-market or private sale",
                "A: Grant or award from the company",
                "M: Option exercise or conversion",
                "F: Shares withheld to pay exercise price or tax",
                "G: Gift",
                "D: Disposition back to the company",
                "C: Conversion of a derivative security",
                "X: Exercise of in-the-money or at-the-money derivative",
                "O: Exercise of out-of-the-money derivative",
                "E: Expiration of short derivative position",
                "H: Expiration or cancellation of long derivative position",
                "I: Discretionary transaction (benefit plan)",
                "J: Other acquisition or disposition (see footnotes)",
                "K: Equity swap or similar instrument",
                "L: Small acquisition",
                "U: Disposition in a change-of-control tender",
                "V: Voluntarily reported early",
                "W: Acquisition or disposition by will or inheritance",
                "Z: Deposit into or withdrawal from a voting trust"
              ]
            },
            "default": [
              "P",
              "S"
            ]
          },
          "onlyOpenMarket": {
            "title": "Only open-market buys and sells",
            "type": "boolean",
            "description": "Shortcut: keep only codes P and S, whatever is selected under Transaction codes. Grants, option exercises, tax withholding and gifts are left out.",
            "default": false
          },
          "minTransactionValue": {
            "title": "Minimum transaction value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only transactions where shares × price per share is at least this amount. Transactions reported without a price (value unknown) are left out when this is set. Leave empty for no minimum."
          },
          "insiderRoles": {
            "title": "Insider roles",
            "type": "array",
            "description": "Keep only transactions by insiders with ANY of these roles, as ticked on the form. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "director",
                "officer",
                "tenPercentOwner",
                "other"
              ],
              "enumTitles": [
                "Director",
                "Officer",
                "10% owner",
                "Other"
              ]
            }
          },
          "includeDerivative": {
            "title": "Include derivative transactions",
            "type": "boolean",
            "description": "Also output rows from the derivative table (options, warrants, RSUs, convertible notes), with exercise price, expiration and underlying shares. Off by default: only transactions in the shares themselves.",
            "default": false
          },
          "includeAmendments": {
            "title": "Include amendments (4/A)",
            "type": "boolean",
            "description": "Also read amended filings (form 4/A), which correct an earlier Form 4. Off by default.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Remember every transaction this watch has output (by filing and row) and output only transactions not seen before. Quiet runs output nothing and cost only the start fee. Turn off to re-output everything in the window.",
            "default": true
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Name of the saved watch. Each watch keeps its own memory (named key-value store form4-watch-<name>), so several watches ('big-tech', 'bank-directors') can run side by side.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on output rows per run. The run also stops early if your Apify spending limit for this run would be exceeded. Transactions beyond the cap are left for the next run.",
            "default": 200
          },
          "maxFilingsScanned": {
            "title": "Max filings downloaded",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on Form 4 filings downloaded per run. Without tickers a single business day has hundreds to well over a thousand Form 4 filings, most of them grants and option exercises; this cap keeps whole-market runs short. Filings beyond the cap are left for the next run.",
            "default": 300
          },
          "userAgentContact": {
            "title": "Contact for the User-Agent header (optional)",
            "type": "string",
            "description": "www.sec.gov asks automated tools to identify themselves with contact details. If you enter your e-mail address, requests are sent as 'Form4InsiderWatch/0.1 <your e-mail>'; otherwise the Actor's default identification is used. It is sent only to www.sec.gov and appears in your own run log and run summary."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}