> ## Documentation Index
> Fetch the complete documentation index at: https://octo-98895abd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# v2 search

> <Warning>Preview, not deployed. The v2 gateway is built but not deployed yet; this call works once the owner deploys `silo-api`.</Warning>

What is this name or id? Companies, funds and listed shares, with their stable ids (CNPJ, ISIN).

Example: `/v2/search?q=petrobras`

Kinds:

- `any`: Resolve a name or id across companies, funds and tickers.
- `company`: The company rows (id_type cd_cvm) of the lookup answer; truncated still says when more than 20 entries matched.
- `fund`: Fund name or CNPJ search, largest latest NAV first. Refuses (over_limit) when more match than the SQL's tier ceiling: narrow q.
- `universe`: The research universe: one row per ticker+ISIN pair of listed shares and units.

`GET /v2/search?help` describes the main parameters, `?help=all` adds the hidden ones.



## OpenAPI

````yaml /api-docs/v2/openapi.json get /search
openapi: 3.1.0
info:
  title: SILO API v2 (preview, not deployed)
  version: v2
  description: >-
    The v2 gateway over SILO's schema `api`: 14 resources, five shared
    parameters, one envelope and one error object. Generated from
    supabase/functions/silo-api/registry.ts by scripts/gen_openapi_v2.py; do not
    edit by hand. Preview, not deployed. The v2 gateway is built but not
    deployed yet; this call works once the owner deploys `silo-api`.
servers:
  - url: https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2
    description: The silo-api Edge Function (preview, not deployed).
security:
  - apikey: []
  - apikey: []
    bearerAuth: []
paths:
  /search:
    get:
      summary: v2 search
      description: >-
        <Warning>Preview, not deployed. The v2 gateway is built but not deployed
        yet; this call works once the owner deploys `silo-api`.</Warning>


        What is this name or id? Companies, funds and listed shares, with their
        stable ids (CNPJ, ISIN).


        Example: `/v2/search?q=petrobras`


        Kinds:


        - `any`: Resolve a name or id across companies, funds and tickers.

        - `company`: The company rows (id_type cd_cvm) of the lookup answer;
        truncated still says when more than 20 entries matched.

        - `fund`: Fund name or CNPJ search, largest latest NAV first. Refuses
        (over_limit) when more match than the SQL's tier ceiling: narrow q.

        - `universe`: The research universe: one row per ticker+ISIN pair of
        listed shares and units.


        `GET /v2/search?help` describes the main parameters, `?help=all` adds
        the hidden ones.
      operationId: v2_search
      parameters:
        - name: q
          in: query
          required: false
          description: >-
            A ticker, ISIN, CNPJ, CVM code, or words of a company or fund name
            (every word must match, accents and case ignored). Default: empty:
            list the research universe (kind any or company) or every fund (kind
            fund, which refuses above its tier ceiling).
          schema:
            type: string
          example: petrobras
        - name: kind
          in: query
          required: false
          description: >-
            any: exact ids, then companies, then funds (at most 20 rows).
            company: the company rows of that answer. fund: fund search, largest
            latest NAV first. universe: every listed share and unit since
            2019-01-02. Default: any.
          schema:
            type: string
            enum:
              - any
              - company
              - fund
              - universe
            default: any
        - name: family
          in: query
          required: false
          description: 'Narrows kind=fund to one fund family. Default: all.'
          schema:
            type: string
            enum:
              - all
              - fi
              - fidc
              - fii
              - fip
              - fiagro
            default: all
        - name: limit
          in: query
          required: false
          description: >-
            The page size. More rows than one page come through next_page_url,
            never cut silently; a call stops at the tier's rows-per-call cap
            with meta.tier_cap_reached. Default: the tier's page maximum (10
            anonymous, 100 signed in); a larger value is coerced to it.
          schema:
            type: integer
            minimum: 1
        - name: cursor
          in: query
          required: false
          description: >-
            The opaque cursor from a previous next_page_url. It carries every
            other parameter: send it alone (another parameter with a different
            value is bad_request). Default: none: the first page.
          schema:
            type: string
        - name: as_of
          in: query
          required: false
          description: >-
            Hidden parameter (`?help=all` lists it). kind=universe (or an empty
            q): only the ticker+ISIN pairs whose first_observed <= as_of <=
            last_observed, dead names included. Survivorship-free. Default:
            none: every pair the tape has seen.
          schema:
            type: string
            format: date
      responses:
        '200':
          description: The v2 envelope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
        default:
          description: >-
            The v2 error object. A SILO refusal (over_limit) keeps its message,
            hint and details verbatim.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Envelope:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items: {}
          description: Always a list. Rows as the endpoint returned them; null stays null.
        meta:
          type: object
          required:
            - resource
            - kind
            - request
            - id_known
          properties:
            resource:
              type: string
            kind:
              type:
                - string
                - 'null'
            request:
              type: object
              description: Every parameter the resource takes, with the default applied.
            id_known:
              type:
                - boolean
                - 'null'
              description: Whether SILO holds the id; null when the call names none.
            endpoint:
              type: string
              description: The api.* endpoint that answered.
          additionalProperties: true
        next_page_url:
          type: string
          description: Present only when more rows remain. It carries one opaque cursor.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - target
            - innererror
          properties:
            code:
              type: string
              enum:
                - bad_request
                - unknown_parameter
                - unknown_id
                - unauthorized
                - forbidden_for_tier
                - over_limit
                - rate_limited
                - timeout
                - unavailable
                - internal
            message:
              type: string
            target:
              type:
                - string
                - 'null'
            innererror:
              type: object
              properties:
                sqlstate:
                  type:
                    - string
                    - 'null'
                hint:
                  type:
                    - string
                    - 'null'
                details:
                  type:
                    - string
                    - 'null'
  securitySchemes:
    apikey:
      type: apiKey
      in: header
      name: apikey
      description: >-
        The public publishable key. It identifies the project, not you, and is
        the anonymous tier.
      x-default: sb_publishable__yfFQsykAglrvc9GS6_PYw_B24ex437
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Optional. A user JWT from Supabase Auth, for the signed-in tier. Never a
        secret key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.