{
  "openapi": "3.0.1",
  "info": {
    "title": "Insider Purchase Cluster Monitor - SEC Form 4",
    "description": "Extract SEC Form 4 purchases with source evidence, ownership details and conservative insider cluster counts. Bounded watchlists, saved comparisons and CSV/JSON output.",
    "version": "1.0",
    "x-build-id": "WYJW5Ydvwuyg69B40"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maydit~insider-purchase-cluster-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maydit-insider-purchase-cluster-monitor",
        "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/maydit~insider-purchase-cluster-monitor/runs": {
      "post": {
        "operationId": "runs-sync-maydit-insider-purchase-cluster-monitor",
        "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/maydit~insider-purchase-cluster-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-maydit-insider-purchase-cluster-monitor",
        "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": {
          "companies": {
            "title": "Company watchlist: ticker or CIK",
            "type": "array",
            "description": "Up to 10 US stock tickers or SEC CIKs. Searches each issuer’s recent submissions index within the lookback and filing cap. Does not traverse older index files. Choose this OR filing URLs. When both lists are empty, runs the documented historical SEC example.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "filingUrls": {
            "title": "Exact SEC ownership XML URLs",
            "type": "array",
            "description": "Up to 30 raw SEC archive XML URLs; SEC XSL viewer prefixes are normalized to raw XML. Use either this list or companies. Direct documents are inspected regardless of age; their filing date and acceptance time stay null.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "lookbackDays": {
            "title": "Recent filing lookback in days",
            "minimum": 1,
            "maximum": 1460,
            "type": "integer",
            "description": "Bounds company discovery by filing date and company-watchlist purchases by transaction date. Direct historical XML examples are inspected regardless of age.",
            "default": 365
          },
          "maxFilingsPerCompany": {
            "title": "Maximum filings inspected per company",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Bounds matching recent filings before XML inspection. Filings where this CIK is only a reporting owner are excluded after parsing, so a narrow cap can miss issuer matches. SUMMARY reports the cap and every inspected source.",
            "default": 12
          },
          "clusterWindowDays": {
            "title": "Purchase cluster window in days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "For each purchase date, counts distinct eligible insiders from that date back this many days inclusive. Counts only observed direct, single-owner officer/director purchases of the same issuer and security title.",
            "default": 30
          },
          "minimumInsiders": {
            "title": "Minimum distinct insiders for a cluster",
            "minimum": 2,
            "maximum": 20,
            "type": "integer",
            "description": "A cluster is an observed count, not complete market coverage. Joint filings, indirect ownership and non-officer/director ownership do not contribute.",
            "default": 2
          },
          "onlyClusters": {
            "title": "Save only purchases with an observed cluster",
            "type": "boolean",
            "description": "When enabled, the historical one-insider default may return zero rows. Zero is legitimate; no fallback data is created.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum saved observations",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum confirmed saved rows. One row is one eligible purchase transaction. Source failures appear in SUMMARY, not in paid results.",
            "default": 10
          },
          "comparePrevious": {
            "title": "Compare with saved observations",
            "type": "boolean",
            "description": "First saved observations establish history and are marked new. Later runs show prior values and changed fields. Only confirmed saved rows update history.",
            "default": false
          },
          "onlyChanges": {
            "title": "Save only new or changed observations",
            "type": "boolean",
            "description": "Enables comparison and saves only new or changed observations. A fully unchanged repeat saves zero rows. Start with a baseline run before using this filter.",
            "default": false
          },
          "snapshotName": {
            "title": "Saved comparison name",
            "type": "string",
            "description": "1-80 letters, numbers, underscores or hyphens. Use the same namespace AND input scope across runs. Use one writer at a time; no removal inference.",
            "default": "default"
          },
          "stateStoreName": {
            "title": "History store name",
            "type": "string",
            "description": "3-63 letters, numbers or hyphens. Used only when comparisons are requested. Choose a dedicated store for each workflow.",
            "default": "maydit-insider-purchase-history"
          },
          "maxRunSeconds": {
            "title": "Run budget in seconds",
            "minimum": 30,
            "maximum": 900,
            "type": "integer",
            "description": "Requests, rate waits and history work share this budget, also bounded by the platform deadline minus 25 seconds. SEC requests are serialized at about one per second, with one retry for 502/503/504.",
            "default": 240
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}