{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC EDGAR Scraper",
    "description": "Fetches SEC EDGAR filings, normalized financial statements, XBRL facts, insider trades (Form 4), institutional holdings (13F), activist stakes (13D/G), full-text search hits, and parsed 8-K items via official SEC APIs. Zero anti-bot. Optional AI summaries.",
    "version": "1.0",
    "x-build-id": "4LKVCpy95132aYWi3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/constructive_calm~sec-edgar-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-constructive_calm-sec-edgar-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/constructive_calm~sec-edgar-scraper/runs": {
      "post": {
        "operationId": "runs-sync-constructive_calm-sec-edgar-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/constructive_calm~sec-edgar-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-constructive_calm-sec-edgar-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Scraping mode",
            "enum": [
              "filings",
              "xbrl_facts",
              "financials",
              "full_text_search",
              "form4",
              "form13f",
              "activist",
              "latest_feed",
              "eight_k_items"
            ],
            "type": "string",
            "description": "What to fetch. 'filings' returns all filings for a company. 'xbrl_facts' returns raw XBRL data points (e.g. revenue history). 'financials' returns normalized income statements / balance sheets / cash flows. 'full_text_search' searches the EDGAR full-text index. 'form4' returns insider trades. 'form13f' returns institutional fund holdings. 'activist' returns 13D/G activist positions. 'latest_feed' returns the newest filings across all companies (filterable by form type). 'eight_k_items' parses 8-K item codes (acquisitions, exec changes, auditor changes, etc.).",
            "default": "filings"
          },
          "tickers": {
            "title": "Tickers or company names",
            "type": "array",
            "description": "One or more tickers (AAPL), company names (Apple Inc), domains (apple.com), or CIKs (0000320193). The actor auto-resolves to canonical CIK. Used by all company-scoped modes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "forms": {
            "title": "Form types filter",
            "type": "array",
            "description": "Filter filings by form type. Leave empty for all forms. Examples: 10-K (annual), 10-Q (quarterly), 8-K (current report), S-1 (IPO), 20-F (foreign), DEF 14A (proxy), 4 (insider), 13F-HR (institutional holdings), SC 13D / SC 13G (activist positions), 10-K/A (amendment).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of items to return. Varies by mode: in filings mode this is total filings across all tickers; in xbrl_facts mode this caps the number of fact rows; in full_text_search mode this caps the number of hits.",
            "default": 100
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Only return filings filed on or after this date (YYYY-MM-DD). Leave empty for no lower bound.",
            "default": ""
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Only return filings filed on or before this date (YYYY-MM-DD). Leave empty for no upper bound.",
            "default": ""
          },
          "xbrlConcepts": {
            "title": "XBRL concepts (facts mode)",
            "type": "array",
            "description": "US-GAAP or DEI XBRL concept names to fetch in 'xbrl_facts' mode. Common examples: Revenues, NetIncomeLoss, CashAndCashEquivalentsAtCarryingValue, Assets, Liabilities, StockholdersEquity, EarningsPerShareBasic. Leave empty to fetch all available concepts for the company (high volume).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "statementTypes": {
            "title": "Financial statement types",
            "type": "array",
            "description": "Which normalized statements to generate in 'financials' mode.",
            "items": {
              "type": "string",
              "enum": [
                "income_statement",
                "balance_sheet",
                "cash_flow"
              ],
              "enumTitles": [
                "Income statement",
                "Balance sheet",
                "Cash flow"
              ]
            },
            "default": [
              "income_statement",
              "balance_sheet",
              "cash_flow"
            ]
          },
          "fiscalPeriods": {
            "title": "Fiscal periods",
            "type": "array",
            "description": "Filter normalized statements by fiscal period. FY = full fiscal year (from 10-K), Q1/Q2/Q3/Q4 = quarters (from 10-Q). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "FY",
                "Q1",
                "Q2",
                "Q3",
                "Q4"
              ],
              "enumTitles": [
                "Full fiscal year",
                "Q1",
                "Q2",
                "Q3",
                "Q4"
              ]
            },
            "default": []
          },
          "searchQuery": {
            "title": "Full-text search query",
            "type": "string",
            "description": "Keyword or phrase to search in EDGAR full-text index. Required when mode is 'full_text_search'. Supports quotes for exact phrases, e.g. \"artificial intelligence\". Supports operators: AND, OR, NOT. Example: \"climate risk\" AND \"supply chain\".",
            "default": ""
          },
          "searchCiks": {
            "title": "Limit search to CIKs",
            "type": "array",
            "description": "Restrict full-text search to specific company CIKs. Leave empty to search all companies.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "transactionCodes": {
            "title": "Transaction codes (Form 4)",
            "type": "array",
            "description": "Filter Form 4 insider trades by transaction code. P = open-market purchase, S = open-market sale, A = grant/award, M = option exercise, F = tax withhold, G = gift, D = disposition to issuer. Leave empty for all codes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minTransactionValue": {
            "title": "Min transaction value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip Form 4 insider transactions with a total value below this amount. 0 = no filter. Useful for filtering out noise.",
            "default": 0
          },
          "activistOnly": {
            "title": "Activist filings only (SC 13D)",
            "type": "boolean",
            "description": "If enabled, activist mode returns only SC 13D filings (active campaigns) and excludes SC 13G (passive 5%+ holdings). Default returns both.",
            "default": false
          },
          "eightKItemCodes": {
            "title": "8-K item codes",
            "type": "array",
            "description": "Filter 8-K filings by item code. Common items: 1.01 (material agreement), 2.01 (acquisition completion), 2.02 (earnings release), 4.01 (auditor change), 5.02 (exec departure/appointment), 5.07 (shareholder vote), 7.01 (Reg FD), 8.01 (other material). Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "incrementalMode": {
            "title": "Incremental mode (change detection)",
            "type": "boolean",
            "description": "If enabled, the actor saves a fingerprint of the last run and, on the next run with the same input, only emits items that are new or changed. Ideal for scheduled daily runs.",
            "default": false
          },
          "enableAiSummary": {
            "title": "Enable AI summary (premium)",
            "type": "boolean",
            "description": "If enabled, an AI-powered structured summary is generated for each filing via Gemini 2.5 Flash. Adds $0.05 per summary. Summaries include key financial highlights, material risks, tone analysis, and notable changes.",
            "default": false
          },
          "aiSummaryMaxChars": {
            "title": "AI summary input character cap",
            "minimum": 5000,
            "maximum": 200000,
            "type": "integer",
            "description": "Cap the filing text fed to the AI at this many characters (from the start of the filing body). Longer filings are truncated. Lower values = cheaper, faster, but may miss tail content.",
            "default": 40000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The SEC EDGAR API does not require proxies (no anti-bot, only fair-use rate limits). Leave empty in most cases. If you have a specific network policy, configure proxies here.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}