> ## 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

# Agregado dados

> Official population or household count of a Brazilian municipality, state or the country (Census 2022: 4709/93 population, 4712/381 occupied households, 4712/382 residents in households; estimates: 6579/9324), IPCA (1737/63), PNAD unemployment (4099/4099), municipal GDP (5938/37), IPCA by group (7060/63 + classificacao 315) or any other table after agregado_metadados told you the ids. Resolve the municipality code first with localidades (e.g. São Bernardo do Campo = 3548708). Unknown agregado or variable ids are not_found; a level the table does not offer is invalid_input.

## Request contract

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

[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.agregado-dados",
  "method": "POST",
  "path": "/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-dados",
  "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": {
              "agregado": 1737,
              "periodos": "-3",
              "variaveis": [
                63
              ]
            }
          }
        },
        "schema": {
          "additionalProperties": true,
          "properties": {
            "agregado": {
              "description": "SIDRA table id, e.g. 4709 (Census 2022 population), 4712 (Census 2022 occupied households), 6579 (population estimates), 1737 (IPCA).\n\nProvider reference: minimum 1.",
              "type": "number"
            },
            "classificacao": {
              "description": "classificacao",
              "items": {
                "additionalProperties": true,
                "type": "object"
              },
              "type": "array",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "localidades": {
              "description": "Territorial selections; default N1 all (Brazil).",
              "items": {
                "additionalProperties": true,
                "type": "object"
              },
              "type": "array",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "periodos": {
              "default": "-6",
              "description": "`-N` (last N periods, default -6), `all`, one period (2024, 202408), a range (202401-202412) or a comma list (2020,2022). Pattern: ^(all|-[0-9]{1,3}|[0-9]{4,6}(-[0-9]{4,6})?(,[0-9]{4,6}(-[0-9]{4,6})?)*)$.\n\nProvider reference: default \"-6\".",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "variaveis": {
              "description": "Variable ids from agregado_metadados; joined with `|` upstream. Omit for `allxp` (every variable except percentages).",
              "items": {
                "type": "number"
              },
              "type": "array",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            }
          },
          "required": [
            "agregado"
          ],
          "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/agregado-dados
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/agregado-dados:
    post:
      tags:
        - IBGE service data API
      summary: Agregado dados
      description: >-
        Official population or household count of a Brazilian municipality,
        state or the country (Census 2022: 4709/93 population, 4712/381 occupied
        households, 4712/382 residents in households; estimates: 6579/9324),
        IPCA (1737/63), PNAD unemployment (4099/4099), municipal GDP (5938/37),
        IPCA by group (7060/63 + classificacao 315) or any other table after
        agregado_metadados told you the ids. Resolve the municipality code first
        with localidades (e.g. São Bernardo do Campo = 3548708). Unknown
        agregado or variable ids are not_found; a level the table does not offer
        is invalid_input.
      operationId: servicodados-ibge-gov-br.official-statistics.agregado-dados
      requestBody:
        content:
          application/json:
            examples:
              provider:
                summary: >-
                  Official provider example; checked against AIsa request
                  constraints
                value:
                  agregado: 1737
                  periodos: '-3'
                  variaveis:
                    - 63
            schema:
              additionalProperties: true
              properties:
                agregado:
                  description: >-
                    SIDRA table id, e.g. 4709 (Census 2022 population), 4712
                    (Census 2022 occupied households), 6579 (population
                    estimates), 1737 (IPCA).


                    Provider reference: minimum 1.
                  type: number
                classificacao:
                  description: classificacao
                  items:
                    additionalProperties: true
                    type: object
                  type: array
                  x-alexandria-option-metadata:
                    in: body
                localidades:
                  description: Territorial selections; default N1 all (Brazil).
                  items:
                    additionalProperties: true
                    type: object
                  type: array
                  x-alexandria-option-metadata:
                    in: body
                periodos:
                  default: '-6'
                  description: >-
                    `-N` (last N periods, default -6), `all`, one period (2024,
                    202408), a range (202401-202412) or a comma list
                    (2020,2022). Pattern:
                    ^(all|-[0-9]{1,3}|[0-9]{4,6}(-[0-9]{4,6})?(,[0-9]{4,6}(-[0-9]{4,6})?)*)$.


                    Provider reference: default "-6".
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                variaveis:
                  description: >-
                    Variable ids from agregado_metadados; joined with `|`
                    upstream. Omit for `allxp` (every variable except
                    percentages).
                  items:
                    type: number
                  type: array
                  x-alexandria-option-metadata:
                    in: body
              required:
                - agregado
              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:
                    agregado: 1737
                    observed_at_ms: 1790047010074
                    source_url: >-
                      https://servicodados.ibge.gov.br/api/v3/agregados/1737/periodos/-3/variaveis/63?localidades=N1[all]
                    value_count: 3
                    variaveis:
                      - id: '63'
                        resultados:
                          - classificacoes: []
                            series:
                              - localidade:
                                  id: '1'
                                  nivel:
                                    id: N1
                                    nome: Brasil
                                  nome: Brasil
                                serie:
                                  '202606': '0.16'
                                  '202607': '0.07'
                                  '202608': '-0.32'
                        unidade: '%'
                        variavel: IPCA - Variação mensal
              schema:
                not:
                  type: 'null'
                x-aisa-schema-completeness: documented-fields-only
          description: >-
            Query a SIDRA table
            (/api/v3/agregados/{agregado}/periodos/{periodos}/variaveis/{variaveis}?localidades=...&classificacao=...):
            one or more variables, a period selector (`-3` last three, `2024`,
            `202401-202412`, `2020,2022`, `all`), one or more territorial levels
            each with explicit ids or `all`, and optional
            classification/category filters. This is the official source for
            municipal population and household counts (market sizing,
            demographics): Census 2022 resident population is agregado 4709
            variavel 93, Census 2022 occupied private households (domicílios
            particulares permanentes ocupados) and their residents are agregado
            4712 variaveis 381 and 382 (5930 = residents per household), and the
            yearly population estimates are agregado 6579 variavel 9324; select
            a municipality with localidades [{nivel: N6, ids: [7-digit IBGE
            code]}], a state with N3. Values come back as the source publishes
            them (strings; `...`, `-`, `X` are SIDRA's not-available markers).


            The response contains the tool result directly.


            | Documented field | Provider type | Description |

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

            | `agregado` | number |  |

            | `observed_at_ms` | number | Unix epoch milliseconds when this
            program observed the response. |

            | `source_url` | string | The exact servicodados.ibge.gov.br request
            that produced this result. |

            | `value_count` | number | Number of (variable, classification,
            locality, period) cells returned. |

            | `variaveis` | object[] |  |



            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.