{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Company Financials Scraper — Revenue, Net Income, EPS",
    "description": "Standardized financial statements for any US-listed company from SEC XBRL data: revenue, net income, EPS, total assets, liabilities, cash, shares outstanding by quarter and year. Lookup by ticker or CIK. Clean JSON for AI agents. No API key.",
    "version": "0.1",
    "x-build-id": "JoByLUIMOavwsj81F"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~sec-company-financials/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-sec-company-financials",
        "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/yadroo~sec-company-financials/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-sec-company-financials",
        "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/yadroo~sec-company-financials/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-sec-company-financials",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "facts",
              "statements",
              "concept",
              "frames"
            ],
            "type": "string",
            "description": "Output shape. Default \"facts\". \"statements\" builds standardized rows with computed freeCashFlow, margins, debtToEquity, currentRatio, roe, roa (null when inputs are missing). \"concept\" needs `concept`. \"frames\" needs `concept` + `period` (e.g. CY2025, CY2025Q1, CY2025Q4I) and ignores `metrics`/`periods`.",
            "default": "facts"
          },
          "tickers": {
            "title": "Tickers or CIKs",
            "type": "array",
            "description": "Stock tickers (AAPL, MSFT, BRK-B) or SEC CIK numbers (320193, CIK0000320193) of SEC-registered filers, including foreign private issuers (TSM, ASML, SAP). Letter case and spaces do not matter; `BRK.B` = `BRK-B`. Resolved via https://www.sec.gov/files/company_tickers.json; an unknown value is listed in SUMMARY.notFound and the status (not a dataset row, not charged). Required for facts/statements/concept. In frames mode it filters the frame to these filers; if none of them is a known ticker/CIK, no row is written (the frame is never returned unfiltered).",
            "items": {
              "type": "string"
            }
          },
          "metricPreset": {
            "title": "Metric preset",
            "enum": [
              "core",
              "incomeStatement",
              "balanceSheet",
              "cashFlow",
              "perShare",
              "all",
              "custom"
            ],
            "type": "string",
            "description": "\"core\" = Revenues, RevenueFromContractWithCustomerExcludingAssessedTax, NetIncomeLoss, EarningsPerShareDiluted, Assets, Liabilities, CashAndCashEquivalentsAtCarryingValue, StockholdersEquity, OperatingIncomeLoss. A preset is unioned with `metrics`; \"custom\" uses only `metrics`. Left out (API, MCP, schedules): \"custom\" when `metrics` is given, else \"core\". The Console form starts at \"core\" — pick Custom there to get only your `metrics`."
          },
          "metrics": {
            "title": "Metrics (XBRL concepts)",
            "type": "array",
            "description": "Extra/custom XBRL concept names, e.g. [\"GrossProfit\", \"ResearchAndDevelopmentExpense\", \"dei:EntityPublicFloat\", \"ifrs-full:Revenue\"]. Prefix with a taxonomy to force it; otherwise us-gaap → ifrs-full → dei is searched. Friendly aliases work too (revenue, netIncome, operatingCashFlow, capex, equity, cash…) and fall back through equivalent tags (Revenues → RevenueFromContractWithCustomerExcludingAssessedTax → SalesRevenueNet → RevenuesNetOfInterestExpense; IFRS: Revenue). The concept actually used is reported in `metricResolved`. Full list: README → Reference.",
            "items": {
              "type": "string"
            }
          },
          "periods": {
            "title": "Max periods per metric / rows per company",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "facts: newest N periods per metric (after dedupe of restatements). statements: newest N rows per company. Ignored in concept and frames modes (use maxItems). Default 12.",
            "default": 12
          },
          "form": {
            "title": "Form filter",
            "enum": [
              "all",
              "10-K",
              "10-Q",
              "20-F",
              "40-F",
              "6-K",
              "8-K"
            ],
            "type": "string",
            "description": "Only facts reported in this form type. Amendments (10-K/A etc.) match their base form unless includeAmendments=false. US domestic filers use 10-K/10-Q; foreign private issuers (TSM, ASML, SAP…) use 20-F (annual) and 6-K (interim) — a 10-K filter on them returns nothing. Default \"all\".",
            "default": "all"
          },
          "periodTypes": {
            "title": "Period types",
            "type": "array",
            "description": "Allowed values: instant, quarter, ytd, annual (letter case does not matter; any other value stops the run with a \"did you mean\" before any request). Keep only these period types. instant = balance-sheet date (no start); quarter = duration ≤ 100 days; annual = 340–380 days; ytd = anything else with a start date (6-month, 9-month year-to-date figures in 10-Q/6-K). Empty = all in facts/concept mode; statements mode defaults to [\"annual\",\"quarter\"]. Example for clean quarterly series: [\"quarter\"] (balance-sheet metrics are instants, add \"instant\" to keep them).",
            "items": {
              "type": "string"
            }
          },
          "startYear": {
            "title": "From year",
            "minimum": 2008,
            "maximum": 2100,
            "type": "integer",
            "description": "Keep only periods whose END date is in this calendar year or later (XBRL data starts ~2009). Note: SEC's `fy`/`fp` fields describe the FILING's fiscal year, not the period — filter by year of `end` instead."
          },
          "endYear": {
            "title": "To year",
            "minimum": 2008,
            "maximum": 2100,
            "type": "integer",
            "description": "Keep only periods whose END date is in this calendar year or earlier."
          },
          "includeAmendments": {
            "title": "Include amended filings (10-K/A, 20-F/A)",
            "type": "boolean",
            "description": "Default true. Restated duplicates are always collapsed to the most recently filed value; set false to ignore amendment forms entirely.",
            "default": true
          },
          "taxonomy": {
            "title": "Taxonomy",
            "enum": [
              "auto",
              "us-gaap",
              "ifrs-full",
              "dei"
            ],
            "type": "string",
            "description": "Which XBRL taxonomy to read. Default \"auto\" tries us-gaap, then ifrs-full (foreign private issuers such as TSM/SAP report under ifrs-full; ASML reports 20-F under us-gaap in EUR), then dei. Forcing a taxonomy the filer does not use yields zero rows with a warning.",
            "default": "auto"
          },
          "currency": {
            "title": "Currency / unit preference",
            "type": "string",
            "description": "\"auto\" (also when left empty) prefers USD, else the filer's reporting currency (EUR for ASML, TWD for TSM — TSM also files a USD convenience translation, which auto picks). Set an ISO code (EUR, TWD, JPY) to force it; per-share units follow (EUR/shares). Share counts (\"shares\") and ratios (\"pure\") are unaffected. The unit used is always in the `unit` field."
          },
          "concept": {
            "title": "Concept",
            "type": "string",
            "description": "XBRL concept for concept/frames modes, e.g. Revenues, NetIncomeLoss, Assets, EarningsPerShareDiluted, dei:EntityPublicFloat. concept mode: aliases (revenue, netIncome…), any letter case and taxonomy prefixes work. frames mode: SEC's exact concept name (the 85 curated concepts are matched in any letter case); a prefix such as dei: picks the taxonomy. Default in frames mode: Revenues."
          },
          "period": {
            "title": "Frame period (frames mode)",
            "type": "string",
            "description": "SEC frame period, required for frames mode: CY2025 (calendar year, duration concepts), CY2025Q1 (quarter, duration concepts), CY2025Q4I (instantaneous — REQUIRED for balance-sheet concepts like Assets, StockholdersEquity, CashAndCashEquivalentsAtCarryingValue). SEC aligns each filer's fiscal period to the closest calendar frame."
          },
          "unit": {
            "title": "Frame unit (frames mode)",
            "type": "string",
            "description": "Unit of measure for frames mode: USD (also when left empty), shares, USD/shares (for EPS), pure, or another currency (EUR, EUR/shares…). Letter case does not matter for these (usd/shares = USD/shares, USD-per-shares works too); other units are sent to SEC as typed."
          },
          "excludeSuspected": {
            "title": "Exclude suspected reporting errors (frames mode)",
            "type": "boolean",
            "description": "Frames mode only. SEC frames republish whatever each filer tagged, including scale errors (e.g. 2025 net income of $1.157T for Medline). Every frames row carries suspectedReportingError + suspectedReason (value implausibly large, or out of scale with the company's own total assets). Default false = keep flagged rows; true = drop them before ranking.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on dataset rows for the whole run (all modes). frames mode sorts by value descending, so maxItems=50 with Revenues/CY2025 = the 50 largest filers by revenue. Default 1000. The run also stops at your max cost per run (status \"Stopped at your spending limit: N rows delivered\").",
            "default": 1000
          },
          "fields": {
            "title": "Output columns (empty = all)",
            "type": "array",
            "description": "Keep only these columns, in this order, e.g. [\"ticker\", \"end\", \"value\"] or, in statements mode, [\"ticker\", \"end\", \"revenue\", \"netIncome\", \"roe\"]. `id` is always kept (first, unless you place it). Letter case and spaces do not matter (`net income` = `netIncome`); a name that is not a column of the chosen mode is skipped with a note in the status; if none is, the run stops before any request. Columns: README → Output.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}