{
  "openapi": "3.0.1",
  "info": {
    "title": "Stock Insider Trading - SEC Form 4 Buys, Sells & Cluster Buys",
    "description": "Track insider trading from SEC Form 4 filings: insider buys and sells market-wide or per ticker. Filter by trade value, insider role (CEO, CFO, director), and date. Detect cluster buys where multiple insiders buy the same stock. Clean flat JSON for AI agents, LLM pipelines, and trading signals.",
    "version": "0.1",
    "x-build-id": "eVVe2ANTPqaTp4xwl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/michael_b~stock-insider-trading/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-michael_b-stock-insider-trading",
        "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/michael_b~stock-insider-trading/runs": {
      "post": {
        "operationId": "runs-sync-michael_b-stock-insider-trading",
        "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/michael_b~stock-insider-trading/run-sync": {
      "post": {
        "operationId": "run-sync-michael_b-stock-insider-trading",
        "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": "Ticker Symbols (optional)",
            "type": "string",
            "description": "Stock ticker symbols separated by commas (e.g. AAPL, TSLA, NVDA). Leave empty to get a market-wide feed of the latest insider transactions across all US stocks."
          },
          "tradeTypes": {
            "title": "Trade Types",
            "type": "array",
            "description": "Which transaction types to include. Open-market purchases and sales are the meaningful signals; grants, option exercises, and tax withholdings are mostly compensation noise.",
            "items": {
              "type": "string",
              "enum": [
                "purchase",
                "sale",
                "saleToIssuer",
                "optionExercise",
                "grant",
                "taxWithholding",
                "gift",
                "conversion",
                "inherited",
                "other"
              ],
              "enumTitles": [
                "Purchase (open market)",
                "Sale (open market, incl. sale tied to option exercise)",
                "Sale to issuer",
                "Option exercise",
                "Grant / award",
                "Tax withholding",
                "Gift",
                "Derivative conversion",
                "Inherited",
                "Other"
              ]
            },
            "default": [
              "purchase",
              "sale"
            ]
          },
          "minTradeValueUsd": {
            "title": "Minimum Trade Value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include transactions with an absolute value of at least this many dollars. Set to 0 for no minimum. Values are applied in $1,000 steps.",
            "default": 25000
          },
          "daysBack": {
            "title": "Days Back (filing date)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include transactions FILED within the last N days. Set to 0 for all available history (useful with tickers for full per-company insider history back to ~2003).",
            "default": 7
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of transactions to return (per ticker when tickers are set, total for the market-wide feed). The actor paginates automatically, so this can exceed 5,000. Rows are returned newest-first, so a smaller limit keeps the most recent matches. Lower it to keep output small for LLM context windows.",
            "default": 5000
          },
          "insiderRoles": {
            "title": "Insider Roles",
            "type": "array",
            "description": "Only include transactions by insiders with at least one of these roles. Leave empty for all insiders. CEO and CFO purchases are typically the strongest signals.",
            "items": {
              "type": "string",
              "enum": [
                "ceo",
                "cfo",
                "coo",
                "president",
                "chairman",
                "generalCounsel",
                "vicePresident",
                "officer",
                "director",
                "tenPercentOwner",
                "other"
              ],
              "enumTitles": [
                "CEO",
                "CFO",
                "COO",
                "President",
                "Chairman of the Board",
                "General Counsel",
                "Vice President",
                "Officer (any)",
                "Director",
                "10%+ Owner",
                "Other"
              ]
            },
            "default": []
          },
          "clusterBuysOnly": {
            "title": "Cluster Buys Only",
            "type": "boolean",
            "description": "Market-wide mode only: return only purchases in companies where multiple distinct insiders bought within the time window. Multiple insiders buying with personal money is one of the strongest bullish signals.",
            "default": false
          },
          "minClusterInsiders": {
            "title": "Min Insiders Per Cluster",
            "minimum": 2,
            "type": "integer",
            "description": "Minimum number of distinct insiders buying the same stock to count as a cluster. Only used when Cluster Buys Only is enabled.",
            "default": 2
          },
          "excludePureTenPercentOwners": {
            "title": "Exclude Pure 10% Owners From Clusters",
            "type": "boolean",
            "description": "When detecting cluster buys, skip insiders who are 10%+ owners without any officer or director role. A fund accumulating a position is not a management-conviction signal. Only used when Cluster Buys Only is enabled.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}