🌎API CEP

Base de CEP IBGE

API gRPC

grpcs://cepb.awesomeapi.com.br

https://github.com/raniellyferreira/awesomeapi-cep/blob/master/proto/address.proto

Proto file
syntax = "proto3";

package addr.v1;

option go_package = "./;pb";

// -- Services
service AddressService {
    rpc FindByCep (AddressRequest) returns (Address) {}
}

// -- Messages
message Empty {}

message Address {
    string cep = 1;
    string address_type = 2;
    string address_name = 3;
    string address = 4;
    string state = 5;
    string district = 6;
    string lat = 7;
    string lng = 8;
    string city = 9;
    string city_ibge = 10;
    string ddd = 11;
}

message AddressList {
    repeated Address addresses = 1;
}

message AddressRequest {
    string cep = 1;
}

API REST

Buscar um CEP

GET https://cep.awesomeapi.com.br/:format/:cep

Retorna o endereço do CEP Ex.: https://cep.awesomeapi.com.br/json/05424020

Path Parameters

NameTypeDescription

format

string

Formato de resposta JSON (padrão), XML

cep*

number

Apenas os números do CEP

{
  "cep": "05424020",
  "address_type": "Rua",
  "address_name": "Professor Carlos Reis",
  "address": "Rua Professor Carlos Reis",
  "district": "Pinheiros",
  "state": "SP",
  "city": "São Paulo",
  "state": "SP",
  "lat": "-23.5703026",
  "lng": "-46.6967364",
  "ddd": "11",
  "city_ibge": "3550308"
}

Last updated