{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Insider Trading Signals: Form 4 Cluster Buys",
    "description": "Turns SEC Form 4 filings into scored insider trading signals: cluster buying, large buys, CEO/CFO purchases and first buy in months, plus clean open-market trades with value, roles, holdings change and 10b5-1 flag. Official EDGAR data.",
    "version": "0.1",
    "x-build-id": "0kUjB1FNhem5DZjd4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/donzely~sec-insider-signals/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-donzely-sec-insider-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/donzely~sec-insider-signals/runs": {
      "post": {
        "operationId": "runs-sync-donzely-sec-insider-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/donzely~sec-insider-signals/run-sync": {
      "post": {
        "operationId": "run-sync-donzely-sec-insider-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": {
          "tickers": {
            "title": "Tickers (optional)",
            "type": "array",
            "description": "Limit to these US tickers, e.g. AAPL, NVDA, BRK-B. Leave empty to scan every company that filed Form 4 in the period.",
            "items": {
              "type": "string"
            }
          },
          "lastDays": {
            "title": "Last N business days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Without tickers: business days of EDGAR filings to scan (about 450 Form 4 filings per day). With tickers: calendar days. Ignored when a date range is set. Default 1 (90 with tickers). Each extra business day adds about 1 minute."
          },
          "dateFrom": {
            "title": "Filed from (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional start of the filing date range."
          },
          "dateTo": {
            "title": "Filed to (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional end of the filing date range. Defaults to today."
          },
          "onlySignals": {
            "title": "Only signals",
            "type": "boolean",
            "description": "Output only signal rows (cluster buys, large buys, CEO/CFO buys, cluster sells), not individual trades.",
            "default": false
          },
          "signalTypes": {
            "title": "Signal types",
            "type": "array",
            "description": "Keep only signals that contain at least one of these types. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "CLUSTER_BUY",
                "LARGE_BUY",
                "CEO_CFO_BUY",
                "FIRST_BUY_IN_MONTHS",
                "CLUSTER_SELL",
                "LARGE_SELL"
              ]
            }
          },
          "minScore": {
            "title": "Minimum signal score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only signals with at least this score (0-100).",
            "default": 0
          },
          "transactionCodes": {
            "title": "Transaction codes",
            "type": "array",
            "description": "Form 4 codes to keep: P = open-market purchase, S = open-market sale. Add A (award), M (option exercise), F (tax withholding), G (gift) if needed.",
            "default": [
              "P",
              "S"
            ],
            "items": {
              "type": "string"
            }
          },
          "minTradeValueUsd": {
            "title": "Minimum trade value (USD)",
            "type": "integer",
            "description": "Skip trades below this value (shares × price).",
            "default": 0
          },
          "roles": {
            "title": "Insider roles",
            "type": "array",
            "description": "Keep only trades by insiders with one of these roles. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "CEO",
                "CFO",
                "COO",
                "PRESIDENT",
                "CHAIRMAN",
                "OFFICER",
                "DIRECTOR",
                "TEN_PERCENT_OWNER",
                "OTHER"
              ]
            }
          },
          "minClusterInsiders": {
            "title": "Cluster: minimum distinct insiders",
            "minimum": 2,
            "type": "integer",
            "description": "Distinct insiders trading the same stock in the same direction to count as a cluster.",
            "default": 2
          },
          "clusterWindowDays": {
            "title": "Cluster window (days)",
            "type": "integer",
            "description": "Maximum days between the first and last trade in a cluster.",
            "default": 14
          },
          "largeBuyValueUsd": {
            "title": "Large trade value (USD)",
            "type": "integer",
            "description": "A single trade at or above this value triggers LARGE_BUY / LARGE_SELL.",
            "default": 250000
          },
          "largeBuyHoldingsPct": {
            "title": "Large trade: holdings change %",
            "type": "integer",
            "description": "A trade that changes the insider's holdings by at least this % triggers LARGE_BUY / LARGE_SELL.",
            "default": 20
          },
          "firstBuyLookbackMonths": {
            "title": "First purchase lookback (months)",
            "type": "integer",
            "description": "Flag FIRST_BUY_IN_MONTHS when no insider bought on the open market in this many months before (checked for the 25 largest buys). 0 = off.",
            "default": 6
          },
          "excludePlannedSales": {
            "title": "Ignore 10b5-1 planned sales in signals",
            "type": "boolean",
            "description": "Pre-scheduled sales under Rule 10b5-1 plans say little about insider views, so they are left out of sell signals (still listed as trades).",
            "default": true
          },
          "includeTrades": {
            "title": "Include trade rows",
            "type": "boolean",
            "description": "Also output individual trades after the signals. Default: on unless 'Only signals' is set."
          },
          "includeAmendments": {
            "title": "Include Form 4/A amendments",
            "type": "boolean",
            "description": "Also parse amended filings.",
            "default": false
          },
          "maxFilings": {
            "title": "Max filings to parse",
            "minimum": 10,
            "type": "integer",
            "description": "Safety limit for long ranges without tickers (about 2 minutes per 1,000 filings).",
            "default": 3000
          },
          "maxItems": {
            "title": "Max output rows",
            "minimum": 1,
            "type": "integer",
            "description": "Signals come first, then trades (newest first).",
            "default": 200
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed normally. SEC allows up to 10 requests per second; this actor uses at most 8.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}