{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://developer.factset.com/schemas/factset-company-schema.json",
  "title": "FactSet Company",
  "description": "A comprehensive schema representing a company entity as modeled across FactSet Fundamentals API data. Includes core identification, financial statement data, calculated ratios, consensus estimates, and segment breakdowns.",
  "type": "object",
  "required": [
    "requestId"
  ],
  "properties": {
    "requestId": {
      "type": "string",
      "description": "The security identifier used in the request. Accepts Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent Ids.",
      "examples": [
        "AAPL-US",
        "FDS-US",
        "MSFT-US",
        "US0378331005"
      ]
    },
    "fsymId": {
      "type": [
        "string",
        "null"
      ],
      "description": "FactSet Regional Security Identifier. Six alpha-numeric characters, excluding vowels, with an -R suffix (XXXXXX-R). Identifies the security's best regional security data series per currency.",
      "pattern": "^[B-DF-HJ-NP-TV-Z0-9]{6}-R$",
      "examples": [
        "MH33D6-R",
        "SQFMK3-R"
      ]
    },
    "companyName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The official registered name of the company.",
      "examples": [
        "Apple Inc.",
        "FactSet Research Systems Inc.",
        "Microsoft Corporation"
      ]
    },
    "ticker": {
      "type": [
        "string",
        "null"
      ],
      "description": "The market ticker symbol for the security.",
      "examples": [
        "AAPL",
        "FDS",
        "MSFT"
      ]
    },
    "exchange": {
      "type": [
        "string",
        "null"
      ],
      "description": "The primary stock exchange where the security is listed.",
      "examples": [
        "NASDAQ",
        "NYSE",
        "LSE"
      ]
    },
    "country": {
      "type": [
        "string",
        "null"
      ],
      "description": "The ISO 3166-1 alpha-2 country code for the company's primary domicile.",
      "pattern": "^[A-Z]{2}$",
      "examples": [
        "US",
        "GB",
        "JP"
      ]
    },
    "currency": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 4217 currency code for the reported financial data.",
      "pattern": "^[A-Z]{3}$",
      "examples": [
        "USD",
        "EUR",
        "GBP"
      ]
    },
    "sectorCode": {
      "type": [
        "string",
        "null"
      ],
      "description": "FactSet industry sector classification code.",
      "examples": [
        "TECH",
        "FINSVC",
        "HEALTHCARE"
      ]
    },
    "industryCode": {
      "type": [
        "string",
        "null"
      ],
      "description": "FactSet industry sub-classification code.",
      "examples": [
        "TECH-HARDWARE",
        "FINSVC-DATA"
      ]
    },
    "fiscalYearEnd": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The month number (1-12) in which the company's fiscal year ends.",
      "minimum": 1,
      "maximum": 12,
      "examples": [
        9,
        12,
        8
      ]
    },
    "financialStatements": {
      "type": [
        "object",
        "null"
      ],
      "description": "Standardized financial statement data organized by statement type.",
      "properties": {
        "incomeStatement": {
          "$ref": "#/$defs/IncomeStatement"
        },
        "balanceSheet": {
          "$ref": "#/$defs/BalanceSheet"
        },
        "cashFlowStatement": {
          "$ref": "#/$defs/CashFlowStatement"
        }
      }
    },
    "ratios": {
      "$ref": "#/$defs/FinancialRatios"
    },
    "estimates": {
      "$ref": "#/$defs/ConsensusEstimates"
    },
    "segments": {
      "type": [
        "object",
        "null"
      ],
      "description": "Business and geographic segment breakdowns.",
      "properties": {
        "business": {
          "type": "array",
          "description": "Business segment data.",
          "items": {
            "$ref": "#/$defs/SegmentItem"
          }
        },
        "geographic": {
          "type": "array",
          "description": "Geographic segment data.",
          "items": {
            "$ref": "#/$defs/SegmentItem"
          }
        }
      }
    },
    "metadata": {
      "$ref": "#/$defs/FiscalMetadata"
    }
  },
  "$defs": {
    "FiscalMetadata": {
      "type": "object",
      "title": "Fiscal Metadata",
      "description": "Metadata about the fiscal period context for the financial data.",
      "properties": {
        "periodicity": {
          "type": "string",
          "description": "Periodicity or frequency of the fiscal periods.",
          "enum": [
            "ANN",
            "ANN_R",
            "QTR",
            "QTR_R",
            "SEMI",
            "SEMI_R",
            "LTM",
            "LTM_R",
            "LTMSG",
            "LTM_SEMI",
            "YTD"
          ]
        },
        "fiscalPeriod": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Fiscal period indicator. QUARTERLY: 1-4, SEMI-ANNUAL: 1-2, ANNUAL: 0."
        },
        "fiscalYear": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Fiscal year in YYYY format.",
          "examples": [
            2023,
            2024
          ]
        },
        "fiscalPeriodLength": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Length of the fiscal period in days.",
          "examples": [
            91,
            365
          ]
        },
        "fiscalEndDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "The normalized date the fiscal period ended in YYYY-MM-DD format.",
          "examples": [
            "2023-12-31"
          ]
        },
        "reportDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "The date the reported fiscal period ended.",
          "examples": [
            "2023-12-30"
          ]
        },
        "epsReportDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "The date the EPS was reported for the requested periodicity.",
          "examples": [
            "2024-02-24"
          ]
        },
        "updateType": {
          "type": [
            "string",
            "null"
          ],
          "description": "Update type: Preliminary (limited data) or Final (complete financial statements).",
          "enum": [
            "Preliminary",
            "Final"
          ]
        }
      }
    },
    "IncomeStatement": {
      "type": "object",
      "title": "Income Statement",
      "description": "Standardized income statement line items. All monetary values are in the currency specified at the company level. Values represent the factor indicated by the metric metadata (typically millions).",
      "properties": {
        "sales": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Total Sales/Revenue (FF_SALES)."
        },
        "costOfGoodsSold": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Cost of Goods Sold (FF_COGS)."
        },
        "grossIncome": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Gross Income/Profit (FF_GROSS_INC)."
        },
        "sellingGeneralAdmin": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Selling, General & Administrative Expense (FF_SGA)."
        },
        "researchDevelopment": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Research & Development Expense (FF_RD_EXP)."
        },
        "depreciation": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Depreciation & Amortization (FF_DEP_AMORT)."
        },
        "operatingIncome": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Operating Income/Loss (FF_OPER_INC)."
        },
        "interestExpense": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Interest Expense (FF_INT_EXP)."
        },
        "pretaxIncome": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Pre-Tax Income (FF_PTAX_INC)."
        },
        "incomeTax": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Income Tax Expense (FF_TAX)."
        },
        "netIncome": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Net Income (FF_NET_INC)."
        },
        "earningsPerShare": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Earnings Per Share - Basic (FF_EPS)."
        },
        "earningsPerShareDiluted": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Earnings Per Share - Diluted (FF_EPS_DIL)."
        },
        "ebitda": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Earnings Before Interest, Taxes, Depreciation & Amortization (FF_EBITDA)."
        },
        "ebit": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Earnings Before Interest & Taxes (FF_EBIT)."
        },
        "sharesOutstanding": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Weighted Average Shares Outstanding - Basic (FF_WGTD_SHS_OUT)."
        },
        "sharesOutstandingDiluted": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Weighted Average Shares Outstanding - Diluted (FF_WGTD_SHS_OUT_DIL)."
        },
        "dividendsPerShare": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Dividends Per Share (FF_DPS)."
        }
      }
    },
    "BalanceSheet": {
      "type": "object",
      "title": "Balance Sheet",
      "description": "Standardized balance sheet line items.",
      "properties": {
        "totalAssets": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Total Assets (FF_ASSETS)."
        },
        "currentAssets": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Total Current Assets (FF_CURR_ASSETS)."
        },
        "cashAndEquivalents": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Cash & Cash Equivalents (FF_CASH)."
        },
        "shortTermInvestments": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Short-Term Investments (FF_STI)."
        },
        "accountsReceivable": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Accounts Receivable - Trade, Net (FF_ACCT_RCV)."
        },
        "inventory": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Inventories (FF_INVENTORIES)."
        },
        "propertyPlantEquipment": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Property, Plant & Equipment - Net (FF_PPE_NET)."
        },
        "goodwill": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Goodwill (FF_GOODWILL)."
        },
        "intangibleAssets": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Intangible Assets (FF_INTANG)."
        },
        "totalLiabilities": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Total Liabilities (FF_LIABS)."
        },
        "currentLiabilities": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Total Current Liabilities (FF_CURR_LIABS)."
        },
        "accountsPayable": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Accounts Payable (FF_ACCT_PAY)."
        },
        "shortTermDebt": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Short-Term Debt & Current Portion of Long-Term Debt (FF_STD)."
        },
        "longTermDebt": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Long-Term Debt (FF_LTD)."
        },
        "totalDebt": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Total Debt (FF_DEBT)."
        },
        "totalEquity": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Total Shareholders' Equity (FF_SHLDRS_EQ)."
        },
        "retainedEarnings": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Retained Earnings (FF_RE)."
        },
        "bookValuePerShare": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Book Value Per Share (FF_BK_VAL_PS)."
        },
        "tangibleBookValuePerShare": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Tangible Book Value Per Share (FF_TBV_PS)."
        }
      }
    },
    "CashFlowStatement": {
      "type": "object",
      "title": "Cash Flow Statement",
      "description": "Standardized cash flow statement line items.",
      "properties": {
        "operatingCashFlow": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Cash Flow from Operating Activities (FF_OPER_CF)."
        },
        "capitalExpenditures": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Capital Expenditures (FF_CAPEX)."
        },
        "freeCashFlow": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Free Cash Flow (FF_FREE_CF)."
        },
        "investingCashFlow": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Cash Flow from Investing Activities (FF_INVEST_CF)."
        },
        "financingCashFlow": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Cash Flow from Financing Activities (FF_FIN_CF)."
        },
        "dividendsPaid": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Dividends Paid (FF_DIV_PAID)."
        },
        "shareRepurchases": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Share Repurchases/Buybacks (FF_REPURCH)."
        },
        "netChangeInCash": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Net Change in Cash (FF_CHG_CASH)."
        },
        "freeCashFlowPerShare": {
          "$ref": "#/$defs/FinancialMetricValue",
          "description": "Free Cash Flow Per Share (FF_FREE_CF_PS)."
        }
      }
    },
    "FinancialRatios": {
      "type": [
        "object",
        "null"
      ],
      "title": "Financial Ratios",
      "description": "Pre-calculated financial ratios organized by category: valuation, profitability, liquidity, leverage, growth, and size.",
      "properties": {
        "valuation": {
          "type": "object",
          "description": "Valuation ratios comparing market price to fundamental metrics.",
          "properties": {
            "priceToEarnings": {
              "$ref": "#/$defs/RatioValue",
              "description": "Price-to-Earnings Ratio (FF_PE)."
            },
            "priceToBook": {
              "$ref": "#/$defs/RatioValue",
              "description": "Price-to-Book Ratio (FF_PBK)."
            },
            "priceToSales": {
              "$ref": "#/$defs/RatioValue",
              "description": "Price-to-Sales Ratio (FF_PS)."
            },
            "priceToCashFlow": {
              "$ref": "#/$defs/RatioValue",
              "description": "Price-to-Cash Flow Ratio (FF_PCF)."
            },
            "priceToFreeCashFlow": {
              "$ref": "#/$defs/RatioValue",
              "description": "Price-to-Free Cash Flow Ratio (FF_PFCF)."
            },
            "enterpriseValueToEbitda": {
              "$ref": "#/$defs/RatioValue",
              "description": "Enterprise Value to EBITDA (FF_EV_EBITDA)."
            },
            "enterpriseValueToSales": {
              "$ref": "#/$defs/RatioValue",
              "description": "Enterprise Value to Sales (FF_EV_SALES)."
            },
            "dividendYield": {
              "$ref": "#/$defs/RatioValue",
              "description": "Dividend Yield (FF_DIV_YLD)."
            },
            "earningsYield": {
              "$ref": "#/$defs/RatioValue",
              "description": "Earnings Yield (FF_EARN_YLD)."
            }
          }
        },
        "profitability": {
          "type": "object",
          "description": "Profitability ratios measuring efficiency and returns.",
          "properties": {
            "returnOnEquity": {
              "$ref": "#/$defs/RatioValue",
              "description": "Return on Equity (FF_ROE)."
            },
            "returnOnAssets": {
              "$ref": "#/$defs/RatioValue",
              "description": "Return on Assets (FF_ROA)."
            },
            "returnOnInvestedCapital": {
              "$ref": "#/$defs/RatioValue",
              "description": "Return on Invested Capital (FF_ROIC)."
            },
            "grossMargin": {
              "$ref": "#/$defs/RatioValue",
              "description": "Gross Profit Margin (FF_GROSS_MARGIN)."
            },
            "operatingMargin": {
              "$ref": "#/$defs/RatioValue",
              "description": "Operating Profit Margin (FF_OPER_MARGIN)."
            },
            "netProfitMargin": {
              "$ref": "#/$defs/RatioValue",
              "description": "Net Profit Margin (FF_NET_MARGIN)."
            },
            "ebitdaMargin": {
              "$ref": "#/$defs/RatioValue",
              "description": "EBITDA Margin (FF_EBITDA_MARGIN)."
            }
          }
        },
        "liquidity": {
          "type": "object",
          "description": "Liquidity ratios measuring ability to meet short-term obligations.",
          "properties": {
            "currentRatio": {
              "$ref": "#/$defs/RatioValue",
              "description": "Current Ratio (FF_CURR_RATIO)."
            },
            "quickRatio": {
              "$ref": "#/$defs/RatioValue",
              "description": "Quick Ratio / Acid Test (FF_QUICK_RATIO)."
            },
            "cashRatio": {
              "$ref": "#/$defs/RatioValue",
              "description": "Cash Ratio (FF_CASH_RATIO)."
            }
          }
        },
        "leverage": {
          "type": "object",
          "description": "Leverage and coverage ratios measuring financial structure.",
          "properties": {
            "debtToEquity": {
              "$ref": "#/$defs/RatioValue",
              "description": "Debt-to-Equity Ratio (FF_DEBT_EQUITY)."
            },
            "debtToAssets": {
              "$ref": "#/$defs/RatioValue",
              "description": "Debt-to-Assets Ratio (FF_DEBT_ASSETS)."
            },
            "interestCoverage": {
              "$ref": "#/$defs/RatioValue",
              "description": "Interest Coverage Ratio (FF_INT_COV)."
            },
            "netDebtToEbitda": {
              "$ref": "#/$defs/RatioValue",
              "description": "Net Debt to EBITDA (FF_NET_DEBT_EBITDA)."
            }
          }
        },
        "growth": {
          "type": "object",
          "description": "Growth rate ratios measuring year-over-year changes.",
          "properties": {
            "revenueGrowth": {
              "$ref": "#/$defs/RatioValue",
              "description": "Revenue Growth Rate (FF_SALES_GR)."
            },
            "epsGrowth": {
              "$ref": "#/$defs/RatioValue",
              "description": "Earnings Per Share Growth Rate (FF_EPS_GR)."
            },
            "netIncomeGrowth": {
              "$ref": "#/$defs/RatioValue",
              "description": "Net Income Growth Rate (FF_NET_INC_GR)."
            },
            "assetGrowth": {
              "$ref": "#/$defs/RatioValue",
              "description": "Total Asset Growth Rate (FF_ASSETS_GR)."
            },
            "bookValueGrowth": {
              "$ref": "#/$defs/RatioValue",
              "description": "Book Value Per Share Growth Rate (FF_BK_VAL_PS_GR)."
            }
          }
        },
        "size": {
          "type": "object",
          "description": "Size metrics for market capitalization and enterprise value.",
          "properties": {
            "marketCapitalization": {
              "$ref": "#/$defs/RatioValue",
              "description": "Market Capitalization (FF_MKT_CAP)."
            },
            "enterpriseValue": {
              "$ref": "#/$defs/RatioValue",
              "description": "Enterprise Value (FF_EV)."
            }
          }
        }
      }
    },
    "ConsensusEstimates": {
      "type": [
        "object",
        "null"
      ],
      "title": "Consensus Estimates",
      "description": "Consensus analyst estimates for key financial metrics. Aggregated from 800+ contributors covering 19,000+ active companies across 90+ countries.",
      "properties": {
        "salesEstimate": {
          "$ref": "#/$defs/EstimateItem",
          "description": "Consensus sales/revenue estimate (FF_EST_SALES)."
        },
        "epsEstimate": {
          "$ref": "#/$defs/EstimateItem",
          "description": "Consensus earnings per share estimate (FF_EST_EPS)."
        },
        "ebitdaEstimate": {
          "$ref": "#/$defs/EstimateItem",
          "description": "Consensus EBITDA estimate (FF_EST_EBITDA)."
        },
        "netIncomeEstimate": {
          "$ref": "#/$defs/EstimateItem",
          "description": "Consensus net income estimate (FF_EST_NET_INC)."
        },
        "dpsEstimate": {
          "$ref": "#/$defs/EstimateItem",
          "description": "Consensus dividends per share estimate (FF_EST_DPS)."
        },
        "targetPrice": {
          "$ref": "#/$defs/EstimateItem",
          "description": "Consensus analyst target price."
        }
      }
    },
    "EstimateItem": {
      "type": "object",
      "title": "Estimate Item",
      "description": "A single consensus estimate data point with statistical aggregation of analyst projections.",
      "properties": {
        "metric": {
          "type": "string",
          "description": "The estimate metric identifier.",
          "examples": [
            "FF_EST_EPS",
            "FF_EST_SALES"
          ]
        },
        "fiscalYear": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Fiscal year being estimated.",
          "examples": [
            2025
          ]
        },
        "fiscalPeriod": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Fiscal period being estimated."
        },
        "estimateCount": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Number of analyst estimates included in the consensus.",
          "minimum": 0,
          "examples": [
            38
          ]
        },
        "mean": {
          "type": [
            "number",
            "null"
          ],
          "description": "Mean (average) of analyst estimates.",
          "examples": [
            7.42
          ]
        },
        "median": {
          "type": [
            "number",
            "null"
          ],
          "description": "Median of analyst estimates.",
          "examples": [
            7.45
          ]
        },
        "high": {
          "type": [
            "number",
            "null"
          ],
          "description": "Highest analyst estimate.",
          "examples": [
            7.95
          ]
        },
        "low": {
          "type": [
            "number",
            "null"
          ],
          "description": "Lowest analyst estimate.",
          "examples": [
            6.85
          ]
        },
        "standardDeviation": {
          "type": [
            "number",
            "null"
          ],
          "description": "Standard deviation of analyst estimates.",
          "minimum": 0,
          "examples": [
            0.22
          ]
        }
      }
    },
    "SegmentItem": {
      "type": "object",
      "title": "Segment Item",
      "description": "A single business or geographic segment data point.",
      "properties": {
        "label": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name/label of the segment as reported by the company.",
          "examples": [
            "iPhone",
            "Services",
            "Americas",
            "Europe"
          ]
        },
        "metric": {
          "type": [
            "string",
            "null"
          ],
          "description": "The segment metric identifier.",
          "enum": [
            "SALES",
            "OPINC",
            "ASSETS",
            "DEP",
            "CAPEX"
          ]
        },
        "date": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "Date for the period in YYYY-MM-DD format.",
          "examples": [
            "2023-09-30"
          ]
        },
        "value": {
          "type": [
            "number",
            "null"
          ],
          "description": "The segment metric value.",
          "examples": [
            200583000000
          ]
        }
      }
    },
    "FinancialMetricValue": {
      "type": [
        "number",
        "string",
        "null"
      ],
      "title": "Financial Metric Value",
      "description": "A financial metric value. May be a number (typically double precision), a string for non-numeric metrics, or null if data is unavailable."
    },
    "RatioValue": {
      "type": [
        "number",
        "null"
      ],
      "title": "Ratio Value",
      "description": "A calculated financial ratio value. Double precision floating point. Null if data is unavailable or not applicable.",
      "format": "double"
    }
  }
}
