curl --request POST \
--url https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregados \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assunto": 148,
"limit": 5,
"query": "tarifa minima"
}
'import requests
url = "https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregados"
payload = {
"assunto": 148,
"limit": 5,
"query": "tarifa minima"
}
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({assunto: 148, limit: 5, query: 'tarifa minima'})
};
fetch('https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregados', 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/agregados",
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([
'assunto' => 148,
'limit' => 5,
'query' => 'tarifa minima'
]),
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/agregados"
payload := strings.NewReader("{\n \"assunto\": 148,\n \"limit\": 5,\n \"query\": \"tarifa minima\"\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/agregados")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assunto\": 148,\n \"limit\": 5,\n \"query\": \"tarifa minima\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregados")
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 \"assunto\": 148,\n \"limit\": 5,\n \"query\": \"tarifa minima\"\n}"
response = http.request(request)
puts response.read_bodyAgregados
Find the agregado id (and then, with agregado_metadados, the variable and classification ids) before calling agregado_dados. Pass a query or at least one filter: the unfiltered catalog has ~8,000 tables. Rows carry only id and name (no period), and a query like domicilios with nivel N6 matches hundreds of Census tables ordered by id, so for the headline municipal population / household counts skip the search and call agregado_dados directly with 4709 (Census 2022 population), 4712 (Census 2022 occupied households and residents) or 6579 (yearly population estimates).
curl --request POST \
--url https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregados \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assunto": 148,
"limit": 5,
"query": "tarifa minima"
}
'import requests
url = "https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregados"
payload = {
"assunto": 148,
"limit": 5,
"query": "tarifa minima"
}
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({assunto: 148, limit: 5, query: 'tarifa minima'})
};
fetch('https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregados', 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/agregados",
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([
'assunto' => 148,
'limit' => 5,
'query' => 'tarifa minima'
]),
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/agregados"
payload := strings.NewReader("{\n \"assunto\": 148,\n \"limit\": 5,\n \"query\": \"tarifa minima\"\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/agregados")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assunto\": 148,\n \"limit\": 5,\n \"query\": \"tarifa minima\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregados")
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 \"assunto\": 148,\n \"limit\": 5,\n \"query\": \"tarifa minima\"\n}"
response = http.request(request)
puts response.read_bodyRequest contract
- Method and path: POST /apis/v1/servicodados-ibge-gov-br/official-statistics/agregados
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/agregados
{
"operationId": "servicodados-ibge-gov-br.official-statistics.agregados",
"method": "POST",
"path": "/apis/v1/servicodados-ibge-gov-br/official-statistics/agregados",
"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": {
"assunto": 148,
"limit": 5,
"query": "tarifa minima"
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"assunto": {
"description": "Subject id (e.g. 148). See the agregados docs for the list.\n\nProvider reference: minimum 1.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"min": 1
}
},
"classificacao": {
"description": "Classification id the table must carry.\n\nProvider reference: minimum 1.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"min": 1
}
},
"limit": {
"default": 50,
"description": "Rows per page (default 50).\n\nProvider reference: minimum 1; maximum 500; default 50.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 500,
"min": 1
}
},
"nivel": {
"description": "Territorial level the table must offer: N1 Brazil, N2 macro-region, N3 UF, N6 municipality... Pattern: ^N[0-9]{1,3}$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"offset": {
"description": "next_offset from the previous page.\n\nProvider reference: minimum 0.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"min": 0
}
},
"periodicidade": {
"description": "Periodicity code: P1 annual, P5 monthly, P8 quarterly, P13 census... Pattern: ^P[0-9]{1,2}$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"periodo": {
"description": "Period the table must cover (e.g. 2024 or 202401). Pattern: ^[0-9]{4,6}$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"query": {
"description": "Substring matched (case- and accent-insensitive) against the table name or the survey name, e.g. `ipca`, `populacao residente estimada`.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
}
},
"type": "object"
}
}
},
"required": false
},
"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
Response
Discover SIDRA tables (agregados) from the /api/v3/agregados catalog: filter server-side by assunto, periodicidade (P1 P5 P8 ...), nivel (N1 N3 N6 ...), periodo and classificacao, and client-side by a case/accent-insensitive text query over the table name and survey name. Returns flat rows {id, nome, pesquisa_id, pesquisa_nome} sliced with limit / offset.
The response contains the tool result directly.
The provider identifies items as the primary payload key.
| Documented field | Provider type | Description |
|---|---|---|
id | string | Agregado (SIDRA table) id. |
nome | string | |
pesquisa_id | string | Survey code, e.g. IP for IPCA. |
pesquisa_nome | string | |
url | string | sidra.ibge.gov.br table page. |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.