IBGE API

Free to Use
73 B
Measured Score 0 50 100 Speed 12/30 Consistency 20/20 Security 18/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

IBGE API provides official geographic and statistical data from Brazil's national statistics institute, including state and municipality listings, population data, and regional boundaries. It is completely free and requires no authentication. It is ideal for applications targeting Brazilian geography or government data.

Beginner Tip

The API documentation and response data are primarily in Portuguese. Start with the /localidades endpoints to list Brazilian states and municipalities, which are the most beginner-friendly resources.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://servicodados.ibge.gov.br/api/v1/localidades/estados
Result
HTTP 200 · application/json · 2,446 bytes · compressed
Response time
301 ms (median of 3) · fastest 299 ms
Transport
TLSv1.2 · ECDHE-RSA-AES128-GCM-SHA256 · certificate issued by Sectigo Limited
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
id integer 11
sigla string RO
nome string Rondônia
regiao object {3 fields}

Captured Response

Captured from a real request to https://servicodados.ibge.gov.br/api/v1/localidades/estados on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
[
  {
    "id": 11,
    "sigla": "RO",
    "nome": "Rondônia",
    "regiao": {
      "id": 1,
      "sigla": "N",
      "nome": "Norte"
    }
  }
]

Field Reference

id IBGE numeric code uniquely identifying the state or municipality.
nome Name of the state or municipality in Portuguese.
sigla Two-letter abbreviation for the state, e.g. SP for Sao Paulo.
regiao Region object containing the id, nome, and sigla of the broader region.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://servicodados.ibge.gov.br/api/v1/localidades/estados";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

404 Not Found Incorrect endpoint path or unsupported resource identifier.
Refer to the official docs at https://servicodados.ibge.gov.br/api/docs/ and check available routes and ID formats.
Empty array response The requested resource (e.g. a municipality code) does not exist.
Validate that the IBGE code you are using is correct — municipality codes are 7 digits and state codes are 2 digits.
Slow response Some aggregate endpoints return large datasets.
Filter results by specifying state or region in the URL path to reduce response size.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 12/30
Consistency 20/20
Security 18/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 301ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Geocoding
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →