A front-end exercise from Alura’s JavaScript API course, built on the AluraBooks starter layout.
I connected the postal-code field to the ViaCEP API. The form fills in the street, neighborhood, city and state for a valid code and displays a message when the lookup fails.
Source code on GitHub
https://github.com/pedrocendon/formulario-API-JS

Demo using a public postal code for Praça da Sé, São Paulo.
0 likes · 0 views · Nov 26, 2026
Alura coursework. A JavaScript form uses ViaCEP to look up Brazilian postal codes and fill in the address.