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

# Buscar FCI

> Buscar fondos por campo elegido con matching insensible a mayúsculas y acentos (exact > prefix > contains > fuzzy).

<Note>
  Busca fondos por texto sobre un campo elegido, con matching insensible a mayúsculas y acentos y puntaje por tipo de coincidencia (exacta > prefijo > prefijo de token > contiene > fuzzy). Requiere el scope `fci:read`.
</Note>

## Parámetros de consulta

<ParamField query="query" type="string" required>
  Texto de búsqueda (insensible a mayúsculas y acentos).
</ParamField>

<ParamField query="field" type="string" default="fund_name">
  Campo contra el que se busca.
</ParamField>

<Info>
  Valores válidos para <code>field</code>:

  * <code>fund\_name</code>
  * <code>manager\_name</code>
  * <code>depositary\_name</code>
  * <code>rent\_type</code>
  * <code>horizon</code>
</Info>

<ParamField query="limit" type="integer" default="20">
  Máximo de resultados por página (1-100).
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Desplazamiento de paginación.
</ParamField>

## Ejemplo de Solicitud

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.doctacapital.com.ar/api/v1/fci/instruments/search?query=premier&field=fund_name&limit=3" \
    -H "Authorization: Bearer $DOCTA_TOKEN"
  ```
</RequestExample>

## Respuesta Exitosa

<ResponseField name="query" type="string">
  Texto de búsqueda utilizado.
</ResponseField>

<ResponseField name="field" type="string">
  Campo contra el que se buscó.
</ResponseField>

<ResponseField name="total_matches" type="integer">
  Cantidad total de coincidencias.
</ResponseField>

<ResponseField name="limit" type="integer">
  Límite aplicado.
</ResponseField>

<ResponseField name="offset" type="integer">
  Desplazamiento aplicado.
</ResponseField>

<ResponseField name="no_matches" type="boolean">
  Indica si la búsqueda no arrojó resultados.
</ResponseField>

<ResponseField name="results" type="array">
  Lista de fondos encontrados, ordenados por puntaje.
</ResponseField>

<ResponseField name="results[].fund_name" type="string">
  Nombre del fondo.
</ResponseField>

<ResponseField name="results[].manager_name" type="string">
  Sociedad gerente.
</ResponseField>

<ResponseField name="results[].depositary_name" type="string">
  Sociedad depositaria.
</ResponseField>

<ResponseField name="results[].currency" type="string">
  Moneda del fondo.
</ResponseField>

<ResponseField name="results[].rent_type" type="string">
  Tipo de renta / categoría.
</ResponseField>

<ResponseField name="results[].class_type" type="string">
  Clase de cuotaparte.
</ResponseField>

<ResponseField name="results[].fund_type" type="string">
  Tipo de fondo (Abierto / Cerrado).
</ResponseField>

<ResponseField name="results[].horizon" type="string">
  Horizonte de inversión.
</ResponseField>

<ResponseField name="results[].matched_value" type="string">
  Valor del campo que produjo la coincidencia.
</ResponseField>

<ResponseField name="results[].score" type="integer">
  Puntaje de la coincidencia (mayor es mejor).
</ResponseField>

## Ejemplo de Respuesta Exitosa

<ResponseExample>
  ```json Success theme={null}
  {
    "query": "premier",
    "field": "fund_name",
    "total_matches": 74,
    "limit": 3,
    "offset": 0,
    "no_matches": false,
    "results": [
      {
        "fund_name": "Premier Abierto Pymes - Clase A",
        "manager_name": "Supervielle Asset Management S.A.",
        "depositary_name": "Banco Supervielle S.A.",
        "currency": "ARS",
        "rent_type": "PyMes",
        "class_type": "Mayorista",
        "fund_type": "Abierto",
        "horizon": "Mediano Plazo",
        "matched_value": "Premier Abierto Pymes - Clase A",
        "score": 4
      },
      {
        "fund_name": "Premier Abierto Pymes - Clase B",
        "manager_name": "Supervielle Asset Management S.A.",
        "depositary_name": "Banco Supervielle S.A.",
        "currency": "ARS",
        "rent_type": "PyMes",
        "class_type": "Minorista",
        "fund_type": "Abierto",
        "horizon": "Mediano Plazo",
        "matched_value": "Premier Abierto Pymes - Clase B",
        "score": 4
      },
      {
        "fund_name": "Premier Abierto Pymes - Clase C",
        "manager_name": "Supervielle Asset Management S.A.",
        "depositary_name": "Banco Supervielle S.A.",
        "currency": "ARS",
        "rent_type": "PyMes",
        "class_type": "No Registrada",
        "fund_type": "Abierto",
        "horizon": "Mediano Plazo",
        "matched_value": "Premier Abierto Pymes - Clase C",
        "score": 4
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /api/v1/fci/instruments/search
openapi: 3.1.0
info:
  title: API de Docta
  description: >-
    API de mercado argentino: bonos (instrumentos, cashflows, curvas/yields) y
    FCI (screener, series, performance, comparaciones y analytics de industria).
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.doctacapital.com.ar
security: []
paths:
  /api/v1/fci/instruments/search:
    get:
      tags:
        - FCI
      description: >-
        Buscar fondos por campo elegido con matching insensible a mayúsculas y
        acentos (exact > prefix > contains > fuzzy).
      parameters:
        - name: query
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            description: Search query (accent/case-insensitive)
        - name: field
          in: query
          required: false
          schema:
            enum:
              - fund_name
              - manager_name
              - depositary_name
              - rent_type
              - horizon
            type: string
            description: Field to match against
            default: fund_name
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Max results per page
            default: 20
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Pagination offset
            default: 0
      responses:
        '200':
          description: Resultados de búsqueda
          content:
            application/json:
              schema:
                type: object
              example:
                query: premier
                field: fund_name
                total_matches: 74
                limit: 3
                offset: 0
                no_matches: false
                results:
                  - fund_name: Premier Abierto Pymes - Clase A
                    manager_name: Supervielle Asset Management S.A.
                    depositary_name: Banco Supervielle S.A.
                    currency: ARS
                    rent_type: PyMes
                    class_type: Mayorista
                    fund_type: Abierto
                    horizon: Mediano Plazo
                    matched_value: Premier Abierto Pymes - Clase A
                    score: 4
                  - fund_name: Premier Abierto Pymes - Clase B
                    manager_name: Supervielle Asset Management S.A.
                    depositary_name: Banco Supervielle S.A.
                    currency: ARS
                    rent_type: PyMes
                    class_type: Minorista
                    fund_type: Abierto
                    horizon: Mediano Plazo
                    matched_value: Premier Abierto Pymes - Clase B
                    score: 4
                  - fund_name: Premier Abierto Pymes - Clase C
                    manager_name: Supervielle Asset Management S.A.
                    depositary_name: Banco Supervielle S.A.
                    currency: ARS
                    rent_type: PyMes
                    class_type: No Registrada
                    fund_type: Abierto
                    horizon: Mediano Plazo
                    matched_value: Premier Abierto Pymes - Clase C
                    score: 4
        '401':
          description: Autenticación requerida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'Permisos insuficientes: requiere el scope fci:read'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Parámetros inválidos
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      required:
        - type
        - title
        - status
        - detail
        - correlation_id
      type: object
      properties:
        type:
          description: El identificador del tipo de error
          type: string
          example: /errors/authentication-required
        title:
          description: Una breve descripción del error
          type: string
          example: Invalid client credentials
        status:
          description: El código de estado HTTP
          type: integer
          example: 401
        detail:
          description: Una descripción detallada del error
          type: string
          example: Invalid client credentials
        correlation_id:
          description: Un identificador único para rastrear esta solicitud de error
          type: string
          format: uuid
          example: 2eb07802-94de-468a-b70f-75a49f3e9516
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````