Returns a list of postal codes matching the given state (UF), city, and street name. Returns up to 50 results ordered by proximity to the street name.
uf
(string, path, required)
Brazilian state abbreviation (2 letters)
Constraints: {'enum': ['AC', 'AL', 'AP', 'AM', 'BA', 'CE', 'DF', 'ES', 'GO', 'MA', 'MT', 'MS', 'MG', 'PA', 'PB', 'PR', 'PE', 'PI', 'RJ', 'RN', 'RS', 'RO', 'RR', 'SC', 'SP', 'SE', 'TO']}
Search CEPs by address
openapi-spec
curl 'https://viacep.com.br/ws/SP/Sao Paulo/Paulista/json'
import requests
resp = requests.get("https://viacep.com.br/ws/SP/Sao Paulo/Paulista/json")
data = resp.json()
import zingu_apis
api = zingu_apis.api("com")
result = api.fetch("{uf}/{cidade}/{logradouro}/json")
for item in result:
print(item)
const resp = await fetch("https://viacep.com.br/ws/SP/Sao Paulo/Paulista/json");
const data = await resp.json();