curl --request POST \
--url https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/localidades \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nivel": "regioes"
}
'import requests
url = "https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/localidades"
payload = { "nivel": "regioes" }
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({nivel: 'regioes'})
};
fetch('https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/localidades', 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/localidades",
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([
'nivel' => 'regioes'
]),
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/localidades"
payload := strings.NewReader("{\n \"nivel\": \"regioes\"\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/localidades")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nivel\": \"regioes\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/localidades")
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 \"nivel\": \"regioes\"\n}"
response = http.request(request)
puts response.read_bodyLocalidades
Resolve IBGE codes before querying agregados (N3 = estado id, N6 = municipio id), enumerate the municipalities of a state, or find a municipality by (partial, accent-insensitive) name. municipios, distritos and subdistritos require a parent so one call never fetches the 5,570-row national list.
curl --request POST \
--url https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/localidades \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nivel": "regioes"
}
'import requests
url = "https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/localidades"
payload = { "nivel": "regioes" }
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({nivel: 'regioes'})
};
fetch('https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/localidades', 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/localidades",
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([
'nivel' => 'regioes'
]),
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/localidades"
payload := strings.NewReader("{\n \"nivel\": \"regioes\"\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/localidades")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nivel\": \"regioes\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/localidades")
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 \"nivel\": \"regioes\"\n}"
response = http.request(request)
puts response.read_bodyRequest contract
- Method and path: POST /apis/v1/servicodados-ibge-gov-br/official-statistics/localidades
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/servicodados-ibge-gov-br/official-statistics/localidades
{
"operationId": "servicodados-ibge-gov-br.official-statistics.localidades",
"method": "POST",
"path": "/apis/v1/servicodados-ibge-gov-br/official-statistics/localidades",
"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": {
"nivel": "regioes"
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"limit": {
"default": 100,
"description": "Items per page (default 100).\n\nProvider reference: minimum 1; maximum 1000; default 100.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 1000,
"min": 1
}
},
"nivel": {
"description": "Level to list.\n\nProvider reference: allowed values [\"regioes\", \"estados\", \"mesorregioes\", \"microrregioes\", \"regioes-intermediarias\", \"regioes-imediatas\", \"regioes-metropolitanas\", \"municipios\", \"distritos\", \"subdistritos\"].",
"type": "string"
},
"offset": {
"description": "next_offset from the previous page of the same query.\n\nProvider reference: minimum 0.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"min": 0
}
},
"parent_id": {
"description": "Parent id: numeric IBGE code or, for estados, the two-letter sigla (35 or SP). Pattern: ^[A-Za-z0-9]{1,9}$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"parent_nivel": {
"description": "Level of the bounding parent (estados for municipios of a state, municipios for its distritos, regioes for its estados, ...).\n\nProvider reference: allowed values [\"regioes\", \"estados\", \"mesorregioes\", \"microrregioes\", \"regioes-intermediarias\", \"regioes-imediatas\", \"municipios\", \"distritos\"].",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body",
"oneOf": [
"regioes",
"estados",
"mesorregioes",
"microrregioes",
"regioes-intermediarias",
"regioes-imediatas",
"municipios",
"distritos"
]
}
},
"query": {
"description": "Case- and accent-insensitive substring of `nome` applied client-side (e.g. `sao paulo`, `campinas`).",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
}
},
"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.Authorizations
Body
Level of the bounding parent (estados for municipios of a state, municipios for its distritos, regioes for its estados, ...).
Provider reference: allowed values ["regioes", "estados", "mesorregioes", "microrregioes", "regioes-intermediarias", "regioes-imediatas", "municipios", "distritos"].
Response
List Brazilian localities of one level (regioes, estados, mesorregioes, microrregioes, regioes-intermediarias, regioes-imediatas, regioes-metropolitanas, municipios, distritos, subdistritos) from /api/v1/localidades, optionally bounded to a parent locality (e.g. municipios of estado 35 / SP, distritos of municipio 3550308) and filtered by name. Ordered by name; sliced client-side 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 | number | IBGE code of the locality. |
nome | string | |
sigla | string |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.