Look up a Brazilian postal code (CEP) and get street, neighborhood, city, state, IBGE municipality code, DDD area code, IANA timezone, and lat/lng when available. Backed by a persistent cache resolved live against OpenCEP, BrasilAPI, and ViaCEP on first request.
curl "https://api.mcp-dados-br.dev/v1/cep/01310100" \ -H "X-API-Key: $KEY"
{
"cep": "01310100",
"logradouro": "Avenida Paulista",
"bairro": "Bela Vista",
"cidade": "São Paulo",
"uf": "SP",
"codigoIbge": "3550308",
"ddd": "11",
"timezone": "America/Sao_Paulo",
"latitude": -23.56,
"longitude": -46.66,
"cacheHit": true
}
| Code | HTTP | Meaning |
|---|---|---|
invalid_input | 400 | Not 8 digits. |
not_found | 404 | No upstream source could resolve the CEP. |
rate_limited | 429 | Anonymous per-IP daily cap reached. |
payment_required | 402 | Monthly API-key quota exhausted. |
OpenCEP (primary) + BrasilAPI CEP v2 (fallback/enrichment) + ViaCEP (DDD backfill) — all MIT-licensed, community-maintained aggregators built on Correios/IBGE open data.