{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Insider Trading Scraper: Form 4 Buys & Sells",
    "description": "Track insider buying and selling from official SEC Form 4 filings: insider name and role, open-market purchase or sale, shares, price, dollar value and 10b5-1 flag. Any tickers, company names or investor CIKs, or the whole market, any date range back to 2003. From $0.80 per 1,000 transactions.",
    "version": "0.2",
    "x-build-id": "LkPcIHq1bQFJiJFkT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidyharvest~sec-insider-trading-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidyharvest-sec-insider-trading-scraper",
        "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/tidyharvest~sec-insider-trading-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tidyharvest-sec-insider-trading-scraper",
        "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/tidyharvest~sec-insider-trading-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tidyharvest-sec-insider-trading-scraper",
        "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 or CIKs",
            "type": "array",
            "description": "Stock tickers (`AAPL`, `NVDA`, `BRK.B`), exact company names (`Lifeway Foods`) or SEC CIK numbers (a company, a fund or a person). **Leave empty to get the latest Form 4 filings across the whole market.**",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Filed in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only filings from the last N days. Ignored when 'Filed from' is set.",
            "default": 30
          },
          "filedFrom": {
            "title": "Filed from",
            "type": "string",
            "description": "First filing date (YYYY-MM-DD) for history: any date back to 2003 works per company and in market-wide mode. Overrides 'Filed in the last N days'."
          },
          "filedTo": {
            "title": "Filed to",
            "type": "string",
            "description": "Last filing date (YYYY-MM-DD). Empty = today."
          },
          "transactionCodes": {
            "title": "Transaction types",
            "type": "array",
            "description": "Keep only these codes. Pick **P** and **S** for real open-market buys and sells. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "P",
                "S",
                "A",
                "M",
                "F",
                "G",
                "D",
                "C",
                "X",
                "J"
              ],
              "enumTitles": [
                "P: open-market purchase",
                "S: open-market sale",
                "A: grant/award",
                "M: option exercise",
                "F: tax withholding",
                "G: gift",
                "D: disposition to issuer",
                "C: conversion",
                "X: in-the-money exercise",
                "J: other"
              ]
            }
          },
          "minValueUsd": {
            "title": "Minimum transaction value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip transactions worth less than this (shares x price). Rows without a price count as 0."
          },
          "insiderRoles": {
            "title": "Insider roles",
            "type": "array",
            "description": "Keep only insiders with one of these roles. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "officer",
                "director",
                "tenPercentOwner"
              ],
              "enumTitles": [
                "Officers",
                "Directors",
                "10% owners"
              ]
            }
          },
          "includeDerivatives": {
            "title": "Include derivative transactions (options, RSUs)",
            "type": "boolean",
            "description": "Also output rows from the derivative table (option grants, exercises, conversions).",
            "default": false
          },
          "companyRole": {
            "title": "Trades in the company's stock, or by the company",
            "enum": [
              "auto",
              "issuer",
              "insider",
              "both"
            ],
            "type": "string",
            "description": "Berkshire Hathaway's filings include its own purchases of other companies (e.g. Lennar). By default a listed company returns trades in its own stock; pick 'insider' to see what it bought or sold elsewhere. A person's or fund's CIK returns their trades.",
            "default": "auto"
          },
          "maxFilings": {
            "title": "Max filings (market-wide mode)",
            "minimum": 1,
            "type": "integer",
            "description": "How many of the newest Form 4 filings to read when no tickers are given.",
            "default": 200
          },
          "contactEmail": {
            "title": "Your contact email for SEC (optional)",
            "type": "string",
            "description": "SEC's fair-access policy asks automated tools to declare a contact email. Add yours to identify your own traffic; otherwise the actor maintainer's contact is used."
          },
          "maxItems": {
            "title": "Max transactions in total",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on results for the whole run (also caps your cost). 0 or empty = no limit."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}