{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC EDGAR Public Filings & Insider Form 4 Delta Monitor",
    "description": "Monitor any US public company by ticker or CIK for new SEC EDGAR filings (8-K, 10-K, 10-Q, Form 4 insider trades, 13F, SC 13D/G, S-1) with decoded 8-K item descriptions, stateful delta tracking, and instant n8n/Make/MCP alerts.",
    "version": "1.0",
    "x-build-id": "hYXro2kAsloIy4ZUW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simon_kundrik~sec-edgar-filings-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simon_kundrik-sec-edgar-filings-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/simon_kundrik~sec-edgar-filings-monitor/runs": {
      "post": {
        "operationId": "runs-sync-simon_kundrik-sec-edgar-filings-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/simon_kundrik~sec-edgar-filings-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-simon_kundrik-sec-edgar-filings-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",
        "required": [
          "companies"
        ],
        "properties": {
          "companies": {
            "title": "Tickers or CIK Numbers",
            "type": "array",
            "description": "List of US stock ticker symbols (e.g. AAPL, NVDA, MSFT, TSLA) or 10-digit SEC CIK numbers (e.g. 0000320193).",
            "default": [
              "AAPL",
              "NVDA",
              "MSFT",
              "TSLA"
            ],
            "items": {
              "type": "string"
            }
          },
          "forms": {
            "title": "SEC Form Types to Track",
            "type": "array",
            "description": "Filter by SEC form types (e.g. 8-K, 10-K, 10-Q, 4, SC 13D, SC 13G, 13F-HR, S-1, DEF 14A, 6-K, 20-F). Leave empty to track all form types.",
            "default": [
              "8-K",
              "10-K",
              "10-Q",
              "4",
              "SC 13D",
              "SC 13G",
              "13F-HR",
              "S-1",
              "DEF 14A",
              "6-K",
              "20-F"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxFilingsPerCompany": {
            "title": "Max Filings per Company",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of new or recent matching filings emitted per company per run.",
            "default": 10
          },
          "sinceDate": {
            "title": "Only Filings On or After (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional filing date floor in YYYY-MM-DD format. Older filings are skipped.",
            "default": ""
          },
          "includeExcerpt": {
            "title": "Fetch Filing Plain-Text Excerpt",
            "type": "boolean",
            "description": "When enabled, fetches the primary SEC filing document and extracts a clean plain-text excerpt for AI summarization or keyword screening.",
            "default": false
          },
          "excerptMaxChars": {
            "title": "Excerpt Max Characters",
            "minimum": 200,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum characters kept when includeExcerpt is enabled.",
            "default": 1500
          },
          "userAgent": {
            "title": "Custom SEC Fair-Access User-Agent (Optional)",
            "type": "string",
            "description": "Optional SEC Fair-Access compliant User-Agent string (e.g. 'YourCompany Research yourname@yourdomain.com').",
            "default": ""
          },
          "deltaMode": {
            "title": "Stateful Delta Mode",
            "type": "boolean",
            "description": "When enabled, remembers seen SEC accession numbers in your Apify Key-Value Store and emits only newly filed documents on subsequent runs.",
            "default": true
          },
          "firstRunMode": {
            "title": "First-Run Behaviour",
            "enum": [
              "emit_limited",
              "emit_all",
              "baseline_only"
            ],
            "type": "string",
            "description": "How to handle a newly tracked company on its first run: emit_limited emits the newest N filings as a baseline, emit_all emits up to maxFilingsPerCompany, baseline_only silently stores existing filings.",
            "default": "emit_limited"
          },
          "firstRunEmitLimit": {
            "title": "First-Run Emit Limit per Company",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of latest filings emitted per company on first run when firstRunMode is emit_limited.",
            "default": 3
          },
          "stateStoreName": {
            "title": "State Key-Value Store Name",
            "type": "string",
            "description": "Named Apify Key-Value Store used to persist seen accession numbers across scheduled runs.",
            "default": "sec-edgar-monitor-state"
          },
          "stateNamespace": {
            "title": "State Namespace",
            "type": "string",
            "description": "Partition key inside the state store so multiple watchlists stay independent.",
            "default": "default"
          },
          "maxTotalItems": {
            "title": "Max Total Filings per Run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard ceiling on dataset items emitted per run (Free Apify plans are capped at 5 companies and 25 filings).",
            "default": 500
          },
          "requestTimeoutSecs": {
            "title": "Request Timeout (Seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "HTTP timeout for SEC EDGAR API requests.",
            "default": 20
          },
          "dryRun": {
            "title": "Dry Run (Do Not Update State)",
            "type": "boolean",
            "description": "Fetch and emit filings without overwriting saved delta state.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}