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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Cnae

> Decode a CNAE code from a company registry (7-digit subclasse 0111301, 5-digit classe 01113) or browse the hierarchy.

## Request contract

* **Method and path:** POST /apis/v1/servicodados-ibge-gov-br/official-statistics/cnae
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/cnae`

[Complete OpenAPI definition](https://aisa.one/docs/openapi/servicodados-ibge-gov-br.json)

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "servicodados-ibge-gov-br.official-statistics.cnae",
  "method": "POST",
  "path": "/apis/v1/servicodados-ibge-gov-br/official-statistics/cnae",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "examples": {
          "provider": {
            "summary": "Official provider example; checked against AIsa request constraints",
            "value": {
              "id": "0111301",
              "nivel": "subclasses"
            }
          }
        },
        "schema": {
          "additionalProperties": true,
          "properties": {
            "id": {
              "description": "Code at that level (A, 01, 011, 01113, 0111301). Omit to list. Pattern: ^[A-Za-z0-9]{1,7}$.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "nivel": {
              "description": "nivel\n\nProvider reference: allowed values [\"secoes\", \"divisoes\", \"grupos\", \"classes\", \"subclasses\"].",
              "type": "string"
            },
            "parent_id": {
              "description": "Pattern: ^[A-Za-z0-9]{1,7}$.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "parent_nivel": {
              "description": "List only the children of this parent level.\n\nProvider reference: allowed values [\"secoes\", \"divisoes\", \"grupos\", \"classes\"].",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body",
                "oneOf": [
                  "secoes",
                  "divisoes",
                  "grupos",
                  "classes"
                ]
              }
            }
          },
          "required": [
            "nivel"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

Usage-based pricing. Default request estimate: \$0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.


## OpenAPI

````yaml openapi/servicodados-ibge-gov-br.json POST /apis/v1/servicodados-ibge-gov-br/official-statistics/cnae
openapi: 3.1.0
info:
  description: ''
  title: IBGE service data API
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    servicodados-ibge-gov-br:
      description: ''
      title: IBGE service data API
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: 518fc4ef947cdae694909b6b92a592a19c91435c3047395d9357e9329503c138
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-dados
    - /apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados
    - /apis/v1/servicodados-ibge-gov-br/official-statistics/agregados
    - /apis/v1/servicodados-ibge-gov-br/official-statistics/calendario
    - /apis/v1/servicodados-ibge-gov-br/official-statistics/cnae
    - /apis/v1/servicodados-ibge-gov-br/official-statistics/localidade
    - /apis/v1/servicodados-ibge-gov-br/official-statistics/localidades
    - /apis/v1/servicodados-ibge-gov-br/official-statistics/malha
    - /apis/v1/servicodados-ibge-gov-br/official-statistics/nomes
    - /apis/v1/servicodados-ibge-gov-br/official-statistics/nomes-ranking
    - /apis/v1/servicodados-ibge-gov-br/official-statistics/noticias
    - /apis/v1/servicodados-ibge-gov-br/official-statistics/paises
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:384fbccd466b93a5e759ab66f0bb4bd9d7246110b99aeaf8b08945bfa155d106
    facts_hash: 518fc4ef947cdae694909b6b92a592a19c91435c3047395d9357e9329503c138
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: servicodados-ibge-gov-br
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/servicodados-ibge-gov-br/official-statistics/cnae:
    post:
      tags:
        - IBGE service data API
      summary: Cnae
      description: >-
        Decode a CNAE code from a company registry (7-digit subclasse 0111301,
        5-digit classe 01113) or browse the hierarchy.
      operationId: servicodados-ibge-gov-br.official-statistics.cnae
      requestBody:
        content:
          application/json:
            examples:
              provider:
                summary: >-
                  Official provider example; checked against AIsa request
                  constraints
                value:
                  id: '0111301'
                  nivel: subclasses
            schema:
              additionalProperties: true
              properties:
                id:
                  description: >-
                    Code at that level (A, 01, 011, 01113, 0111301). Omit to
                    list. Pattern: ^[A-Za-z0-9]{1,7}$.
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                nivel:
                  description: >-
                    nivel


                    Provider reference: allowed values ["secoes", "divisoes",
                    "grupos", "classes", "subclasses"].
                  type: string
                parent_id:
                  description: 'Pattern: ^[A-Za-z0-9]{1,7}$.'
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                parent_nivel:
                  description: >-
                    List only the children of this parent level.


                    Provider reference: allowed values ["secoes", "divisoes",
                    "grupos", "classes"].
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                    oneOf:
                      - secoes
                      - divisoes
                      - grupos
                      - classes
              required:
                - nivel
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                provider:
                  description: Published by the provider on 2026-09-22.
                  summary: Official provider example
                  value:
                    count: 1
                    items:
                      - atividades:
                          - >-
                            ARROZ QUANDO ATIVIDADE COMPLEMENTAR AO CULTIVO;
                            BENEFICIAMENTO DE
                          - ARROZ; CULTIVO DE
                          - >-
                            SEMENTE DE ARROZ (QUANDO REALIZADA JUNTAMENTE AO
                            CULTIVO); PRODUÇÃO DE
                        classe:
                          descricao: CULTIVO DE CEREAIS
                          grupo:
                            descricao: PRODUÇÃO DE LAVOURAS TEMPORÁRIAS
                            divisao:
                              descricao: AGRICULTURA, PECUÁRIA E SERVIÇOS RELACIONADOS
                              id: '01'
                              secao:
                                descricao: >-
                                  AGRICULTURA, PECUÁRIA, PRODUÇÃO FLORESTAL,
                                  PESCA E AQÜICULTURA
                                id: A
                            id: '011'
                          id: '01113'
                          observacoes:
                            - >-
                              Esta classe compreende - o cultivo de alpiste,
                              arroz, aveia, centeio, cevada, milho, milheto,
                              painço, sorgo, trigo, trigo preto, triticale e
                              outros cereais não especificados anteriormente
                            - "Esta classe compreende ainda - o beneficiamento de cereais em estabelecimento agrícola, quando atividade complementar ao cultivo\r\n- a produção de sementes de cereais, quando atividade complementar ao cultivo"
                            - "Esta classe NÃO compreende - a produção de sementes certificadas dos cereais desta classe, inclusive modificadas geneticamente (01.41-5)\r\n- os serviços de preparação de terreno, cultivo e colheita realizados sob contrato (01.61-0)\r\n- o beneficiamento de cereais em estabelecimento agrícola realizado sob contrato (01.63-6)\r\n- o processamento ou beneficiamento de cereais em estabelecimento não-agrícola (grupo 10.4) e (grupo 10.6)\r\n- a produção de biocombustível (19.32-2)"
                        descricao: CULTIVO DE ARROZ
                        id: '0111301'
                        observacoes:
                          - Esta subclasse compreende - o cultivo de arroz
                          - "Esta subclasse compreende ainda - o beneficiamento de arroz em estabelecimento agrícola, quando atividade complementar ao cultivo \r\n\r\n- a produção de sementes de arroz, quando atividade complementar ao cultivo"
                          - "Esta subclasse NÃO compreende - a produção de sementes certificadas de arroz, inclusive modificadas geneticamente (0141-5/01)\r\n- os serviços de preparação de terreno, cultivo e colheita realizados sob contrato (0161-0/03)\r\n- o beneficiamento de arroz realizado no estabelecimento agrícola sob contrato (0163-6/00)\r\n- a produção de óleo de arroz em bruto (1041-4/00)\r\n- o beneficiamento de arroz em estabelecimento não-agrícola (1061-9/01)"
                    nivel: subclasses
                    observed_at_ms: 1790047071321
                    source_url: >-
                      https://servicodados.ibge.gov.br/api/v2/cnae/subclasses/0111301
              schema:
                not:
                  type: 'null'
                x-aisa-schema-completeness: documented-fields-only
          description: >-
            CNAE 2.x economic-activity classification (/api/v2/cnae): list a
            level (secoes, divisoes, grupos, classes, subclasses), optionally
            under a parent (e.g. classes of divisao 01), or fetch one code with
            its full parent chain and notes.


            The response contains the tool result directly.


            The provider identifies `items` as the primary payload key.


            | Documented field | Provider type | Description |

            | --- | --- | --- |

            | `descricao` | string |  |

            | `id` | string |  |



            These are the provider's documented fields. Field requiredness,
            nullability and nested object structures are specified only where
            the descriptions explicitly say so.
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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