ViaCEP API
- Status
- Working
- API key
- Not needed
- Browser calls
- Runs in the browser
- Latency
- 301 ms
- Docs
- viacep.com.br ↗
Build snapshot, not live. One verifier run on , from the machine that built this site. How we check
Example request
GEThttps://viacep.com.br/ws/01001000/json/
Sent from your browser straight to viacep.com.br. No proxy: this site never sees the request or the answer.
Copy the request
curl -s 'https://viacep.com.br/ws/01001000/json/'const res = await fetch("https://viacep.com.br/ws/01001000/json/");
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://viacep.com.br/ws/01001000/json/", timeout=10)
res.raise_for_status()
print(res.json())Response stored by the verifier
This is what viacep.com.br answered when the verifier sent the request above on : HTTP 200, application/json. Arrays are cut to two items and long strings are shortened. It comes from the build snapshot.
{
"cep": "01001-000",
"logradouro": "Praça da Sé",
"complemento": "lado ímpar",
"unidade": "",
"bairro": "Sé",
"localidade": "São Paulo",
"uf": "SP",
"estado": "São Paulo",
"regiao": "Sudeste",
"ibge": "3550308",
"gia": "1004",
"ddd": "11",
"siafi": "7107"
}Availability
Up 1 of 1 day checked · 30-day window
What counts as up for this API: an answer within five seconds, a 2xx status, and the JSON body must contain the field "cep".
Last check: — passed, HTTP 200 in 301 ms.
The check runs from our infrastructure, not from where you are. If you need certainty, send the request yourself above. How the verifier works.
Badge for your README
If you maintain this API, you can show its last check in your README. The image is made when the site is built, so it shows that check and its date; it is not live, and it can be older than the status page until the site is published again. The link goes back to this page.
[](https://freeapi.today/apis/viacep/)Used in these collections
Questions
Does the ViaCEP API need an API key?
No. The sample request on this page was answered without a key, token or account.
Can I call the ViaCEP API from the browser?
Yes. viacep.com.br answered our verifier with an Access-Control-Allow-Origin header on Nov 26, 2026, so a fetch call from a web page can read the response.
Is the ViaCEP API working?
At the check on Nov 26, 2026 it returned HTTP 200 with the expected data in 301 ms. The status at the top of this page shows the most recent result we have.
What is the ViaCEP API good for?
Address for a Brazilian postal code, and reverse search by street name. It is part of our collection "Free APIs for Brazilian data": The classic CEP lookup; also searches by street name.