# xbrl.asof

Get SEC EDGAR XBRL values as of an inclusive filing date, with later value changes and source filings. Covers entity-wide facts from standard taxonomies.

- REST: `POST https://api.kanagu.dev/v1/xbrl/asof`
- MCP tool: `xbrl.asof` at https://api.kanagu.dev/mcp
- Price: $0.08 USD per successful call. Trial: 10 calls per IP per UTC day without a key, shared by REST and MCP.
- Auth: `Authorization: Bearer <key>` for billed calls. Retries: reuse `Idempotency-Key`.

## Request body

- `concepts` (array of object, required)
- `concepts[].taxonomy` (string, required): SEC taxonomy, e.g. us-gaap.
- `concepts[].tag` (string, required): Case-sensitive XBRL concept tag.
- `periods` (array of object, required): Exact fiscal date ranges or instants. Use the company's fiscal calendar.
- `periods[].start` (string (date)): First day of a duration fact. Omit for an instant fact.
- `periods[].end` (string (date), required): Last day of a duration fact or date of an instant fact.
- `asOf` (string (date), required): Inclusive SEC filing date. Includes all submissions filed on this date.

Then exactly one of these shapes:

1. With cik:

- `cik` (string | integer (1 to 9999999999), required): SEC Central Index Key, with or without leading zeros.

2. With ticker:

- `ticker` (string, required): Current SEC ticker. Use CIK for historical identifiers.

## Response

- `cik` (string, required): Ten-digit SEC Central Index Key.
- `source` (string (uri), required): SEC EDGAR XBRL API documentation.
- `asOf` (string (date), required)
- `results` (array of object, required)
- `results[].taxonomy` (string, required): SEC taxonomy, e.g. us-gaap.
- `results[].tag` (string, required): Case-sensitive XBRL concept tag.
- `results[].period` (object, required)
- `results[].period.start` (string (date)): First day of a duration fact. Omit for an instant fact.
- `results[].period.end` (string (date), required): Last day of a duration fact or date of an instant fact.
- `results[].status` ("found" | "concept_not_found" | "period_not_found", required)
- `results[].series` (array of object, required)
- `results[].series[].unit` (string, required)
- `results[].series[].latest` (object | null, required): Most recent filing version as of the cutoff. Null if no filing had reported this fact.
- `results[].series[].laterRevisions` (array of object, required): Later value changes, first disclosures, and unresolved filings. Unchanged repeats appear in xbrl.history.

## Example

```sh
curl https://api.kanagu.dev/v1/xbrl/asof \
  -H "Authorization: Bearer $KANAGU_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ticker":"MSFT","concepts":[{"taxonomy":"us-gaap","tag":"NetIncomeLoss"}],"periods":[{"start":"2015-07-01","end":"2015-09-30"}],"asOf":"2016-04-20"}'
```

```ts
const res = await fetch("https://api.kanagu.dev/v1/xbrl/asof", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KANAGU_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "ticker": "MSFT",
    "concepts": [
      {
        "taxonomy": "us-gaap",
        "tag": "NetIncomeLoss"
      }
    ],
    "periods": [
      {
        "start": "2015-07-01",
        "end": "2015-09-30"
      }
    ],
    "asOf": "2016-04-20"
  }),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const result = await res.json();
```

## Errors

JSON `{"error":{"code","message"}}`.

- 400 `invalid_input`: The body does not match the request schema. The message names each field.
- 400 `invalid_json`: The body is missing or is not valid JSON.
- 400 `invalid_idempotency_key`: Idempotency-Key must be 1–128 visible ASCII characters.
- 401 `invalid_api_key`: The Bearer key is missing, malformed, invalid or inactive.
- 402 `free_allowance_exhausted`: This month's free usage is used up and the account has no subscription. Subscribe from the dashboard, or wait for the next UTC month; Retry-After gives the seconds left.
- 404 `not_found`: No operation at this path.
- 409 `idempotency_conflict`: The Idempotency-Key was already used with a different body.
- 413 `payload_too_large`: JSON bodies may be at most 64 KiB.
- 429 `trial_limit`: The anonymous trial allows 10 calls per IP per UTC day, shared by REST and MCP. Retry-After gives the seconds left.
- 500 `internal_error`: The call failed on our side. It is not billed; retry with the same Idempotency-Key.

## JSON Schema

Request:
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "concepts": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "taxonomy": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9-]{0,19}$",
                "description": "SEC taxonomy, e.g. us-gaap."
              },
              "tag": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,254}$",
                "description": "Case-sensitive XBRL concept tag."
              }
            },
            "required": [
              "taxonomy",
              "tag"
            ],
            "additionalProperties": false
          }
        },
        "periods": {
          "minItems": 1,
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "start": {
                "description": "First day of a duration fact. Omit for an instant fact.",
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "end": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Last day of a duration fact or date of an instant fact."
              }
            },
            "required": [
              "end"
            ],
            "additionalProperties": false
          },
          "description": "Exact fiscal date ranges or instants. Use the company's fiscal calendar."
        },
        "asOf": {
          "type": "string",
          "format": "date",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
          "description": "Inclusive SEC filing date. Includes all submissions filed on this date."
        },
        "cik": {
          "description": "SEC Central Index Key, with or without leading zeros.",
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\d{1,10}$"
            },
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 9999999999
            }
          ]
        }
      },
      "required": [
        "concepts",
        "periods",
        "asOf",
        "cik"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "concepts": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "taxonomy": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9-]{0,19}$",
                "description": "SEC taxonomy, e.g. us-gaap."
              },
              "tag": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,254}$",
                "description": "Case-sensitive XBRL concept tag."
              }
            },
            "required": [
              "taxonomy",
              "tag"
            ],
            "additionalProperties": false
          }
        },
        "periods": {
          "minItems": 1,
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "start": {
                "description": "First day of a duration fact. Omit for an instant fact.",
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "end": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Last day of a duration fact or date of an instant fact."
              }
            },
            "required": [
              "end"
            ],
            "additionalProperties": false
          },
          "description": "Exact fiscal date ranges or instants. Use the company's fiscal calendar."
        },
        "asOf": {
          "type": "string",
          "format": "date",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
          "description": "Inclusive SEC filing date. Includes all submissions filed on this date."
        },
        "ticker": {
          "description": "Current SEC ticker. Use CIK for historical identifiers.",
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9.-]{0,15}$"
        }
      },
      "required": [
        "concepts",
        "periods",
        "asOf",
        "ticker"
      ],
      "additionalProperties": false
    }
  ],
  "examples": [
    {
      "ticker": "MSFT",
      "concepts": [
        {
          "taxonomy": "us-gaap",
          "tag": "NetIncomeLoss"
        }
      ],
      "periods": [
        {
          "start": "2015-07-01",
          "end": "2015-09-30"
        }
      ],
      "asOf": "2016-04-20"
    }
  ],
  "type": "object"
}
```

Response:
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cik": {
      "type": "string",
      "description": "Ten-digit SEC Central Index Key."
    },
    "source": {
      "type": "string",
      "format": "uri",
      "description": "SEC EDGAR XBRL API documentation."
    },
    "asOf": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "taxonomy": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{0,19}$",
            "description": "SEC taxonomy, e.g. us-gaap."
          },
          "tag": {
            "type": "string",
            "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,254}$",
            "description": "Case-sensitive XBRL concept tag."
          },
          "period": {
            "type": "object",
            "properties": {
              "start": {
                "description": "First day of a duration fact. Omit for an instant fact.",
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "end": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Last day of a duration fact or date of an instant fact."
              }
            },
            "required": [
              "end"
            ],
            "additionalProperties": false
          },
          "status": {
            "type": "string",
            "enum": [
              "found",
              "concept_not_found",
              "period_not_found"
            ]
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "unit": {
                  "type": "string"
                },
                "latest": {
                  "anyOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "const": "reported"
                            },
                            "filed": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "fact": {
                              "type": "object",
                              "properties": {
                                "cik": {
                                  "type": "string"
                                },
                                "taxonomy": {
                                  "type": "string",
                                  "pattern": "^[a-z][a-z0-9-]{0,19}$",
                                  "description": "SEC taxonomy, e.g. us-gaap."
                                },
                                "tag": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,254}$",
                                  "description": "Case-sensitive XBRL concept tag."
                                },
                                "start": {
                                  "description": "First day of a duration fact. Omit for an instant fact.",
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "end": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "description": "Last day of a duration fact or date of an instant fact."
                                },
                                "unit": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "number"
                                },
                                "fiscalYear": {
                                  "description": "Fiscal year of the filing, as supplied by SEC EDGAR.",
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "fiscalPeriod": {
                                  "description": "Fiscal period of the filing, as supplied by SEC EDGAR.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "form": {
                                  "type": "string"
                                },
                                "filed": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "accession": {
                                  "type": "string",
                                  "pattern": "^\\d{10}-\\d{2}-\\d{6}$"
                                },
                                "frame": {
                                  "description": "Current SEC calendar frame metadata, when present.",
                                  "type": "string"
                                },
                                "acceptedAt": {
                                  "description": "SEC submission acceptance time, used to order same-day filings.",
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                },
                                "filingUrl": {
                                  "type": "string",
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "cik",
                                "taxonomy",
                                "tag",
                                "end",
                                "unit",
                                "value",
                                "form",
                                "filed",
                                "accession",
                                "filingUrl"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "status",
                            "filed",
                            "fact"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "const": "needs_review"
                            },
                            "filed": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "candidates": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cik": {
                                    "type": "string"
                                  },
                                  "taxonomy": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9-]{0,19}$",
                                    "description": "SEC taxonomy, e.g. us-gaap."
                                  },
                                  "tag": {
                                    "type": "string",
                                    "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,254}$",
                                    "description": "Case-sensitive XBRL concept tag."
                                  },
                                  "start": {
                                    "description": "First day of a duration fact. Omit for an instant fact.",
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "end": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "description": "Last day of a duration fact or date of an instant fact."
                                  },
                                  "unit": {
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": "number"
                                  },
                                  "fiscalYear": {
                                    "description": "Fiscal year of the filing, as supplied by SEC EDGAR.",
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": -9007199254740991,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "fiscalPeriod": {
                                    "description": "Fiscal period of the filing, as supplied by SEC EDGAR.",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "form": {
                                    "type": "string"
                                  },
                                  "filed": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "accession": {
                                    "type": "string",
                                    "pattern": "^\\d{10}-\\d{2}-\\d{6}$"
                                  },
                                  "frame": {
                                    "description": "Current SEC calendar frame metadata, when present.",
                                    "type": "string"
                                  },
                                  "acceptedAt": {
                                    "description": "SEC submission acceptance time, used to order same-day filings.",
                                    "type": "string",
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                  },
                                  "filingUrl": {
                                    "type": "string",
                                    "format": "uri"
                                  }
                                },
                                "required": [
                                  "cik",
                                  "taxonomy",
                                  "tag",
                                  "end",
                                  "unit",
                                  "value",
                                  "form",
                                  "filed",
                                  "accession",
                                  "filingUrl"
                                ],
                                "additionalProperties": false
                              },
                              "description": "Conflicting facts or filings whose order could not be determined."
                            }
                          },
                          "required": [
                            "status",
                            "filed",
                            "candidates"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Most recent filing version as of the cutoff. Null if no filing had reported this fact."
                },
                "laterRevisions": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "reported"
                          },
                          "filed": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          "fact": {
                            "type": "object",
                            "properties": {
                              "cik": {
                                "type": "string"
                              },
                              "taxonomy": {
                                "type": "string",
                                "pattern": "^[a-z][a-z0-9-]{0,19}$",
                                "description": "SEC taxonomy, e.g. us-gaap."
                              },
                              "tag": {
                                "type": "string",
                                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,254}$",
                                "description": "Case-sensitive XBRL concept tag."
                              },
                              "start": {
                                "description": "First day of a duration fact. Omit for an instant fact.",
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "end": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "description": "Last day of a duration fact or date of an instant fact."
                              },
                              "unit": {
                                "type": "string"
                              },
                              "value": {
                                "type": "number"
                              },
                              "fiscalYear": {
                                "description": "Fiscal year of the filing, as supplied by SEC EDGAR.",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "fiscalPeriod": {
                                "description": "Fiscal period of the filing, as supplied by SEC EDGAR.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "form": {
                                "type": "string"
                              },
                              "filed": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "accession": {
                                "type": "string",
                                "pattern": "^\\d{10}-\\d{2}-\\d{6}$"
                              },
                              "frame": {
                                "description": "Current SEC calendar frame metadata, when present.",
                                "type": "string"
                              },
                              "acceptedAt": {
                                "description": "SEC submission acceptance time, used to order same-day filings.",
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              "filingUrl": {
                                "type": "string",
                                "format": "uri"
                              }
                            },
                            "required": [
                              "cik",
                              "taxonomy",
                              "tag",
                              "end",
                              "unit",
                              "value",
                              "form",
                              "filed",
                              "accession",
                              "filingUrl"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "status",
                          "filed",
                          "fact"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "needs_review"
                          },
                          "filed": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          "candidates": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "cik": {
                                  "type": "string"
                                },
                                "taxonomy": {
                                  "type": "string",
                                  "pattern": "^[a-z][a-z0-9-]{0,19}$",
                                  "description": "SEC taxonomy, e.g. us-gaap."
                                },
                                "tag": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,254}$",
                                  "description": "Case-sensitive XBRL concept tag."
                                },
                                "start": {
                                  "description": "First day of a duration fact. Omit for an instant fact.",
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "end": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "description": "Last day of a duration fact or date of an instant fact."
                                },
                                "unit": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "number"
                                },
                                "fiscalYear": {
                                  "description": "Fiscal year of the filing, as supplied by SEC EDGAR.",
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "fiscalPeriod": {
                                  "description": "Fiscal period of the filing, as supplied by SEC EDGAR.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "form": {
                                  "type": "string"
                                },
                                "filed": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "accession": {
                                  "type": "string",
                                  "pattern": "^\\d{10}-\\d{2}-\\d{6}$"
                                },
                                "frame": {
                                  "description": "Current SEC calendar frame metadata, when present.",
                                  "type": "string"
                                },
                                "acceptedAt": {
                                  "description": "SEC submission acceptance time, used to order same-day filings.",
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                },
                                "filingUrl": {
                                  "type": "string",
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "cik",
                                "taxonomy",
                                "tag",
                                "end",
                                "unit",
                                "value",
                                "form",
                                "filed",
                                "accession",
                                "filingUrl"
                              ],
                              "additionalProperties": false
                            },
                            "description": "Conflicting facts or filings whose order could not be determined."
                          }
                        },
                        "required": [
                          "status",
                          "filed",
                          "candidates"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "description": "Later value changes, first disclosures, and unresolved filings. Unchanged repeats appear in xbrl.history."
                }
              },
              "required": [
                "unit",
                "latest",
                "laterRevisions"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "taxonomy",
          "tag",
          "period",
          "status",
          "series"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "cik",
    "source",
    "asOf",
    "results"
  ],
  "additionalProperties": false
}
```
