Municípios vizinhos
ibge_vizinhosFind neighboring or nearby Brazilian municipalities by IBGE code or name; choose shared-boundary contiguity or a centroid radius, with optional population data.
Instructions
Finds nearby/neighboring municipalities.
Features:
Search by IBGE code (7 digits) or municipality name
Without raio: returns municipalities that actually touch the reference municipality in the official municipal mesh
With raio: returns municipalities whose centroids fall within the requested radius in km
Optionally includes population data
Examples:
By code: municipio="3550308"
By name: municipio="Campinas", uf="SP"
With population: municipio="3550308", incluir_dados=true
Contiguity is topological (shared boundary); radius mode is an approximation based on centroid distance. For listing/searching municipalities, use ibge_municipios.
Behavior: read-only and idempotent — uses the public IBGE Localidades and Malhas v3 APIs; population enrichment, when requested, uses SIDRA. Returns a Markdown list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uf | No | Estado por sigla (SP), nome (São Paulo) ou código IBGE (35) — obrigatório se usar nome do município | |
| raio | No | Raio em km para buscar municípios próximos, calculado pela distância entre centróides municipais | |
| municipio | Yes | Código IBGE do município (7 dígitos) ou nome do município | |
| incluir_dados | No | Incluir dados populacionais dos vizinhos |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| total | Yes | Quantidade de municípios encontrados | |
| vizinhos | Yes | Lista de municípios contíguos ou próximos, conforme o critério espacial solicitado | |
| municipio | Yes | Município de referência da consulta | |
| provenance | Yes | Bloco de proveniência (contrato v1.0): fonte, URL, período, extração e licença | |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |