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

# IBGE

> Brazil's statistics office (IBGE) aggregate data, the API behind SIDRA: survey and census tables by period and place, with their metadata.

![](https://mintcdn.com/webrouter/Wx0iBZkUGX_VAFTN/logo/data-apis/_default.svg?fit=max\&auto=format\&n=Wx0iBZkUGX_VAFTN\&q=85\&s=951f11a0968af0d8747e234a1ec1f32c)

[Web Catalog · Finance](https://docs.webrouter.net/data-apis.md?category=finance)

No key needed

Endpoints

6

Auth

None

[Vendor docs](https://servicodados.ibge.gov.br/api/docs/agregados?versao=3)

## Notes

* Keyless and free.
* Documentation and labels are in Portuguese; agregado = SIDRA table, variavel = measure, classificacao = dimension, categoria = member, localidade = place.
* Geographic levels include N2 region, N3 state (UF), N6 municipality and N7 metropolitan region; BR is Brazil. An aggregate's metadata lists the levels it covers.
* Several IDs in one path or query value are joined with |.

## Endpoints

GET

List aggregates by survey

Every aggregate (SIDRA table), grouped by survey, optionally filtered by period, subject, classification, frequency or geographic level.

[Open](#ibge-aggregates-list)

GET

Get an aggregate's metadata

Name, survey, subject, frequency and range, geographic levels, variables and classifications with their categories.

[Open](#ibge-aggregates-metadata)

GET

List an aggregate's periods

Every period an aggregate has results for, with labels and last modification.

[Open](#ibge-aggregates-periods)

GET

List an aggregate's places

Places an aggregate has results for at one or more geographic levels.

[Open](#ibge-aggregates-places)

GET

Get variable values for chosen periods

Values of an aggregate's variables for given periods and places, per category combination.

[Open](#ibge-aggregates-values)

GET

Get variable values for the last six periods

Same as aggregates.values over the six latest periods.

[Open](#ibge-aggregates-latest-values)

### List aggregates by survey

GET

`/v3/agregados`

`ibge.aggregates.list`

Every aggregate (SIDRA table), grouped by survey, optionally filtered by period, subject, classification, frequency or geographic level.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`periodo`</td><td>string</td><td>query</td><td>Only aggregates with results for this period, frequency-prefixed, e.g. P5\[202001] (January 2020). Example `P5[202001]`</td></tr>
    <tr><td>`assunto`</td><td>integer</td><td>query</td><td>Subject ID, e.g. 70. Example `70`</td></tr>

    <tr>
      <td>
        `classificacao`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Classification ID, e.g. 12896.
      </td>
    </tr>

    <tr><td>`periodicidade`</td><td>string</td><td>query</td><td>Release frequency ID, e.g. P5 (monthly). Example `P5`</td></tr>
    <tr><td>`nivel`</td><td>string</td><td>query</td><td>Geographic level with results, e.g. N6 (municipalities). Example `N6`</td></tr>
  </tbody>
</table>

[Vendor docs](https://servicodados.ibge.gov.br/api/docs/agregados?versao=3) · Same job: [US Bureau of Labor Statistics](https://docs.webrouter.net/data-apis/bls.md#bls-surveys-list), [US Energy Information Administration](https://docs.webrouter.net/data-apis/eia.md#eia-routes-list), [World Bank Indicators API](https://docs.webrouter.net/data-apis/worldbank.md#worldbank-topics-list)

```python Python theme={null}
router.call_data_api("ibge.aggregates.list", {'periodo': 'P5[202001]', 'assunto': 70, 'periodicidade': 'P5', 'nivel': 'N6'})
```

```text MCP theme={null}
call_data_api(endpoint="ibge.aggregates.list", params={"periodo": "P5[202001]", "assunto": 70, "periodicidade": "P5", "nivel": "N6"})
```

> [!NOTE]
>
> * Identifiers for subjects, frequencies, periods and levels are listed in the docs' identifier base.

### Get an aggregate's metadata

GET

`/v3/agregados/{agregado}/metadados`

`ibge.aggregates.metadata`

Name, survey, subject, frequency and range, geographic levels, variables and classifications with their categories.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`agregado` required</td><td>integer</td><td>path</td><td>Aggregate (SIDRA table) ID, e.g. 1705 or 1712; each SIDRA table is one aggregate. Example `1712`</td></tr>
  </tbody>
</table>

[Vendor docs](https://servicodados.ibge.gov.br/api/docs/agregados?versao=3) · Same job: [World Bank Indicators API](https://docs.webrouter.net/data-apis/worldbank.md#worldbank-indicator-get)

```python Python theme={null}
router.call_data_api("ibge.aggregates.metadata", {'agregado': 1712})
```

```text MCP theme={null}
call_data_api(endpoint="ibge.aggregates.metadata", params={"agregado": 1712})
```

> [!NOTE]
>
> * Read this first: it gives the variable, classification and level IDs the data calls take.

### List an aggregate's periods

GET

`/v3/agregados/{agregado}/periodos`

`ibge.aggregates.periods`

Every period an aggregate has results for, with labels and last modification.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`agregado` required</td><td>integer</td><td>path</td><td>Aggregate (SIDRA table) ID, e.g. 1705 or 1712; each SIDRA table is one aggregate. Example `1712`</td></tr>
  </tbody>
</table>

[Vendor docs](https://servicodados.ibge.gov.br/api/docs/agregados?versao=3) · Same job: [World Bank Indicators API](https://docs.webrouter.net/data-apis/worldbank.md#worldbank-indicator-get)

```python Python theme={null}
router.call_data_api("ibge.aggregates.periods", {'agregado': 1712})
```

```text MCP theme={null}
call_data_api(endpoint="ibge.aggregates.periods", params={"agregado": 1712})
```

### List an aggregate's places

GET

`/v3/agregados/{agregado}/localidades/{nivel}`

`ibge.aggregates.places`

Places an aggregate has results for at one or more geographic levels.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`agregado` required</td><td>integer</td><td>path</td><td>Aggregate (SIDRA table) ID, e.g. 1705 or 1712; each SIDRA table is one aggregate. Example `1712`</td></tr>
    <tr><td>`nivel` required</td><td>string</td><td>path</td><td>Levels joined by |, e.g. N7|N6 (metropolitan regions and municipalities); the aggregate's metadata lists its levels. Example `N3`</td></tr>
  </tbody>
</table>

[Vendor docs](https://servicodados.ibge.gov.br/api/docs/agregados?versao=3) · Same job: [Aviato](https://docs.webrouter.net/data-apis/aviato.md#aviato-geocoder-search), [CNPJá](https://docs.webrouter.net/data-apis/cnpja.md#cnpja-zip-get), [CompanyEnrich](https://docs.webrouter.net/data-apis/companyenrich.md#companyenrich-geo-regions), [Duffel](https://docs.webrouter.net/data-apis/duffel.md#duffel-places-suggestions), [Forager](https://docs.webrouter.net/data-apis/forager.md#forager-reference-locations), [Mangools](https://docs.webrouter.net/data-apis/mangools.md#mangools-locations-search)

```python Python theme={null}
router.call_data_api("ibge.aggregates.places", {'agregado': 1712, 'nivel': 'N3'})
```

```text MCP theme={null}
call_data_api(endpoint="ibge.aggregates.places", params={"agregado": 1712, "nivel": "N3"})
```

### Get variable values for chosen periods

GET

`/v3/agregados/{agregado}/periodos/{periodos}/variaveis/{variavel}`

`ibge.aggregates.values`

Values of an aggregate's variables for given periods and places, per category combination.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`agregado` required</td><td>integer</td><td>path</td><td>Aggregate (SIDRA table) ID, e.g. 1705 or 1712; each SIDRA table is one aggregate. Example `1712`</td></tr>
    <tr><td>`periodos` required</td><td>string</td><td>path</td><td>Periods joined by |, ranges as START-END (201701-201706), or a negative number for the latest n (-6); a negative value cannot be mixed with others. Example `-6`</td></tr>
    <tr><td>`variavel` required</td><td>string</td><td>path</td><td>Variable IDs joined by |, e.g. 214|1982; allxp for every variable of the aggregate, all to add the API's computed percentage variables. Example `214|1982`</td></tr>
    <tr><td>`localidades` required</td><td>string</td><td>query</td><td>Places, separated by |: BR for Brazil, or N\<level>\[ids], e.g. N3\[33,35] (states RJ and SP), N6\[5208707] (a municipality), N7 (every metropolitan region). Levels nest: N6\[N3\[33,35]] is every municipality in RJ and SP. Example `BR`</td></tr>
    <tr><td>`classificacao`</td><td>string</td><td>query</td><td>Restrict categories as \<classification>\[\<categories>], several joined by |, e.g. 226\[4844]|218\[4780]; \[all] for every category. Unset: only the Total category (0). Example `226[4844]`</td></tr>
    <tr><td>`view`</td><td>string</td><td>query</td><td>OLAP for OLAP notation, or flat: first array item is metadata, rows follow. One of `OLAP`, `flat`</td></tr>
  </tbody>
</table>

[Vendor docs](https://servicodados.ibge.gov.br/api/docs/agregados?versao=3) · Same job: [US Bureau of Labor Statistics](https://docs.webrouter.net/data-apis/bls.md#bls-series-get), [US Energy Information Administration](https://docs.webrouter.net/data-apis/eia.md#eia-data-get), [World Bank Indicators API](https://docs.webrouter.net/data-apis/worldbank.md#worldbank-indicator-data)

```python Python theme={null}
router.call_data_api("ibge.aggregates.values", {'agregado': 1712, 'periodos': '-6', 'variavel': '214|1982', 'localidades': 'BR', 'classificacao': '226[4844]'})
```

```text MCP theme={null}
call_data_api(endpoint="ibge.aggregates.values", params={"agregado": 1712, "periodos": "-6", "variavel": "214|1982", "localidades": "BR", "classificacao": "226[4844]"})
```

> [!NOTE]
>
> * At most 100,000 values per call (categories x periods x places); over it answers 500.
> * Special values: '-' zero not from rounding, '..' not applicable, '...' not available, 'X' withheld for confidentiality.

### Get variable values for the last six periods

GET

`/v3/agregados/{agregado}/variaveis/{variavel}`

`ibge.aggregates.latest_values`

Same as aggregates.values over the six latest periods.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`agregado` required</td><td>integer</td><td>path</td><td>Aggregate (SIDRA table) ID, e.g. 1705 or 1712; each SIDRA table is one aggregate. Example `1712`</td></tr>
    <tr><td>`variavel` required</td><td>string</td><td>path</td><td>Variable IDs joined by |, e.g. 214|1982; allxp for every variable of the aggregate, all to add the API's computed percentage variables. Example `214|1982`</td></tr>
    <tr><td>`localidades` required</td><td>string</td><td>query</td><td>Places, separated by |: BR for Brazil, or N\<level>\[ids], e.g. N3\[33,35] (states RJ and SP), N6\[5208707] (a municipality), N7 (every metropolitan region). Levels nest: N6\[N3\[33,35]] is every municipality in RJ and SP. Example `BR`</td></tr>
    <tr><td>`classificacao`</td><td>string</td><td>query</td><td>Restrict categories as \<classification>\[\<categories>], several joined by |, e.g. 226\[4844]|218\[4780]; \[all] for every category. Unset: only the Total category (0). Example `226[4844]`</td></tr>
    <tr><td>`view`</td><td>string</td><td>query</td><td>OLAP for OLAP notation, or flat: first array item is metadata, rows follow. One of `OLAP`, `flat`</td></tr>
  </tbody>
</table>

[Vendor docs](https://servicodados.ibge.gov.br/api/docs/agregados?versao=3) · Same job: [US Bureau of Labor Statistics](https://docs.webrouter.net/data-apis/bls.md#bls-series-get), [US Energy Information Administration](https://docs.webrouter.net/data-apis/eia.md#eia-data-get), [World Bank Indicators API](https://docs.webrouter.net/data-apis/worldbank.md#worldbank-indicator-data)

```python Python theme={null}
router.call_data_api("ibge.aggregates.latest_values", {'agregado': 1712, 'variavel': '214|1982', 'localidades': 'BR', 'classificacao': '226[4844]'})
```

```text MCP theme={null}
call_data_api(endpoint="ibge.aggregates.latest_values", params={"agregado": 1712, "variavel": "214|1982", "localidades": "BR", "classificacao": "226[4844]"})
```

> [!NOTE]
>
> * At most 100,000 values per call (categories x 6 periods x places); over it answers 500.


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