DEV.co
Open-Source Databases · kelvins

municipios-brasileiros

A comprehensive dataset repository of 5,570 Brazilian municipalities with standardized geographic, administrative, and telecommunication metadata (IBGE codes, coordinates, area codes, time zones). Available in SQL, CSV, and JSON formats for direct use or database import.

Source: GitHub — github.com/kelvins/municipios-brasileiros
1.2k
GitHub stars
637
Forks
Python
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorykelvins/municipios-brasileiros
Ownerkelvins
Primary languagePython
LicenseMIT — OSI-approved
Stars1.2k
Forks637
Open issues10
Latest releaseUnknown
Last updated2025-12-10
Sourcehttps://github.com/kelvins/municipios-brasileiros

What municipios-brasileiros is

Python-based static data distribution project providing normalized municipality and state records with IBGE identifiers, lat/long coordinates, SIAFI codes, DDD area codes, and timezone mappings. Exports include SQL DDL+INSERT statements, CSV flat files, and JSON arrays with relational schema integrity.

Quickstart

Get the municipios-brasileiros source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/kelvins/municipios-brasileiros.gitcd municipios-brasileiros# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Geographic/Logistics Reference Data

Seed coordinates, timezone, and DDD lookups for delivery platforms, field service routing, or location-based mobile apps requiring accurate Brazilian municipality boundaries.

Government/Compliance Systems

Populate IBGE municipality codes for tax filing, census integration, or regulatory reporting requiring official municipal identifiers and state mappings.

Database Initialization

Quick bootstrap of location hierarchies (estado → município) for regional dashboards, CRM systems, or analytics pipelines without manual data curation.

Implementation considerations

  • Decide format (SQL/CSV/JSON) based on target system: SQL for relational stores, CSV for bulk ETL, JSON for REST/API backends.
  • Validate coordinate precision (FLOAT(8)) against your location-accuracy requirements; be aware of rounding implications for geocoding.
  • Handle timezone strings (e.g., 'America/Sao_Paulo') as IANA identifiers; confirm your ORM/database supports these standards.
  • Note that 'capital' field is boolean (0/1); clarify whether you need both state capitals and municipality capitals or just filtering logic.
  • Plan for periodic manual review: README encourages issue reporting for data inconsistencies; establish process to merge upstream corrections.

When to avoid it — and what to weigh

  • Real-time API Requirements — This is a static snapshot dataset. If you need live municipality boundary updates, jurisdiction changes, or current postal code expansions, consult the IBGE API service instead.
  • Historical Versioning Needed — No release tags, versioning, or changelog. Cannot reliably track data schema or record changes over time; unsuitable for audit trails or regulatory change tracking.
  • Autonomous Data Validation — README notes 'all or almost all' municipalities—precision of edge cases unknown. No data quality guarantees, checksums, or automated verification process documented.
  • High-Frequency Updates — Last push was December 2025, but no release cycle or SLA defined. For applications requiring weekly/monthly municipality metadata refreshes, establish separate sync mechanism.

License & commercial use

MIT License (permissive OSI-approved). Permits modification, commercial use, and redistribution under original license terms.

MIT license permits commercial use. However, dataset itself comes with no warranty or SLA. Validate data accuracy for mission-critical applications; consider establishing data stewardship review before embedding in revenue-critical services.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceModerate
DocumentationAdequate
License clarityClear
Deployment complexityLow
DEV.co fitGood
Assessment confidenceHigh
Security considerations

This is static reference data with no authentication, encryption, or access control mechanisms. Ensure imported data is accessible only to authorized system components. If publicly exposed via API, apply standard web security controls (rate limiting, HTTPS, auth). No sensitive PII in the dataset itself, but geographic data can infer infrastructure locations; sanitize if exposing via untrusted channels.

Alternatives to consider

IBGE Localidades API (https://servicodados.ibge.gov.br/api/docs/localidades)

Official, live government data source; guarantees freshness and accuracy for regulatory use but requires HTTP calls and rate-limit handling; slower than static imports.

Postal Code / GIS Databases (CEP/GEOBR packages for R/Python)

More granular (postal codes, census tracts) and maintainer-backed if using official R geobr package; better for fine-grained spatial analysis but larger dataset and heavier dependencies.

Commercial GIS Providers (e.g., Google Maps, HERE, Mapbox)

Real-time boundaries, reverse geocoding, and continuous updates; ideal for consumer-facing apps but introduces vendor lock-in and per-query costs.

Software development agency

Build on municipios-brasileiros with DEV.co software developers

Download the dataset, validate it against your use case, and contact us if you need help mapping it to your database schema or establishing a data refresh pipeline.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

municipios-brasileiros FAQ

Is this data official?
Dataset is derived from IBGE standards (Código IBGE, SIAFI, DDD are official identifiers), but this repo is a third-party compilation. Cross-check with IBGE API for regulatory compliance.
How often is it updated?
Unknown. Last commit December 2025, but no update schedule is documented. Monitor the repository or implement a verification process if you need monthly refreshes.
Can I use this in a commercial product?
MIT license permits commercial use. However, you assume responsibility for data accuracy and completeness; conduct due diligence for mission-critical applications.
Does it include all 5,570 municipalities?
README states 'all or almost all.' Exact completeness unknown. If you need 100% coverage verification, validate against official IBGE lists before deployment.

Work with a software development agency

Adopting municipios-brasileiros is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source databases software in production.

Ready to integrate Brazilian municipality data?

Download the dataset, validate it against your use case, and contact us if you need help mapping it to your database schema or establishing a data refresh pipeline.