> ## Documentation Index
> Fetch the complete documentation index at: https://stockcontext.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Stock universe

> Enumerate active listings with database-derived coverage markers and published filer shapes.

<Note>
  `stock_universe` is schema-2 only. Omit `schema` or send `{ "schema": 2 }`.
</Note>

The default page returns 100 ticker-sorted listings. Use `offset` and `limit` (maximum 500) to
continue, and filter by `coverage` or `shape` before running a fundamentals screen. The three
coverage markers are mutually exclusive database facts: `has_fundamentals`, `prices_only`, and
`discovery_only`. `has_fundamentals` means a published overview build exists; values inside it may
still serve as `verification_pending` during scoring windows. This differs from `stock_search`
preflight, which checks the financials pointer to answer whether statements are servable.


## OpenAPI

````yaml POST /v1/tools/stock_universe
openapi: 3.1.0
info:
  title: StockContext API
  version: '2026-07-10'
  summary: Schema-aware structural reference for StockContext tools.
  description: >-
    This OpenAPI document is structural and schema-aware: request schemas, the
    schema selector, HTTP statuses, and envelope-level response forms are
    modeled from the live API boundary. Captured examples remain authoritative
    for full nested payload detail.
servers:
  - url: https://api.stockcontext.com
    description: Production API
security: []
tags:
  - name: Discovery
    description: Search, catalogs, and value-flag feedback.
  - name: Financials
    description: SEC-verified fundamentals and overviews.
  - name: Market data
    description: Licensed price feed.
  - name: Filings and activity
    description: SEC filings, insiders, and tracked holders.
paths:
  /v1/tools/stock_universe:
    post:
      tags:
        - Discovery
      summary: Enumerate the active listing universe
      description: >-
        Schema-2-only ticker-sorted listing pages with coverage and filer-shape
        filters. Coverage markers derive from published pointers and held price
        rows.
      operationId: stock_universe
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UniverseRequest'
            examples:
              request:
                summary: Covered listings
                value:
                  coverage: has_fundamentals
                  limit: 100
      responses:
        '200':
          description: >-
            A columnar page with visible omitted-count and continuation
            metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Schema2Envelope'
              examples:
                success:
                  summary: Schema 2 response
                  value:
                    data:
                      page:
                        offset: 0
                        limit: 100
                        listings_total: 6976
                        listings_returned: 100
                        listings_omitted: 6876
                        exhaustive: false
                        next_offset: 100
                      filters:
                        coverage: has_fundamentals
                      columns:
                        - ticker
                        - name
                        - cik
                        - exchange
                        - shape
                        - coverage
                      rows:
                        - - AAPL
                          - Apple Inc.
                          - '0000320193'
                          - XNAS
                          - operating_company
                          - has_fundamentals
                    meta:
                      schema_version: '2'
        '304':
          $ref: '#/components/responses/NotModified'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '413':
          $ref: '#/components/responses/RequestTooLarge'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalFailure'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: bash
          label: curl
          source: |-
            curl -sS "https://api.stockcontext.com/v1/tools/stock_universe" \
              -H "X-API-Key: $STOCKCONTEXT_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"coverage":"has_fundamentals","limit":100}'
components:
  schemas:
    UniverseRequest:
      type: object
      description: Schema-2-only listing universe page.
      additionalProperties: false
      properties:
        coverage:
          type: string
          enum:
            - has_fundamentals
            - prices_only
            - discovery_only
          description: Optional mutually exclusive database-derived coverage marker.
        shape:
          type: string
          enum:
            - operating_company
            - bank
            - broker_dealer
            - insurer
            - reit
            - bdc
            - ifrs
            - ifrs_bank
            - ifrs_insurer
          description: Optional published filer-shape filter.
        offset:
          type: integer
          minimum: 0
          default: 0
        limit:
          type: integer
          minimum: 1
          maximum: 500
          default: 100
        schema:
          type: integer
          enum:
            - 2
          default: 2
          description: This new endpoint is schema-2 only.
    Schema2Envelope:
      type: object
      description: >-
        Schema-2 envelope. The OpenAPI schema is structural; captured examples
        are authoritative for full nested payload detail.
      additionalProperties: false
      required:
        - data
        - meta
      properties:
        subject:
          $ref: '#/components/schemas/Subject'
        data:
          type: object
          description: Tool payload or typed schema-2 refusal.
          additionalProperties: true
        meta:
          $ref: '#/components/schemas/MetaV2'
    Subject:
      type: object
      description: Resolved entity and security when the tool has a single subject.
      additionalProperties: false
      properties:
        entity:
          type: object
          description: Entity identity and reporting metadata.
          additionalProperties: true
        security:
          type: object
          description: Security identity and trading metadata.
          additionalProperties: true
    MetaV2:
      type: object
      description: >-
        Schema-2 metadata. Unknown optional fields are omitted, not emitted as
        null.
      additionalProperties: false
      required:
        - schema_version
      properties:
        schema_version:
          type: string
          enum:
            - '2'
        policy_version:
          type: string
        as_of:
          type: object
          additionalProperties: false
          properties:
            sec:
              type: string
              description: SEC ingestion cursor date.
            market:
              type: string
              description: Market-data cursor date.
        published_at:
          type: string
          format: date-time
        basis:
          type: string
        units:
          type: object
          additionalProperties:
            type: string
        parser:
          type: object
          additionalProperties: false
          properties:
            name:
              type: string
            version:
              type: string
        build:
          type: object
          additionalProperties:
            type: string
        last_verified_at:
          type: string
          format: date-time
        truncated:
          type: boolean
        deprecation:
          type: object
          description: Alias or sunset notices for schema-2 responses.
          additionalProperties: true
    FlatRefusal:
      type: object
      description: >-
        Flat refusal body used by auth, body-limit, schema-1 tool refusals, and
        some HTTP failures.
      additionalProperties: false
      required:
        - available
        - reason
      properties:
        available:
          type: boolean
          enum:
            - false
        reason:
          type: string
        recovery:
          type: object
          description: Recovery instruction. Omitted when no recovery exists.
          additionalProperties: true
    FastAPIValidationError:
      type: object
      description: Schema-1/no-schema request validation shape from FastAPI.
      additionalProperties: true
      required:
        - detail
      properties:
        detail:
          type: array
          items:
            type: object
            description: Validation issue.
            additionalProperties: true
    Schema2ValidationErrorEnvelope:
      type: object
      additionalProperties: false
      required:
        - data
        - meta
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/Schema2RefusalData'
          properties:
            unavailable:
              type: string
              enum:
                - invalid_request
        meta:
          $ref: '#/components/schemas/MetaV2'
    Schema2RefusalData:
      type: object
      description: Schema-2 typed refusal payload.
      additionalProperties: true
      required:
        - unavailable
      properties:
        unavailable:
          type: string
        recovery:
          type: object
          description: Executable recovery instruction when one exists.
          additionalProperties: true
        errors:
          type: array
          items:
            type: object
            description: Validation issue.
            additionalProperties: true
        missing_operand:
          type: string
        affects:
          type: array
          items:
            type: string
        note:
          type: string
  responses:
    NotModified:
      description: >-
        Schema-2 conditional request matched If-None-Match. The response has no
        body.
    Unauthorized:
      description: Missing, invalid, revoked, or unpaid API key. Flat refusal body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FlatRefusal'
          examples:
            missing_api_key:
              summary: Missing API key
              value:
                available: false
                reason: missing_api_key
    RequestTooLarge:
      description: >-
        Request body exceeded the 64 KiB cap or nesting guard. Flat refusal
        body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FlatRefusal'
          examples:
            request_too_large:
              summary: Request too large
              value:
                available: false
                reason: request_too_large
    ValidationError:
      description: >-
        Request validation failure. Schema 1/no-schema requests keep FastAPI
        detail; schema 2 uses invalid_request inside the schema-2 envelope.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/FastAPIValidationError'
              - $ref: '#/components/schemas/Schema2ValidationErrorEnvelope'
          examples:
            schema_1:
              summary: Schema 1 validation
              value:
                detail:
                  - loc:
                      - body
                      - symbol
                    msg: Field required
                    type: missing
            schema_2:
              summary: Schema 2 invalid_request
              value:
                data:
                  unavailable: invalid_request
                  recovery:
                    action: fix_request
                  errors:
                    - param: schema
                      given: true
                      expected: integer 1 or 2
                meta:
                  schema_version: '2'
    TooManyRequests:
      description: >-
        Per-minute rate limit or plan quota refusal. Retry-After is present only
        for the per-minute window.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/FlatRefusal'
              - $ref: '#/components/schemas/Schema2Envelope'
          examples:
            rate_limit_exceeded:
              summary: Rate limit
              value:
                available: false
                reason: rate_limit_exceeded
                recovery:
                  action: wait
                  seconds: 60
    InternalFailure:
      description: >-
        Internal service failure. Flat refusal body when surfaced by the API
        refusal layer.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FlatRefusal'
          examples:
            internal_error:
              summary: Internal failure
              value:
                available: false
                reason: internal_error
    ServiceUnavailable:
      description: Temporary dependency outage surfaced as a service_unavailable refusal.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FlatRefusal'
          examples:
            service_unavailable:
              summary: Service unavailable
              value:
                available: false
                reason: service_unavailable
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````