{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/filings-tools/json-schema/filings-tools-facts-result-schema.json",
  "title": "FactsResult",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/filings-tools-openapi.json#/components/schemas/FactsResult",
  "type": "object",
  "required": [
    "company",
    "filing",
    "facts"
  ],
  "properties": {
    "company": {
      "$ref": "#/$defs/Company"
    },
    "filing": {
      "type": "object",
      "required": [
        "id",
        "form",
        "accession",
        "filingDate",
        "sourceUrl"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "form": {
          "type": "string"
        },
        "accession": {
          "type": "string"
        },
        "filingDate": {
          "type": "string",
          "format": "date"
        },
        "reportDate": {
          "type": "string"
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "facts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Fact"
      }
    }
  },
  "$defs": {
    "Company": {
      "type": "object",
      "description": "A company in the SEC ticker list.",
      "required": [
        "cik",
        "ticker",
        "name"
      ],
      "properties": {
        "cik": {
          "type": "integer"
        },
        "ticker": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "sic": {
          "type": "string"
        },
        "sicDescription": {
          "type": "string"
        },
        "fiscalYearEnd": {
          "type": "string",
          "description": "MMDD."
        }
      }
    },
    "Fact": {
      "type": "object",
      "required": [
        "concept",
        "value",
        "unit",
        "end",
        "form",
        "filed",
        "accession"
      ],
      "properties": {
        "concept": {
          "type": "string"
        },
        "friendly": {
          "type": "string",
          "enum": [
            "revenue",
            "netIncome",
            "epsDiluted",
            "totalAssets",
            "cash",
            "longTermDebt",
            "sharesOutstanding",
            "operatingIncome",
            "capex",
            "operatingCashFlow"
          ]
        },
        "value": {
          "type": "number"
        },
        "unit": {
          "type": "string"
        },
        "start": {
          "type": "string",
          "format": "date"
        },
        "end": {
          "type": "string",
          "format": "date"
        },
        "fy": {
          "type": "integer"
        },
        "fp": {
          "type": "string"
        },
        "form": {
          "type": "string"
        },
        "filed": {
          "type": "string",
          "format": "date"
        },
        "accession": {
          "type": "string"
        }
      }
    }
  }
}