{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Form 4 Insider Trading Scraper — Cluster Buys & Signals",
    "description": "Scrape SEC Form 4 insider trades: open-market buys only, 10b5-1 flags, cluster-buy detection and conviction scoring.",
    "version": "0.1",
    "x-build-id": "27edDIBrn6gf3w16O"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sutraflow~sec-insider-trading-signals/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sutraflow-sec-insider-trading-signals",
        "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/sutraflow~sec-insider-trading-signals/runs": {
      "post": {
        "operationId": "runs-sync-sutraflow-sec-insider-trading-signals",
        "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/sutraflow~sec-insider-trading-signals/run-sync": {
      "post": {
        "operationId": "run-sync-sutraflow-sec-insider-trading-signals",
        "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": {
          "mode": {
            "title": "Scan mode",
            "enum": [
              "market_sweep",
              "companies"
            ],
            "type": "string",
            "description": "Market sweep reads every Form 4 filed in the date window (best for finding new signals). Specific companies watches only the tickers or CIKs you list.",
            "default": "market_sweep"
          },
          "lookbackDays": {
            "title": "Lookback (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How many calendar days back from today to scan. Ignored if you set explicit start/end dates. Weekends and US market holidays have no filings.",
            "default": 2
          },
          "startDate": {
            "title": "Start date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD. Overrides lookback days."
          },
          "endDate": {
            "title": "End date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD. Defaults to today (UTC)."
          },
          "tickers": {
            "title": "Tickers",
            "type": "array",
            "description": "Stock symbols to watch, e.g. AAPL, NVDA. Only used when mode is 'Specific companies'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "ciks": {
            "title": "Issuer CIKs",
            "type": "array",
            "description": "SEC Central Index Keys, if you prefer them to tickers. Only used when mode is 'Specific companies'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "signalTypes": {
            "title": "Transaction types to return",
            "type": "array",
            "description": "Open-market buys are the classic insider signal — an insider spending their own money. Grants, tax withholding and option exercises are compensation mechanics and make up most raw Form 4 volume, which is why they are off by default.",
            "items": {
              "type": "string",
              "enum": [
                "open_market_buy",
                "open_market_sale",
                "award_grant",
                "option_exercise",
                "tax_withholding",
                "gift",
                "disposition_to_issuer",
                "other"
              ],
              "enumTitles": [
                "Open-market buy (code P)",
                "Open-market sale (code S)",
                "Grant / award (code A)",
                "Option exercise (M, X, C)",
                "Tax withholding (code F)",
                "Gift (code G)",
                "Disposition to issuer (code D)",
                "Other codes"
              ]
            },
            "default": [
              "open_market_buy"
            ]
          },
          "minTransactionValueUsd": {
            "title": "Minimum transaction value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop buys and sales below this dollar value. Filters out token purchases. Set to 0 to keep everything.",
            "default": 25000
          },
          "excludePlannedTrades": {
            "title": "Exclude pre-scheduled 10b5-1 trades",
            "type": "boolean",
            "description": "Rule 10b5-1 trades are set up months in advance, so they carry far less information than a discretionary trade. Turn this on to keep only discretionary activity.",
            "default": false
          },
          "includeDerivatives": {
            "title": "Include derivative transactions",
            "type": "boolean",
            "description": "Table II holdings — options, RSUs, warrants. Off by default because most are compensation events.",
            "default": false
          },
          "detectClusterBuys": {
            "title": "Detect cluster buys",
            "type": "boolean",
            "description": "Flag cases where several different insiders at the same company bought within a short window — much harder to explain away as one person's liquidity needs.",
            "default": true
          },
          "clusterWindowDays": {
            "title": "Cluster window (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How close together insider purchases must be to count as one cluster.",
            "default": 7
          },
          "clusterMinInsiders": {
            "title": "Minimum insiders per cluster",
            "minimum": 2,
            "maximum": 10,
            "type": "integer",
            "description": "How many distinct insiders must buy inside the window.",
            "default": 2
          },
          "maxFilingsToScan": {
            "title": "Maximum filings to scan",
            "minimum": 1,
            "maximum": 40000,
            "type": "integer",
            "description": "Safety cap on how many Form 4 documents are downloaded in one run. Raise it for wide date ranges.",
            "default": 2500
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Cap on returned transactions. Results are sorted by conviction score, so the most significant ones survive the cut.",
            "default": 1000
          },
          "excludeEntityFilers": {
            "title": "Exclude fund and holding-company filers",
            "type": "boolean",
            "description": "Drop Section 16 filers that are corporate vehicles (L.P., LLC, funds, holding companies) rather than named individuals. A fund complex can co-file one subscription under a dozen entities, which is plumbing rather than conviction.",
            "default": false
          },
          "countEntitiesInClusters": {
            "title": "Count entities toward cluster buys",
            "type": "boolean",
            "description": "By default only named individuals count toward the cluster threshold, so affiliated fund vehicles cannot manufacture a cluster. Turn this on to count every filer.",
            "default": false
          },
          "userAgent": {
            "title": "SEC User-Agent (advanced)",
            "type": "string",
            "description": "The SEC asks automated clients to identify themselves with a contact address. Override only if you want your own organisation named in the request."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}