Agregado metadados
curl --request POST \
--url https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agregado": 1737
}
'import requests
url = "https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados"
payload = { "agregado": 1737 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({agregado: 1737})
};
fetch('https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agregado' => 1737
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados"
payload := strings.NewReader("{\n \"agregado\": 1737\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agregado\": 1737\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agregado\": 1737\n}"
response = http.request(request)
puts response.read_body{
"assunto": "Índices de preços",
"classificacoes": [],
"id": 1737,
"localidades": null,
"nivel_territorial": {
"administrativo": [
"N1"
],
"especial": [],
"ibge": []
},
"nome": "IPCA - Série histórica com número-índice, variação mensal e variações acumuladas em 3 meses, em 6 meses, no ano e em 12 meses (a partir de dezembro/1979)",
"observed_at_ms": 1790047002569,
"periodicidade": {
"fim": 202608,
"frequencia": "mensal",
"inicio": 197912
},
"periodos": null,
"pesquisa": "Índice Nacional de Preços ao Consumidor Amplo",
"source_url": "https://servicodados.ibge.gov.br/api/v3/agregados/1737/metadados",
"url": "https://sidra.ibge.gov.br/tabela/1737",
"variaveis": [
{
"id": 2266,
"nome": "IPCA - Número-índice (base: dezembro de 1993 = 100)",
"sumarizacao": [],
"unidade": "Número-índice"
},
{
"id": 63,
"nome": "IPCA - Variação mensal",
"sumarizacao": [],
"unidade": "%"
},
{
"id": 2263,
"nome": "IPCA - Variação acumulada em 3 meses",
"sumarizacao": [],
"unidade": "%"
},
{
"id": 2264,
"nome": "IPCA - Variação acumulada em 6 meses",
"sumarizacao": [],
"unidade": "%"
},
{
"id": 69,
"nome": "IPCA - Variação acumulada no ano",
"sumarizacao": [],
"unidade": "%"
},
{
"id": 2265,
"nome": "IPCA - Variação acumulada em 12 meses",
"sumarizacao": [],
"unidade": "%"
}
]
}IBGE service data API
Agregado metadados
Pick the variavel ids, classificacao/categoria ids, nivel and periods to pass to agregado_dados. Unknown table ids are not_found.
POST
https://api.aisa.one
/
apis
/
v1
/
servicodados-ibge-gov-br
/
official-statistics
/
agregado-metadados
Agregado metadados
curl --request POST \
--url https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agregado": 1737
}
'import requests
url = "https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados"
payload = { "agregado": 1737 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({agregado: 1737})
};
fetch('https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agregado' => 1737
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados"
payload := strings.NewReader("{\n \"agregado\": 1737\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agregado\": 1737\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agregado\": 1737\n}"
response = http.request(request)
puts response.read_body{
"assunto": "Índices de preços",
"classificacoes": [],
"id": 1737,
"localidades": null,
"nivel_territorial": {
"administrativo": [
"N1"
],
"especial": [],
"ibge": []
},
"nome": "IPCA - Série histórica com número-índice, variação mensal e variações acumuladas em 3 meses, em 6 meses, no ano e em 12 meses (a partir de dezembro/1979)",
"observed_at_ms": 1790047002569,
"periodicidade": {
"fim": 202608,
"frequencia": "mensal",
"inicio": 197912
},
"periodos": null,
"pesquisa": "Índice Nacional de Preços ao Consumidor Amplo",
"source_url": "https://servicodados.ibge.gov.br/api/v3/agregados/1737/metadados",
"url": "https://sidra.ibge.gov.br/tabela/1737",
"variaveis": [
{
"id": 2266,
"nome": "IPCA - Número-índice (base: dezembro de 1993 = 100)",
"sumarizacao": [],
"unidade": "Número-índice"
},
{
"id": 63,
"nome": "IPCA - Variação mensal",
"sumarizacao": [],
"unidade": "%"
},
{
"id": 2263,
"nome": "IPCA - Variação acumulada em 3 meses",
"sumarizacao": [],
"unidade": "%"
},
{
"id": 2264,
"nome": "IPCA - Variação acumulada em 6 meses",
"sumarizacao": [],
"unidade": "%"
},
{
"id": 69,
"nome": "IPCA - Variação acumulada no ano",
"sumarizacao": [],
"unidade": "%"
},
{
"id": 2265,
"nome": "IPCA - Variação acumulada em 12 meses",
"sumarizacao": [],
"unidade": "%"
}
]
}Request contract
- Method and path: POST /apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados
{
"operationId": "servicodados-ibge-gov-br.official-statistics.agregado-metadados",
"method": "POST",
"path": "/apis/v1/servicodados-ibge-gov-br/official-statistics/agregado-metadados",
"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
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"agregado": {
"description": "SIDRA table id, e.g. 1737 (IPCA), 4709 (Census 2022 population), 4712 (Census 2022 occupied households), 6579 (population estimates), 4099 (PNAD unemployment), 5938 (municipal GDP).\n\nProvider reference: minimum 1.",
"type": "number"
},
"include_periodos": {
"description": "Also fetch /periodos and return every period id (monthly tables have hundreds).",
"type": "boolean",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"localidades_nivel": {
"description": "Also fetch /localidades/{nivel} and return the localities the table offers at that level (N3 = 27 states; N6 = up to 5,570 municipalities). Pattern: ^N[0-9]{1,3}$.",
"type": "string",
"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.Authorizations
Body
application/json
Response
Metadata of one SIDRA table (/api/v3/agregados/{id}/metadados): name, survey, subject, periodicity with first/last period, territorial levels, variables (id, name, unit) and classifications with their categories; optionally the full list of period ids (/periodos) and the localities available at one level (/localidades/{nivel}).
The response contains the tool result directly.
| Documented field | Provider type | Description |
|---|---|---|
assunto | string | |
classificacoes | object[] | |
id | number | |
localidades | object[] | Localities at localidades_nivel when given; null otherwise. |
nivel_territorial | object | |
nome | string | |
observed_at_ms | number | Unix epoch milliseconds when this program observed the response. |
periodicidade | object | |
periodos | string[] | Period ids (YYYY, YYYYMM or YYYYQQ) when include_periodos is true; null otherwise. |
pesquisa | string | |
source_url | string | The exact servicodados.ibge.gov.br request that produced this result. |
url | string | |
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.