{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreicnkmugicg7ktr7jc2nfdk4l4fsyel54ous5ull3sce2p5fc7idfm",
"uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3mols4qhrbaj2"
},
"coverImage": {
"$type": "blob",
"ref": {
"$link": "bafkreicf2pxkih7rkodg3pzzfd7rwx35zj5tqwobnpmgqv5wmiqlatx3p4"
},
"mimeType": "image/webp",
"size": 85304
},
"path": "/daniel_freitas_6b99d8e91b/i-built-cepify-a-free-brazilian-postal-code-cep-api-viacep-compatible-spring-boot-4-java-25-5hl9",
"publishedAt": "2026-06-18T20:56:39.000Z",
"site": "https://dev.to",
"tags": [
"api",
"java",
"showdev",
"springboot",
"ViaCEP",
"https://cepify.com.br"
],
"textContent": "Quick context for non-Brazilian readers: a **CEP** (_Código de Endereçamento Postal_) is Brazil's equivalent\nof a ZIP/postal code. The de-facto free API for it is ViaCEP, which is great — but\nI wanted a project to really dig into **Spring Boot 4 + Java 25** , and I kept wanting something I fully\ncontrol. So I built **Cepify** , a free, high-performance CEP lookup web service.\n\n🔗 https://cepify.com.br\n\n## What it does\n\n * CEP lookup returning **JSON, XML and JSONP**\n * **Address search** (state / city / street)\n * **ViaCEP compatibility** : it mirrors ViaCEP's routes and response shape (including the classic `{\"erro\": \"true\"}` for a missing CEP), so you can switch the base URL on existing ViaCEP code\n * A \"proper\" REST API too (`/v1/ceps/{cep}`) with `ETag` / `Cache-Control` and standardized errors\n * **No sign-up, no API key** , with per-IP rate limiting\n\n\n\n## A few technical decisions I found interesting\n\n * The database holds **~1.5M postal codes** , loaded by an ETL that processes the Brazilian Post Office's **e-DNE** dataset. Keeping it fresh without taking the production table down was honest work.\n * **Caffeine cache** in front of lookups (the service is far more read than write) — made responses snappy.\n * **Observability via logs, not a table** : every request becomes a JSON access-log line + Prometheus metrics. For a read-heavy service (and with privacy/LGPD in mind) that felt healthier than writing everything to the DB.\n * Docs via **Swagger/OpenAPI**.\n\n\n\nStack: Spring Boot 4, Java 25, PostgreSQL, Caffeine, Flyway, behind Cloudflare.\n\n## About\n\nIt's a **personal, free project** — no enterprise SLA, but it's live and working. I'd genuinely love\nfeedback, especially: **what would you want from a postal-code API that existing ones don't offer today?**",
"title": "I built Cepify — a free Brazilian postal code (CEP) API, ViaCEP-compatible (Spring Boot 4 / Java 25)"
}