{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Form 4 Scraper - Insider Trading",
    "description": "Form 4 carries a transaction code saying what actually happened, and almost nothing uses it — so an RSU vest gets published as an insider buy and the automatic tax withholding as a sale. This decodes all 19 codes, isolates genuine open-market purchases, and detects cluster buying.",
    "version": "0.1",
    "x-build-id": "0DaDgIz7YZqDY6KMP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datalayer~insider-trading-form4/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datalayer-insider-trading-form4",
        "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/datalayer~insider-trading-form4/runs": {
      "post": {
        "operationId": "runs-sync-datalayer-insider-trading-form4",
        "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/datalayer~insider-trading-form4/run-sync": {
      "post": {
        "operationId": "run-sync-datalayer-insider-trading-form4",
        "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 tickers to pull insider filings for, for example AAPL, NVDA, HOG. Resolved to SEC CIKs automatically.",
            "default": [
              "AAPL"
            ],
            "items": {
              "type": "string"
            }
          },
          "ciks": {
            "title": "CIKs",
            "type": "array",
            "description": "SEC CIK numbers, for companies with no ticker or where the ticker is ambiguous. Apple is 320193. Leading zeros optional.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "From date",
            "type": "string",
            "description": "Earliest filing date to include, YYYY-MM-DD. Leave empty for the most recent filings."
          },
          "endDate": {
            "title": "To date",
            "type": "string",
            "description": "Latest filing date to include, YYYY-MM-DD."
          },
          "openMarketOnly": {
            "title": "Open-market trades only",
            "type": "boolean",
            "description": "Keep only filings containing a real purchase or sale at the market price (codes P and S). Drops grants, option exercises and tax withholding, which is most of what Form 4 traffic actually is.",
            "default": false
          },
          "excludePlannedTrades": {
            "title": "Exclude 10b5-1 planned trades",
            "type": "boolean",
            "description": "Drop trades executed under a pre-arranged Rule 10b5-1 plan. Those were scheduled months earlier, so they carry no view on the price on the day.",
            "default": false
          },
          "minTransactionValue": {
            "title": "Minimum trade value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop filings whose largest open-market trade is below this dollar value."
          },
          "scanAllFilings": {
            "title": "Scan every Form 4 filed",
            "type": "boolean",
            "description": "Ignore the ticker list and sweep every Form 4 filed across the whole market for the date range. Combine with Open-market trades only to screen the entire market for real insider buying.",
            "default": false
          },
          "includeTransactions": {
            "title": "Include the transaction rows",
            "type": "boolean",
            "description": "Attach every individual transaction to its filing row, each with its decoded code. Turn off for a slimmer output.",
            "default": true
          },
          "includeIssuerSummary": {
            "title": "Include the per-company summary",
            "type": "boolean",
            "description": "One summary row per company: distinct buyers and sellers, net open-market value, cluster-buy detection and how many filings were compensation only.",
            "default": true
          },
          "clusterWindowDays": {
            "title": "Cluster-buy window",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Days within which separate insiders buying counts as a cluster buy. Thirty days is the convention in the research literature.",
            "default": 30
          },
          "maxFilingsPerCompany": {
            "title": "Max filings per company",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How far back to read for each company. Large caps file Form 4s constantly, so 100 covers roughly a year for most.",
            "default": 100
          },
          "maxFilingsTotal": {
            "title": "Max filings for the run",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard ceiling across every company, so a wide market sweep cannot run away.",
            "default": 500
          },
          "contactEmail": {
            "title": "Contact email",
            "type": "string",
            "description": "SEC asks automated callers to identify themselves. Your email goes in the User-Agent header and nowhere else. Optional but courteous, and it keeps you off shared throttling."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. SEC allows 10 requests per second per IP and this Actor stays under that, so a proxy is only needed if you hit shared throttling.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}