{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ko-io/json-schema/ko-io-api-envelope-schema.json",
  "title": "ApiEnvelope",
  "description": "Standard response envelope `{ data, meta }`. For most list endpoints `data` is an array of row objects and pagination lives in `meta`. A few endpoints nest their payload inside `data`, as each one documents: financials/historical (an object with `quarterly` and `annual` row arrays), stock-holders (a paginated object whose rows are at `data.data`) and crypto/exposure-summary (an object). v1 shapes are frozen for backward compatibility.",
  "x-generated": "2026-11-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ko-io-openapi.yaml#/components/schemas/ApiEnvelope",
  "type": "object",
  "properties": {
    "data": {
      "description": "The response payload (array of rows or an object), shape varies by endpoint."
    },
    "meta": {
      "type": "object",
      "description": "Pagination + plan metadata (total_count, page, per_page, truncated, upgrade_hint, query_time_ms). Some endpoints also surface resolver hints here (e.g. resolved_member, candidates, quarters). Page size: every paginated list reads `per_page`, with `limit` accepted as an alias (a non-empty `per_page` wins). `meta.pagination` = `{ page, per_page, total_count, total_pages }` (all numbers; `per_page` is the size actually applied after plan caps) is emitted by every paginated list (research insider-signals with `list=all` counts the longest of its three lists; research ticker with `action=all` pages per bucket, so its `total_pages` comes from the longest bucket while `total_count` stays the population; research inbox returns it as null when its source counts could not be read); the older `total_count` / `totalCount` fields stay as they were on each route (some are numeric strings) and are deprecated in favour of it. Percentages and ratios are binary floats and can carry noise (`12.620000000000001`): format them to 2 decimal places on the client."
    }
  }
}