{
  "openapi": "3.0.1",
  "info": {
    "title": "CVM Fundos de Investimento — Brazilian Investment Funds API",
    "description": "Dados completos de fundos de investimento brasileiros (FI + FII + ETF) direto da CVM. Cadastro, informe diário, composição de carteira, ranking. Sem auth, dados sempre atualizados.",
    "version": "1.0",
    "x-build-id": "Dg1gBgvjHjp6swuuU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jenko_systems~cvm-fundos-investimento/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jenko_systems-cvm-fundos-investimento",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/jenko_systems~cvm-fundos-investimento/runs": {
      "post": {
        "operationId": "runs-sync-jenko_systems-cvm-fundos-investimento",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/jenko_systems~cvm-fundos-investimento/run-sync": {
      "post": {
        "operationId": "run-sync-jenko_systems-cvm-fundos-investimento",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Modo de execução",
            "enum": [
              "search_funds",
              "fund_daily",
              "fund_portfolio",
              "ranking",
              "manager_funds"
            ],
            "type": "string",
            "description": "Tipo de consulta: search_funds (busca cadastro), fund_daily (informe diário), fund_portfolio (composição de carteira), ranking (top fundos), manager_funds (fundos de um gestor)",
            "default": "search_funds"
          },
          "cnpj": {
            "title": "CNPJ do fundo",
            "type": "string",
            "description": "CNPJ do fundo. Aceita com ou sem formatação (12.345.678/0001-90 ou 12345678000190). Obrigatório para fund_daily e fund_portfolio."
          },
          "name_contains": {
            "title": "Nome contém",
            "type": "string",
            "description": "Filtra fundos cujo nome contém este texto (case insensitive). Exemplo: 'VERDE' retorna todos os fundos da Verde Asset."
          },
          "fund_type": {
            "title": "Tipo de fundo",
            "enum": [
              "ALL",
              "FI",
              "FII",
              "ETF"
            ],
            "type": "string",
            "description": "Filtra por tipo: FI (multimercado, RF, ações, etc), FII (imobiliários), ETF, ou ALL para todos",
            "default": "ALL"
          },
          "class_anbima": {
            "title": "Classe ANBIMA",
            "type": "string",
            "description": "Filtra por classificação ANBIMA do fundo (ex: 'Multimercado Macro', 'Renda Fixa Duration Livre Soberano')"
          },
          "situation": {
            "title": "Situação",
            "enum": [
              "ALL",
              "EM FUNCIONAMENTO NORMAL",
              "FASE PRE-OPERACIONAL",
              "CANCELADA",
              "EM LIQUIDACAO"
            ],
            "type": "string",
            "description": "Filtra por situação cadastral",
            "default": "EM FUNCIONAMENTO NORMAL"
          },
          "from_date": {
            "title": "Data inicial",
            "type": "string",
            "description": "Data inicial para informe diário (formato YYYY-MM-DD). Mínimo: 2020-01-01."
          },
          "to_date": {
            "title": "Data final",
            "type": "string",
            "description": "Data final para informe diário (formato YYYY-MM-DD). Padrão: hoje."
          },
          "month": {
            "title": "Mês de referência",
            "pattern": "^\\d{4}-\\d{2}$",
            "type": "string",
            "description": "Mês para composição de carteira (formato YYYY-MM). Padrão: último disponível."
          },
          "manager_cnpj": {
            "title": "CNPJ do gestor/administrador",
            "type": "string",
            "description": "CNPJ do gestor ou administrador. Obrigatório para mode=manager_funds."
          },
          "ranking_metric": {
            "title": "Métrica do ranking",
            "enum": [
              "patrimonio_liquido",
              "captacao_liquida",
              "rentabilidade",
              "n_cotistas"
            ],
            "type": "string",
            "description": "Métrica para ordenar o ranking",
            "default": "patrimonio_liquido"
          },
          "ranking_period": {
            "title": "Período do ranking",
            "type": "string",
            "description": "Período para o ranking (formato YYYY-MM_YYYY-MM). Exemplo: 2024-01_2024-12"
          },
          "limit": {
            "title": "Limite de records",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Máximo de records a retornar (proteção contra cobranças surpresa). Default: 10000, máximo: 100000.",
            "default": 10000
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}