{
  "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": "zzJNUQqIBaIutaqDK"
  },
  "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). Resolved via https://www.sec.gov/files/company_tickers.json; unknown values produce an `error` item. Required for facts/statements/concept; optional in frames mode (acts as a filter).",
            "items": {
              "type": "string"
            }
          },
          "metricPreset": {
            "title": "Metric preset",
            "enum": [
              "core",
              "incomeStatement",
              "balanceSheet",
              "cashFlow",
              "perShare",
              "all",
              "custom"
            ],
            "type": "string",
            "description": "Default \"core\" = Revenues, RevenueFromContractWithCustomerExcludingAssessedTax, NetIncomeLoss, EarningsPerShareDiluted, Assets, Liabilities, CashAndCashEquivalentsAtCarryingValue, StockholdersEquity, OperatingIncomeLoss. Any preset is unioned with `metrics`; \"custom\" uses only `metrics`. If `metrics` is non-empty and metricPreset is omitted, \"custom\" is assumed (backward compatible).",
            "default": "core"
          },
          "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. 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\" (default) 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.",
            "default": "auto"
          },
          "concept": {
            "title": "Concept",
            "type": "string",
            "description": "XBRL concept for concept/frames modes, e.g. Revenues, NetIncomeLoss, Assets, EarningsPerShareDiluted, dei:EntityPublicFloat. Aliases and taxonomy prefixes work in concept mode. 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 (default), shares, USD/shares (for EPS), pure.",
            "default": "USD"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on dataset items 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.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}