{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Form 4 Insider Trading Scraper",
    "description": "Scrape SEC Form 4 insider transactions with the signal separated from the noise: open-market buys and sells classified apart from grants, vesting and option exercises.",
    "version": "0.1",
    "x-build-id": "wr9wEmAqB4jFhtNtP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pohjastudio~sec-form4-insider-trading-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pohjastudio-sec-form4-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/pohjastudio~sec-form4-insider-trading-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pohjastudio-sec-form4-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/pohjastudio~sec-form4-insider-trading-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pohjastudio-sec-form4-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": {
          "startDate": {
            "title": "From date",
            "type": "string",
            "description": "Earliest filing date to scan. Defaults to seven days ago."
          },
          "endDate": {
            "title": "To date",
            "type": "string",
            "description": "Latest filing date to scan. Defaults to today."
          },
          "tickers": {
            "title": "Tickers",
            "type": "array",
            "description": "Keep only filings for these ticker symbols. Leave empty to take every company that filed in the window.",
            "items": {
              "type": "string"
            }
          },
          "onlyBuys": {
            "title": "Only open-market purchases",
            "type": "boolean",
            "description": "Keep only transaction code P — an insider buying shares with their own money. This is the filter most people actually want, and it removes roughly nine tenths of Form 4 volume.",
            "default": false
          },
          "onlyOpenMarket": {
            "title": "Only open-market trades (buys and sells)",
            "type": "boolean",
            "description": "Keep codes P and S, dropping grants, vesting, option exercises and tax withholding.",
            "default": false
          },
          "transactionCodes": {
            "title": "Transaction codes",
            "type": "array",
            "description": "Exact SEC codes to keep: P purchase, S sale, A grant, M option exercise, F tax withholding, G gift, D disposition to issuer.",
            "items": {
              "type": "string"
            }
          },
          "insiderRoles": {
            "title": "Insider roles",
            "type": "array",
            "description": "Keep filings by insiders holding at least one of these roles.",
            "items": {
              "type": "string",
              "enum": [
                "officer",
                "director",
                "tenPercentOwner"
              ],
              "enumTitles": [
                "Officer",
                "Director",
                "10% owner"
              ]
            }
          },
          "minTransactionValueUsd": {
            "title": "Minimum transaction value (USD)",
            "type": "integer",
            "description": "Shares multiplied by price. Transactions that report no price — grants and most exercises — are excluded by this filter."
          },
          "minShares": {
            "title": "Minimum shares",
            "type": "integer",
            "description": "Drop transactions below this share count."
          },
          "includeDerivatives": {
            "title": "Include derivative transactions",
            "type": "boolean",
            "description": "Options, warrants and convertibles. Off by default because they are dominated by compensation activity.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum transactions",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many transactions. You are charged per transaction delivered.",
            "default": 1000
          },
          "maxFilings": {
            "title": "Maximum filings to read",
            "minimum": 1,
            "type": "integer",
            "description": "Safety limit on how many filings to open. Each filing is one request, and EDGAR is rate-limited, so a wide date range with a narrow filter needs a higher limit and takes longer.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}