{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Insider Trading Monitor (Form 4)",
    "description": "Track when company insiders buy and sell their own stock, straight from SEC Form 4 filings. Watch specific tickers or monitor the whole market.",
    "version": "0.1",
    "x-build-id": "c2QQVuLACIGDceyTe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/straightforward_hydra~sec-form4-insider-trading-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-straightforward_hydra-sec-form4-insider-trading-monitor",
        "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/straightforward_hydra~sec-form4-insider-trading-monitor/runs": {
      "post": {
        "operationId": "runs-sync-straightforward_hydra-sec-form4-insider-trading-monitor",
        "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/straightforward_hydra~sec-form4-insider-trading-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-straightforward_hydra-sec-form4-insider-trading-monitor",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "watchlist",
              "market"
            ],
            "type": "string",
            "description": "Watchlist = only the tickers/CIKs you list below (fast & cheap). Market = every Form 4 filed across the whole market over the lookback window (the firehose; use the filters below to narrow it).",
            "default": "watchlist"
          },
          "tickers": {
            "title": "Tickers to watch",
            "type": "array",
            "description": "Stock ticker symbols to monitor, e.g. AAPL, TSLA, NVDA. Used in Watchlist mode. Case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "ciks": {
            "title": "CIKs to watch (advanced)",
            "type": "array",
            "description": "SEC CIK numbers, for filers without a ticker. Digits only, e.g. 320193. Optional; merged with the tickers above.",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Lookback days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How many days back to scan for filings (1-90). For a scheduled monitor, match this to how often you run it (e.g. run daily with daysBack = 2).",
            "default": 7
          },
          "transactionCodes": {
            "title": "Transaction types",
            "type": "array",
            "description": "Which Form 4 transaction codes to keep. P = open-market purchase and S = open-market sale carry the real market signal (the default). Choose ALL to keep everything (grants, option exercises, gifts, tax withholding, etc.).",
            "items": {
              "type": "string",
              "enum": [
                "P",
                "S",
                "A",
                "M",
                "F",
                "G",
                "C",
                "X",
                "ALL"
              ],
              "enumTitles": [
                "P - Open-market purchase",
                "S - Open-market sale",
                "A - Grant / award",
                "M - Option/derivative exercise",
                "F - Shares withheld for taxes",
                "G - Gift",
                "C - Conversion of derivative",
                "X - In-the-money option exercise",
                "ALL - Every transaction type"
              ]
            },
            "default": [
              "P",
              "S"
            ]
          },
          "minTransactionValue": {
            "title": "Minimum transaction value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep transactions worth at least this much (shares x price). Great for filtering Market mode down to meaningful trades, e.g. 100000. Leave empty for no minimum. Note: transactions without a reported price (many grants) are dropped when this is set."
          },
          "includeDerivatives": {
            "title": "Include derivative transactions",
            "type": "boolean",
            "description": "Include options, warrants and other derivatives (the derivative table). Off by default to keep the output focused on common-stock buys and sells.",
            "default": false
          },
          "includeAmendments": {
            "title": "Include amendments (Form 4/A)",
            "type": "boolean",
            "description": "Include amended filings as well as originals.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after pushing this many transactions. Leave empty for no limit."
          },
          "contactEmail": {
            "title": "Contact email (for SEC)",
            "type": "string",
            "description": "SEC's fair-access policy asks every automated caller to identify itself with a contact email in the User-Agent. Put yours here. It is only sent to SEC.gov."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}