## Get Screener Catalog

`$ clst v1:screener get-screener-catalog`

**get** `/v1/screener/catalog`

Returns the complete screener field catalog: the field `kinds`, the
per-field data, the enum universes, the request-side `rules`, the built-in
variables and modifiers, and the `POST /screener` default response fields.

`POST /screener` field references are validated against this catalog; its
`rules` object documents how to compose a valid request.

### Returns

- `V1ScreenerGetScreenerCatalogResponse: BaseResponse`

  - `data: object { default_response_fields, enums, fields, 6 more }`

    The complete screener field catalog, serialized as the `data` payload of
    `GET /screener/catalog`.

    - `default_response_fields: array of string`

      The `api_name`s that resolve to the POST default column set when
      `columns` is omitted.

    - `enums: object { builtin_variable, category, date_unit, 7 more }`

      The enum universes every other section's values are drawn from.

      - `builtin_variable: array of string`

        The built-in variable names, e.g. `"today"`, `"start_of_year"`.

      - `category: array of string`

        `FieldCategory` variants, e.g. `"PROFILE"`, `"VALUATION"`.

      - `date_unit: array of string`

        The modifier date units, e.g. `"DAY"`, `"YEAR"`.

      - `format: array of string`

        `FieldFormat` variants, e.g. `"CURRENCY"`, `"PERCENT"`.

      - `lookback: array of string`

        `FieldLookback` variants, e.g. `"ONE_WEEK"`, `"YEAR_TO_DATE"`.

      - `modifier_op: array of string`

        The modifier operation names, `"ADD"` and `"SUBTRACT"`.

      - `operator: array of string`

        `FilterOperator` variants, e.g. `"BETWEEN"`, `"ONE_OF"`.

      - `operator_arg: array of string`

        The modifier arg forms, e.g. `"LEFT_INCLUSIVE"`.

      - `period: array of string`

        `FieldPeriod` variants, e.g. `"QUARTER"`, `"ANNUAL"`.

      - `value_type: array of string`

        `FieldValueType` variants, e.g. `"DECIMAL"`, `"DATE"`.

    - `fields: object { description, display_name, kind, name }`

      Struct-of-arrays of the remaining per-field scalars.

      - `description: array of string`

        A human-readable description of the field.

      - `display_name: array of string`

        The display name of the column when no `period` / `lookback` is set.

      - `kind: array of number`

        Index into `Catalog::kinds`.

      - `name: array of string`

        The base field name, as accepted in a request's `left.name` /
        `right[].variable` field reference.

    - `kinds: array of FieldKind`

      The deduplicated `(category, format, value_type, combinations, default combination)` tuples; `fields.kind[i]` indexes into this.

      - `category: string`

        The field's category, a member of `enums.category`.

      - `combinations: array of Combination`

        Ordered, in declaration order. The empty combination is the current
        or most recent value.

        - `lookback: optional string`

          The lookback, a member of `enums.lookback`.

        - `period: optional string`

          The period, a member of `enums.period`.

      - `default_combination: object { lookback, period }`

        The combination a bare field reference resolves to: the field's
        current or most recent value when the kind offers it, otherwise the
        kind's default `period` / `lookback`.

        - `lookback: optional string`

          The lookback, a member of `enums.lookback`.

        - `period: optional string`

          The period, a member of `enums.period`.

      - `format: string`

        The field's format, a member of `enums.format`.

      - `value_type: string`

        The field's value type, a member of `enums.value_type`.

    - `modifiers: array of ModifierDef`

      The modifier operations and their legal `args` forms.

      - `args: array of ModifierArg`

        The positional `args` slots, in order.

        - `kind: string`

          `"NUMBER"` or `"ENUM"`.

        - `note: string`

          The arg's meaning and constraints.

        - `position: number`

          Zero-based position in the `args` array.

        - `required: boolean`

          Whether the arg must be present in every modifier use.

        - `default: optional string`

          For optional args: the value used when the arg is omitted.

        - `ref: optional string`

          For `"ENUM"` args: the `enums` list the value must be a member of.

      - `name: string`

        The modifier operation name: one of `"ADD"` or `"SUBTRACT"`.

    - `operators_by_value_type: map[array of string]`

      `value_type` -> canonically-ordered valid operators.

    - `rules: object { api_name_composition, axes, defaults, 3 more }`

      Request-side semantics for turning the data into a valid call.

      - `api_name_composition: string`

        Requests and response `field` objects use the same reference shape:
        base name plus at most one of `period` / `lookback`;
        `default_response_fields` (the POST default column set when `columns`
        is omitted) carries api_names, each decoding via `suffixes`.

      - `axes: string`

        At most one of `period` / `lookback`; the empty combination selects
        the field's current or most recent value.

      - `defaults: string`

        Omitting both is always valid; it resolves to the field's current or
        most recent value when the kind offers it, otherwise to
        `default_combination`.

      - `modifiers: string`

        Where `modifier` is legal, its `args` forms, and unit semantics.

      - `operators: string`

        Filter operator value counts for the `right` array.

      - `variables: string`

        Built-in variables and field references in `right[].variable`.

    - `suffixes: map[string]`

      Axis token -> abbreviation, for every token in use in `kinds`.

    - `variables: array of VariableDef`

      The built-in variables accepted in `filters[].right[].variable`.

      - `description: string`

        A human-readable description of what the variable resolves to.

      - `name: string`

        The variable name as accepted in `filters[].right[].variable`.

      - `resolves_to: string`

        What the variable resolves to at call time (`DATE` for all built-ins).

### Example

```cli
clst v1:screener get-screener-catalog \
  --api-key 'My API Key'
```

#### Response

```json
{
  "data": {
    "default_response_fields": [
      "market_cap",
      "earnings_per_share_ttm"
    ],
    "enums": {
      "category": [
        "PROFILE",
        "MARKET_DATA"
      ],
      "operator": [
        "LESS_THAN",
        "LESS_OR_EQUAL",
        "GREATER_THAN",
        "GREATER_OR_EQUAL",
        "EQUAL",
        "BETWEEN"
      ],
      "period": [
        "QUARTER",
        "TRAILING_TWELVE_MONTHS",
        "ANNUAL"
      ],
      "value_type": [
        "DECIMAL",
        "INTEGER",
        "STRING",
        "ANALYST_RATING",
        "DATE"
      ]
    },
    "fields": {
      "description": [
        "Trading symbol",
        "Market Identifier Code (MIC) for primary exchange"
      ],
      "display_name": [
        "Symbol",
        "Security Exchange"
      ],
      "kind": [
        0,
        0
      ],
      "name": [
        "symbol",
        "security_exchange"
      ]
    },
    "kinds": [
      {
        "category": "PROFILE",
        "combinations": [
          {}
        ],
        "default_combination": {},
        "format": "NONE",
        "value_type": "STRING"
      },
      {
        "category": "PROFILE",
        "combinations": [
          {}
        ],
        "default_combination": {},
        "format": "COUNT",
        "value_type": "INTEGER"
      }
    ],
    "modifiers": [
      {
        "args": [
          {
            "kind": "NUMBER",
            "note": "Positive integer for date built-ins; any number for numeric BETWEEN field-ref bounds.",
            "position": 0,
            "required": true
          },
          {
            "default": "DAY",
            "kind": "ENUM",
            "note": "Date built-ins only; ignored on numeric BETWEEN bounds.",
            "position": 1,
            "ref": "date_unit",
            "required": false
          }
        ],
        "name": "ADD"
      }
    ],
    "operators_by_value_type": {
      "ANALYST_RATING": [
        "EQUAL",
        "ONE_OF",
        "IS_NULL",
        "IS_NOT_NULL"
      ]
    },
    "rules": {
      "axes": "A combination carries at most one of `period` / `lookback`; the API rejects both together. The empty combination selects the field's current or most recent value and is present only when the kind offers it.",
      "operators": "`BETWEEN` and `NOT_BETWEEN` take exactly two `right` values; `ONE_OF` takes one or more; all other operators take exactly one; `IS_NULL` and `IS_NOT_NULL` take none (omit `right`)."
    },
    "suffixes": {
      "ANNUAL": "a",
      "QUARTER": "q",
      "TRAILING_TWELVE_MONTHS": "ttm"
    },
    "variables": [
      {
        "description": "The current date in the server's local timezone.",
        "name": "today",
        "resolves_to": "DATE"
      }
    ]
  },
  "error": null,
  "metadata": {
    "request_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
  }
}
```
