{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Insider Trading Scraper - Form 4 Insider Trades & Buys",
    "description": "Scrape SEC EDGAR Form 3/4/5 stock insider trades: insider buying and selling — from the official filings: one flat row per transaction with insider name, role, decoded code, shares, price, signed USD value and shares held after. No API key, no fee. Signed USD separates insider selling from buys.",
    "version": "0.1",
    "x-build-id": "ZLSg9xy73TtoAxsP7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchsmith~sec-insider-trades-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchsmith-sec-insider-trades-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/fetchsmith~sec-insider-trades-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fetchsmith-sec-insider-trades-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/fetchsmith~sec-insider-trades-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fetchsmith-sec-insider-trades-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": {
          "issuers": {
            "title": "Companies (tickers or CIKs)",
            "type": "array",
            "description": "Ticker symbols (AAPL, NVDA) or raw SEC CIK numbers (320193). Tickers are resolved against SEC's own official ticker->CIK map, so a ticker that SEC does not list is skipped with a warning rather than silently returning nothing.",
            "default": [
              "AAPL",
              "NVDA",
              "JPM"
            ],
            "items": {
              "type": "string"
            }
          },
          "formTypes": {
            "title": "Ownership form types",
            "type": "array",
            "description": "Form 4 is the one that matters for trade signals (a transaction reported within 2 business days). Form 5 is an annual catch-up and does carry real transactions. Form 3 is an initial statement of holdings and contains no transaction at all, so selecting it returns zero rows unless you also turn on includeHoldings below. The \"/A\" forms are AMENDMENTS, which SEC files under a separate form type rather than flagging the original: select 4/A alongside 4 to see corrections (restated share counts, fixed Rule 10b5-1 dates). Amendment rows carry isAmendment, amendsOriginalFilingDate and supersedesAccessionNumber, and the original they correct is returned too, tagged with amendedByAccessionNumber - nothing is silently dropped.",
            "items": {
              "type": "string",
              "enum": [
                "3",
                "4",
                "5",
                "3/A",
                "4/A",
                "5/A"
              ],
              "enumTitles": [
                "Form 3 - initial statement of ownership",
                "Form 4 - changes in ownership (insider trades)",
                "Form 5 - annual statement",
                "Form 3/A - amended initial statement",
                "Form 4/A - amended changes in ownership",
                "Form 5/A - amended annual statement"
              ]
            },
            "default": [
              "4"
            ]
          },
          "sinceDate": {
            "title": "Only filings on/after this date",
            "type": "string",
            "description": "YYYY-MM-DD. Leave empty for no lower bound. SEC's filing index is newest-first, so this stops paging as soon as it passes the date.",
            "default": ""
          },
          "maxFilingsPerIssuer": {
            "title": "Max filings per company",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many matching ownership filings to open per company. One filing usually yields 1-4 transaction rows.",
            "default": 20
          },
          "includeDerivative": {
            "title": "Include derivative transactions",
            "type": "boolean",
            "description": "Derivative rows are options, RSUs and convertible securities (with exercise price, expiration and underlying share count). Turn off to get only the non-derivative common-stock rows.",
            "default": true
          },
          "includeHoldings": {
            "title": "Include holdings rows (Form 3 positions)",
            "type": "boolean",
            "description": "Off by default. Form 3 (and the holdings section of a Form 4/5) reports a position the insider *holds*, not a trade, so with this off a Form 3 filing yields zero rows. Turn it on to also get those positions as rows with rowType \"holding\" — transactionDate/transactionCode/shares/pricePerShare are null on them and sharesOwnedAfter carries the reported position. Leaving it off keeps Form 4 output (and your bill) unchanged.",
            "default": false
          },
          "transactionCodes": {
            "title": "Transaction codes",
            "type": "array",
            "description": "Keep only rows whose SEC transaction code is in this list; leave empty for all. Most of a Form 4 feed is compensation plumbing -- select P and S for open-market buys and sells only. Filtered rows are never returned and never charged. All 20 official codes are supported. Holding rows have no code, so this filter excludes them.",
            "items": {
              "type": "string",
              "enum": [
                "P",
                "S",
                "A",
                "D",
                "F",
                "M",
                "C",
                "G",
                "X",
                "O",
                "J",
                "K",
                "I",
                "H",
                "E",
                "U",
                "L",
                "W",
                "Z",
                "V"
              ],
              "enumTitles": [
                "P - open-market purchase",
                "S - open-market sale",
                "A - grant/award",
                "D - disposition to issuer",
                "F - shares withheld for taxes",
                "M - option exercise/conversion",
                "C - conversion of derivative",
                "G - gift",
                "X - option exercise (in the money)",
                "O - option exercise (out of the money)",
                "J - other (see footnotes)",
                "K - equity swap",
                "I - discretionary transaction",
                "H - expiration (long derivative)",
                "E - expiration (short derivative)",
                "U - tender of shares",
                "L - small acquisition",
                "W - will or laws of descent",
                "Z - voting trust",
                "V - voluntarily reported early"
              ]
            },
            "default": []
          },
          "minTransactionValue": {
            "title": "Minimum transaction value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only rows whose transaction value is at least this large in absolute terms, so a $2M sale passes a $100000 threshold just like a $2M purchase. Rows with no reportable value (holdings, and grants filed with no price) cannot be shown to meet the threshold and are excluded. Filtered rows are never returned and never charged. 0 disables.",
            "default": 0
          },
          "insiderRoles": {
            "title": "Insider roles",
            "type": "array",
            "description": "Keep only rows filed by an insider holding at least one of these roles; leave empty for all. Officer trades are the usual signal; 10% owners are typically funds. Matched against the filing's first reporting owner (co-filers on a joint filing appear in coFilers as names only). Filtered rows are never returned and never charged.",
            "items": {
              "type": "string",
              "enum": [
                "officer",
                "director",
                "tenPercentOwner",
                "other"
              ],
              "enumTitles": [
                "Officer",
                "Director",
                "10% owner",
                "Other"
              ]
            },
            "default": []
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on transaction rows returned (and therefore on what you are charged).",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}