Geocoding · head-to-head
OpenStreetMap vs ViaCep
The core OpenStreetMap API serves and edits the raw map database underlying OSM — nodes, ways, and relations — over HTTPS at api.openstreetmap.org. Reading map data requires no authentication at all, while creating or modifying data requires an OAuth 2.0 token tied to an OSM account (the older Basic Auth/OAuth 1.0a login methods were retired in June 2024). It's a general-purpose data API rather than a geocoding service specifically — OSM points address-lookup users to the separate Nominatim service, and bulk-read users to Overpass.
ViaCEP is a free, high-availability web service for looking up Brazilian postal codes (CEP): given an 8-digit CEP it returns street, neighborhood, city, state, and IBGE/DDD codes, with a reverse address-to-CEP search available too. It's run by WBX and widely embedded across Brazilian dev tooling — its own docs warn that heavy bulk-validation traffic against it can trigger an automatic, indefinite IP block.
| OpenStreetMap | ViaCep | |
|---|---|---|
| Authentication | None | None |
| Pricing | free | free |
| Formats | XML, JSON | JSON, XML |
| CORS | yes | yes |
| HTTPS | Yes | Yes |