{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Financial Statements API - XBRL Fundamentals (Calcbench)",
    "description": "SEC financial statements API: standardized XBRL fundamentals, as-reported income statements, balance sheets and cash flows, segment revenue, raw XBRL facts, 10-K and 10-Q footnote text, SEC filings and company lists for US public companies from the Calcbench API. Bring your own key.",
    "version": "0.1",
    "x-build-id": "mCeJkuUCs2s5t4Vjf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~sec-xbrl-fundamentals-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-sec-xbrl-fundamentals-api",
        "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/nabeelbaghoor~sec-xbrl-fundamentals-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-sec-xbrl-fundamentals-api",
        "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/nabeelbaghoor~sec-xbrl-fundamentals-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-sec-xbrl-fundamentals-api",
        "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": "What to read",
            "enum": [
              "standardized",
              "faceStatement",
              "segments",
              "asReported",
              "disclosures",
              "filings",
              "companies",
              "metrics"
            ],
            "type": "string",
            "description": "Standardized fundamentals, the face statement, segments and as-reported XBRL facts read the companies you list. Disclosures and filings read listed companies or, with a year or date range, every company. Companies reads an index, SIC or NAICS codes or tickers; the metrics dictionary needs no companies.",
            "default": "standardized"
          },
          "tickers": {
            "title": "Companies",
            "type": "array",
            "description": "Tickers or SEC CIK codes, one per line: MSFT, AAPL, 0000789019. Calcbench keeps one ticker per filer (Berkshire Hathaway is BRKA); a company it does not know becomes a free row saying so. Calcbench covers US SEC filers.",
            "default": [
              "MSFT"
            ],
            "items": {
              "type": "string"
            }
          },
          "metrics": {
            "title": "Standardized metrics",
            "type": "array",
            "description": "Standardized fundamentals. Metric names such as Revenue, NetIncome, EPSDiluted, OperatingCashFlow, CapitalExpenditures or StockholdersEquity, as the metrics dictionary mode lists them. Leave empty to read every metric.",
            "items": {
              "type": "string"
            }
          },
          "fiscalYear": {
            "title": "Fiscal year",
            "minimum": 1990,
            "maximum": 2100,
            "type": "integer",
            "description": "Standardized fundamentals, segments, XBRL facts and disclosures. The fiscal year to read, or the first year of a range with the end year. Leave empty to read all history."
          },
          "endYear": {
            "title": "End year",
            "minimum": 1990,
            "maximum": 2100,
            "type": "integer",
            "description": "Standardized fundamentals and segments. The last fiscal year of a range that starts at the fiscal year."
          },
          "fiscalPeriod": {
            "title": "Fiscal period",
            "enum": [
              "annual",
              "Q1",
              "Q2",
              "Q3",
              "Q4"
            ],
            "type": "string",
            "description": "Standardized fundamentals, XBRL facts and disclosures, with a single fiscal year. The full year or one fiscal quarter.",
            "default": "annual"
          },
          "periodType": {
            "title": "Period type",
            "enum": [
              "annual",
              "quarterly",
              "combined",
              "TTM"
            ],
            "type": "string",
            "description": "Standardized fundamentals: annual, quarterly, both, or trailing twelve months. Face statements and segments: annual or quarterly.",
            "default": "annual"
          },
          "pointInTime": {
            "title": "Point in time",
            "type": "boolean",
            "description": "Standardized fundamentals. Adds when each value was published and one row per revision, from the first earnings release to later filings. Needs a Calcbench subscription that includes point in time data.",
            "default": false
          },
          "statementType": {
            "title": "Statement",
            "enum": [
              "Income",
              "Balance",
              "CashFlow",
              "StockholdersEquity",
              "StatementOfComprehensiveIncome"
            ],
            "type": "string",
            "description": "As-reported face statement. Which statement to read, as the company filed it.",
            "default": "Income"
          },
          "allPeriods": {
            "title": "All history",
            "type": "boolean",
            "description": "As-reported face statement. Read every period on file instead of the most recent four.",
            "default": false
          },
          "breakoutMetrics": {
            "title": "Breakouts",
            "type": "array",
            "description": "Segments and breakouts. Breakout names such as OperatingSegmentRevenue, OperatingSegmentOperatingIncome, GeographicalSegmentRevenue, ConcentrationRiskPercentageCustomer or DebtInstrumentCarryingAmount.",
            "default": [
              "OperatingSegmentRevenue"
            ],
            "items": {
              "type": "string"
            }
          },
          "xbrlTags": {
            "title": "XBRL tags",
            "type": "array",
            "description": "As-reported XBRL facts. Tags as filed, one per line, matched as contains: Revenues, NetIncomeLoss, Assets, or a company extension tag. % works as a wildcard.",
            "items": {
              "type": "string"
            }
          },
          "searchText": {
            "title": "Search text",
            "type": "string",
            "description": "Disclosures and footnotes. Full text search in Lucene syntax, such as \"goodwill impairment\" or tariff AND supply. Results come back most relevant first."
          },
          "disclosureNames": {
            "title": "Disclosure names",
            "type": "array",
            "description": "Disclosures and footnotes. Sections to read by name, such as Risk Factors, Management's Discussion And Analysis, Revenue Recognition, Income Taxes or Goodwill and Intangible Assets. XBRL notes and non-XBRL sections cannot be mixed in one run.",
            "items": {
              "type": "string"
            }
          },
          "includeText": {
            "title": "Include disclosure text",
            "type": "boolean",
            "description": "Disclosures and footnotes. Also read each disclosure's full text, as HTML and plain text. One more request per row, and priced higher.",
            "default": false
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "SEC filings. Filings Calcbench published on or after this date, as YYYY-MM-DD. Set with the end date."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "SEC filings. Filings Calcbench published on or before this date, as YYYY-MM-DD."
          },
          "filingTypes": {
            "title": "Filing types",
            "type": "array",
            "description": "SEC filings. Leave empty for every type.",
            "items": {
              "type": "string",
              "enum": [
                "annualQuarterlyReport",
                "eightk_earningsPressRelease",
                "eightk_guidanceUpdate",
                "eightk_conferenceCallTranscript",
                "eightk_presentationSlides",
                "eightk_monthlyOperatingMetrics",
                "eightk_earningsPressRelease_preliminary",
                "eightk_earningsPressRelease_correction",
                "eightk_other",
                "eightk_nonfinancial",
                "proxy",
                "commentLetter",
                "commentLetterResponse",
                "form_3",
                "form_4",
                "form_5",
                "NT10KorQ",
                "S",
                "Four24B",
                "institutionalOwnsership_13F"
              ],
              "enumTitles": [
                "10-K and 10-Q",
                "Earnings press release",
                "Guidance update",
                "Conference call transcript",
                "Presentation slides",
                "Monthly operating metrics",
                "Preliminary earnings release",
                "Earnings release correction",
                "Other 8-K",
                "Non-financial 8-K",
                "Proxy statement",
                "SEC comment letter",
                "Comment letter response",
                "Form 3",
                "Form 4",
                "Form 5",
                "Late filing notice (NT 10-K or 10-Q)",
                "Registration statement (S)",
                "Prospectus (424B)",
                "13F institutional holdings"
              ]
            }
          },
          "includeNonXbrl": {
            "title": "Include non-XBRL filings",
            "type": "boolean",
            "description": "SEC filings. Include filings without XBRL, such as 8-Ks and earnings releases.",
            "default": true
          },
          "index": {
            "title": "Index",
            "enum": [
              "DJIA",
              "SP500",
              "IFRS",
              "ESMA"
            ],
            "type": "string",
            "description": "Companies. Read the members of an index."
          },
          "sicCodes": {
            "title": "SIC codes",
            "type": "array",
            "description": "Companies. Standard Industrial Classification codes, such as 7372 or 3571.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Companies. NAICS codes, such as 511210 or 334111.",
            "items": {
              "type": "string"
            }
          },
          "includeAllMetrics": {
            "title": "Every metric",
            "type": "boolean",
            "description": "Standardized metrics dictionary. Include every metric Calcbench defines, not only the commonly used ones.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for, across all companies.",
            "default": 500
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Pacing. Calcbench publishes no rate limit; the actor also waits and retries when the provider answers 429.",
            "default": 60
          },
          "email": {
            "title": "Calcbench email",
            "type": "string",
            "description": "The email you sign in to calcbench.com with. Calcbench has no API keys: its API signs in with your account's email and password, as its official Python client does. Stored as a secret and never logged. You can instead set the DATA_API_EMAIL environment secret."
          },
          "apiKey": {
            "title": "Calcbench password",
            "type": "string",
            "description": "Your calcbench.com password, used only to sign in to the Calcbench API for this run. Stored as a secret, sent only to calcbench.com and never logged. You can instead set the DATA_API_KEY environment secret, as the password or as email:password."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}