{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Insider Trading (Form 4) & 13F Hedge Fund Holdings API",
    "description": null,
    "version": "0.0",
    "x-build-id": "mCwtgrrtE5MmaKgXS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mintspread~sec-insider-13f-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mintspread-sec-insider-13f-tracker",
        "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/mintspread~sec-insider-13f-tracker/runs": {
      "post": {
        "operationId": "runs-sync-mintspread-sec-insider-13f-tracker",
        "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/mintspread~sec-insider-13f-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-mintspread-sec-insider-13f-tracker",
        "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": {
          "mode": {
            "title": "Extraction Mode",
            "enum": [
              "form4",
              "13f",
              "both"
            ],
            "type": "string",
            "description": "Choose 'form4' to parse executive Form 4 insider trades by stock ticker/CIK, '13f' to parse hedge fund 13F-HR portfolio holdings, or 'both'.",
            "default": "form4"
          },
          "tickers": {
            "title": "Stock Tickers or CIKs (for Form 4)",
            "type": "array",
            "description": "U.S. stock tickers (e.g., AAPL, NVDA, MSFT, TSLA) or 10-digit SEC CIKs to extract parsed Form 4 insider transactions.",
            "default": [
              "AAPL",
              "NVDA",
              "MSFT"
            ],
            "items": {
              "type": "string"
            }
          },
          "transactionCodes": {
            "title": "Form 4 Transaction Codes (Optional)",
            "type": "array",
            "description": "Filter Form 4 transactions by SEC code: P (Open Market Buy), S (Open Market Sale), M (Option Exercise), A (Grant/Award), F (Tax Withholding), G (Gift). Leave empty for all codes.",
            "default": [
              "P",
              "S"
            ],
            "items": {
              "type": "string"
            }
          },
          "includeDerivatives": {
            "title": "Include Form 4 Derivative Transactions",
            "type": "boolean",
            "description": "Include derivative table transactions (stock options, RSUs, warrants) in addition to common stock transactions.",
            "default": false
          },
          "maxForm4FilingsPerTicker": {
            "title": "Max Form 4 Filings Per Ticker",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of recent Form 4 XML filings to fetch and parse per ticker.",
            "default": 5
          },
          "funds": {
            "title": "Hedge Fund Aliases or CIKs (for 13F-HR)",
            "type": "array",
            "description": "Built-in aliases (BERKSHIRE, BRIDGEWATER, SCION, PERSHING, CITADEL, RENAISSANCE, APPALOOSA, DUQUESNE, BAUPOST, TIGER, COATUE, VANGUARD, BLACKROCK) or any institutional 10-digit SEC CIK.",
            "default": [
              "BERKSHIRE",
              "SCION"
            ],
            "items": {
              "type": "string"
            }
          },
          "aggregateByCusip": {
            "title": "Aggregate 13F Positions by CUSIP",
            "type": "boolean",
            "description": "Combine multi-manager sub-rows for the same CUSIP and equity/option type, compute portfolioWeightPct, and sort largest holdings first.",
            "default": true
          },
          "minPositionValueDollars": {
            "title": "Min 13F Position Value ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only return 13F holdings with market value greater than or equal to this dollar amount (0 for all).",
            "default": 0
          },
          "maxHoldingsPerFund": {
            "title": "Max 13F Holdings Per Fund",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of top 13F holdings to output per fund.",
            "default": 50
          },
          "sinceDate": {
            "title": "Filed On or After (YYYY-MM-DD, Optional)",
            "type": "string",
            "description": "Only process filings submitted on or after this date (YYYY-MM-DD).",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}