{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC EDGAR Analyzer — 10-K, 10-Q & 8-K Data",
    "description": "Search SEC filings by ticker, name, or CIK. Extract 10-K, 10-Q, 8-K metadata and structured XBRL financials (revenue, net income, assets, EPS). Covers 10,000+ public companies. Free SEC API, no key needed.",
    "version": "3.1",
    "x-build-id": "jy2n8SN4QtwEhmWbL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~sec-edgar-filing-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-sec-edgar-filing-analyzer",
        "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/ryanclinton~sec-edgar-filing-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-sec-edgar-filing-analyzer",
        "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/ryanclinton~sec-edgar-filing-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-sec-edgar-filing-analyzer",
        "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": "Companies",
            "maxItems": 500,
            "type": "array",
            "description": "Company tickers, names, or CIK numbers to look up (e.g. AAPL, Tesla, 0000320193). Combine with a tickerPack to add a pre-built portfolio on top of your explicit list.",
            "default": [
              "AAPL",
              "TSLA"
            ],
            "items": {
              "type": "string"
            }
          },
          "tickerPack": {
            "title": "Ticker pack (pre-built portfolio)",
            "enum": [
              "",
              "faang",
              "mag7",
              "dow30",
              "sp500-tech",
              "sp500-financials",
              "sp500-energy",
              "sp500-healthcare",
              "big-banks-us",
              "cloud-infrastructure",
              "semiconductors",
              "ev-makers",
              "streaming-media"
            ],
            "type": "string",
            "description": "Optional pre-built portfolio of tickers. When set, expands into the companies list (then deduped against your explicit companies). One-click sector / index analysis.",
            "default": ""
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "latest-filings",
              "financial-snapshot",
              "historical-trends",
              "8k-monitor",
              "compliance-audit",
              "raw",
              "earnings-monitor",
              "governance-monitor",
              "distress-monitor",
              "activist-monitor",
              "quarterly-review"
            ],
            "type": "string",
            "description": "Execution preset bundling filing types + materiality flagging + cohort/batch insights + delta tracking.\n\nTechnical modes:\n• latest-filings — recent filings + latest financials snapshot (default).\n• financial-snapshot — latest financial metrics only; fastest, cheapest path.\n• historical-trends — multi-period financials with YoY/QoQ trends + anomaly flags.\n• 8k-monitor — 8-K material-event monitor; pair with watchlistName.\n• compliance-audit — historical financials + materiality + cohort rollup.\n• raw — raw filings only, no opinionated layers.\n\nOutcome-led modes (same machinery, named for the user's job):\n• earnings-monitor — 10-Q + 10-K + 8-K Item 2.02. Schedule for earnings tracking.\n• governance-monitor — DEF 14A + 8-K Item 5.02 / 5.07. Schedule for leadership / shareholder vote alerts.\n• distress-monitor — 8-K Item 1.03 / 2.06 / 4.01 / 4.02 + late-filing notices.\n• activist-monitor — SC 13D + SC 13G + DEF 14A + 8-K Item 5.01. Track 5%+ holders + control changes.\n• quarterly-review — 10-Q + 10-K with 4 historical periods + cohort rollup.",
            "default": "latest-filings"
          },
          "systemMode": {
            "title": "System mode (auto-enable stateful flags)",
            "type": "boolean",
            "description": "When true, automatically enables batch insights + cohort insights + delta tracking unless you explicitly set them or your mode preset disables them. Pair with watchlistName to flip the actor from one-shot to monitoring product.",
            "default": false
          },
          "watchlistName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Persists per-company state across runs in a named KV store (sec-edgar-filing-analyzer-history-<watchlistName>). Required for delta detection. Different watchlistName values keep separate state — run two pipelines side-by-side without pollution. First-run note: every record will carry delta.type=\"new\" until run 2."
          },
          "filingTypes": {
            "title": "Filing Types",
            "type": "array",
            "description": "SEC filing types to retrieve (e.g. 10-K, 10-Q, 8-K, 4, DEF 14A). Leave empty for all types. The 8k-monitor mode forces 8-K only unless overridden here.",
            "default": [
              "10-K",
              "10-Q",
              "8-K"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxFilingsPerCompany": {
            "title": "Max Filings Per Company",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of filings to return per company.",
            "default": 20
          },
          "dateFrom": {
            "title": "Date From",
            "type": "string",
            "description": "Only include filings after this date (YYYY-MM-DD format)."
          },
          "dateTo": {
            "title": "Date To",
            "type": "string",
            "description": "Only include filings before this date (YYYY-MM-DD format)."
          },
          "includeFinancials": {
            "title": "Include XBRL Financial Data",
            "type": "boolean",
            "description": "Fetch structured financial data (revenue, net income, assets, etc.) from XBRL filings. Mode preset overrides this when set.",
            "default": true
          },
          "historicalPeriods": {
            "title": "Historical Periods (per metric)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many historical periods to extract per financial metric. 1 = latest only (no trend). 2-8 = enables YoY/QoQ trend analysis + anomaly detection. Mode preset overrides this when set (historical-trends → 8, compliance-audit → 4, others → 1).",
            "default": 1
          },
          "flagMaterialFilings": {
            "title": "Classify Filing Materiality",
            "type": "boolean",
            "description": "Tag every filing with a materiality block (level critical/high/medium/low + category + reason). 8-K item codes drive the classification — Item 4.01 (auditor change), 5.02 (officer departure), 1.03 (bankruptcy) flip to critical/high. Mode preset overrides this when set.",
            "default": true
          },
          "includeBatchInsights": {
            "title": "Include batch insights summary record",
            "type": "boolean",
            "description": "Push a batch-summary record at the end of the run with hero fields (headline / oneLine / keyTakeaways / confidence) + list-quality score + recommendations. Useful for multi-company runs. Auto-on with most modes + systemMode."
          },
          "includeCohortInsights": {
            "title": "Include cohort insights (group by SIC sector)",
            "type": "boolean",
            "description": "Group companies by SIC sector and emit one cohort-summary record per sector with avg revenue YoY, material-filing count, and risk tag. Auto-on with historical-trends, compliance-audit, and systemMode."
          },
          "deltaMode": {
            "title": "Delta tracking (requires watchlistName)",
            "type": "boolean",
            "description": "Compute delta block per company: new (first sight), unchanged, new-filings (new accessions since last run), material-event (new HIGH/CRITICAL filing). Auto-on with 8k-monitor and systemMode."
          },
          "outputProfile": {
            "title": "Output profile",
            "enum": [
              "minimal",
              "standard",
              "full",
              "llm"
            ],
            "type": "string",
            "description": "Strip output detail to match the consumer.\n\n• standard — default, all blocks.\n• minimal — strip diagnostic prose; keep filing essentials, materiality flags, financials.\n• full — same as standard.\n• llm — drop history arrays + per-filing prose; keep summary + decisions for LLM consumption.",
            "default": "standard"
          },
          "triggers": {
            "title": "Triggers (deterministic alert rules)",
            "type": "array",
            "description": "User-defined deterministic triggers — no LLM, no code, no regex (except matchesPattern). Each rule: { name, field, op, value, tag, severity, note }. Operators: gte / lte / gt / lt / eq / in / notIn / contains / matchesPattern. Field paths: scorecard.materialityScore, scorecard.financialTrendScore, scorecard.dataQualityScore, scorecard.monitoringPriority, secRisk.score, secRisk.band, filingVelocity.current30d, filingVelocity.velocityRatio, filingVelocity.signal, filingPressureIndex.score, filingPressureIndex.band, derivedMetrics.debtToEquity.value, derivedMetrics.returnOnEquity.value, derivedMetrics.anomalyCount, materialFilingsCount, delta.type, delta.impact, operationalDrift.status, companyState.financialHealth, companyState.governanceRisk, companyState.eventPressure, companyState.watchStatus.\n\nMatched rules surface in triggersFired[] on each record."
          },
          "includeAlertPayloads": {
            "title": "Include alert payloads (Slack / Discord / flat JSON)",
            "type": "boolean",
            "description": "When true, every record gets a pre-formatted alertPayloads block: Slack Block Kit message, Discord embed, and a generic flat-JSON shape for Zapier / Make / n8n. Severity is derived from companyState.watchStatus + filingPressureIndex.band. Default: auto-on with systemMode."
          },
          "includeBehaviorFingerprint": {
            "title": "Include behaviour fingerprint",
            "type": "boolean",
            "description": "Per-company filing-behaviour profile — amendmentRate, governance turnover, cadence enum, classification (high-disclosure-volatility / amendment-heavy / governance-volatile / distress-signal-cluster / normal). Default: auto-on with systemMode."
          },
          "includeTimeline": {
            "title": "Include compressed timeline",
            "type": "boolean",
            "description": "Emit a chronological one-line summary of material events, sorted oldest → newest, with chain-pattern headline. Default: auto-on with systemMode."
          },
          "routingProfile": {
            "title": "Routing profile (persona bundle)",
            "enum": [
              "",
              "hedge-fund",
              "pe",
              "compliance",
              "ir",
              "quant",
              "retail-monitoring"
            ],
            "type": "string",
            "description": "Pre-built persona configuration that bundles trigger pack + alert payloads + SLA tightness defaults.\n\n• hedge-fund — earnings + financial-shift focus, immediate alerting.\n• pe — distress + drift focus.\n• compliance — auditor + governance + restatement, tightest SLAs.\n• ir — activist + governance + earnings.\n• quant — full data shape, no opinionated alert formatting.\n• retail-monitoring — governance + earnings only.",
            "default": ""
          },
          "triggerPack": {
            "title": "Trigger pack (pre-built rule bundle)",
            "enum": [
              "",
              "auditor-risk",
              "distress",
              "earnings-volatility",
              "activist",
              "governance-risk"
            ],
            "type": "string",
            "description": "Pre-built deterministic trigger bundle. Combines with explicit triggers[] (user triggers win on name conflict).\n\n• auditor-risk — auditor changes, restatements, amendment clusters.\n• distress — bankruptcy, impairment, declining health, leverage blowout.\n• earnings-volatility — anomalies + financial shifts.\n• activist — SC 13D buildup + control-change patterns.\n• governance-risk — officer departures + governance shakeups.",
            "default": ""
          },
          "includePortfolioState": {
            "title": "Include portfolio aggregators on batch summary",
            "type": "boolean",
            "description": "Emit portfolioState + priorityQueue + watchlistAnalytics on the batch-summary record. Default: on for multi-company runs.",
            "default": true
          },
          "includeReviewPacket": {
            "title": "Include analyst review packet per record",
            "type": "boolean",
            "description": "reviewPacket bundles whyFlagged + topEvents + requiredAttention + estimatedReviewTimeMinutes + handoffNotes — paste-ready for Slack triage. Default: auto-on with systemMode."
          },
          "includeNarrativeDelta": {
            "title": "Include narrative delta",
            "type": "boolean",
            "description": "Template-generated 'what changed since last run' sentences (no LLM). Requires watchlistName. Default: auto-on with systemMode."
          },
          "includeActiveSignals": {
            "title": "Include time-decayed active signals",
            "type": "boolean",
            "description": "Per-event decay weight using per-category persistence half-lives (bankruptcy 3y, auditor change 18mo, earnings release 90d). Default: auto-on with systemMode."
          },
          "includeRegimeShift": {
            "title": "Include regime-shift detection",
            "type": "boolean",
            "description": "Detects when current behaviour diverges from historical fingerprint. Requires watchlistName for prior-data comparison. Default: auto-on with systemMode."
          },
          "includeExplainability": {
            "title": "Include explainability block",
            "type": "boolean",
            "description": "Top-5 contributors to current state across SEC risk + pressure + drift + chains. Default: auto-on with systemMode."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}