PHPackages                             usinatech/cepwebservice - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. usinatech/cepwebservice

ActiveLibrary[API Development](/categories/api)

usinatech/cepwebservice
=======================

CEP Webservice API REST Laravel Package

v0.5.0(2w ago)2214MITPHPPHP ^7.4|^8.0|^8.1|^8.2|^8.3CI failing

Since Jun 28Pushed 2w ago2 watchersCompare

[ Source](https://github.com/usinatech/cepwebservice)[ Packagist](https://packagist.org/packages/usinatech/cepwebservice)[ RSS](/packages/usinatech-cepwebservice/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (3)Versions (21)Used By (0)

CEP Webservice
==============

[](#cep-webservice)

Pacote Laravel para consulta de CEPs a partir de uma base SQLite local, com endpoints HTTP para busca por CEP, logradouro e coordenadas.

Requisitos
----------

[](#requisitos)

- PHP 7.4+
- Laravel 8+
- Extensão `pdo_sqlite`

Instalação
----------

[](#instalação)

Dentro do projeto Laravel que vai consumir o pacote:

```
composer require usinatech/cepwebservice
php artisan vendor:publish --tag=cepwebservice-config
php artisan vendor:publish --tag=cepwebservice-database
unzip database/cepwebservice.sqlite.zip -d database/
```

Configuração
------------

[](#configuração)

O pacote passa a registrar automaticamente a conexão `sqliteCEPWebservice`.
Se quiser customizar o caminho do banco ou timeouts, ajuste o arquivo `config/cepwebservice.php` publicado.

Variáveis opcionais de ambiente:

```
CEPWEBSERVICE_DB_PATH=database/cepwebservice.sqlite
CEPWEBSERVICE_RADIUS_KM=20
CEPWEBSERVICE_HTTP_TIMEOUT=10
CEPWEBSERVICE_HTTP_CONNECT_TIMEOUT=5
CEPWEBSERVICE_USER_AGENT="${APP_NAME} CEPWebservice"
CEPWEBSERVICE_NOMINATIM_URL=https://nominatim.openstreetmap.org
GOOGLE_MAPS_API_KEY=
CEPWEBSERVICE_GOOGLE_SYNC_COORDINATES=false
```

`SQLITE_DB_DATABASE` continua sendo aceito por compatibilidade com instalações antigas.

Endpoints
---------

[](#endpoints)

### Buscar CEP

[](#buscar-cep)

```
curl --location --request GET 'http://localhost:8000/cepwebservice/cep/51110000'
```

Resposta:

```
[
  {
    "cep": "51110000",
    "logradouro": "Avenida Antônio de Góes",
    "bairro": "Pina",
    "cidade": "Recife",
    "estado": "PE",
    "latitude": "-8.0851919",
    "longitude": "-34.8869746",
    "maps": "https://www.google.com/maps/search/-8.0851919,-34.8869746"
  }
]
```

### Buscar por logradouro

[](#buscar-por-logradouro)

```
curl --location --request GET 'http://localhost:8000/cepwebservice/search/Antônio%20de%20Góes'
```

### Buscar CEPs próximos por latitude/longitude

[](#buscar-ceps-próximos-por-latitudelongitude)

```
curl --location --request GET 'http://localhost:8000/cepwebservice/latlng/-8.0851919,-34.8869746'
```

### Reverse geocoding com OpenStreetMap/Nominatim

[](#reverse-geocoding-com-openstreetmapnominatim)

```
curl --location --request GET 'http://localhost:8000/cepwebservice/slatlng/-8.0851919,-34.8869746'
```

### Reverse geocoding com Google Maps

[](#reverse-geocoding-com-google-maps)

```
curl --location --request GET 'http://localhost:8000/cepwebservice/glatlng/-8.0851919,-34.8869746'
```

Por padrão, esse endpoint **não** atualiza o banco local.
Para habilitar a sincronização automática de latitude/longitude, configure:

```
CEPWEBSERVICE_GOOGLE_SYNC_COORDINATES=true
```

Observações
-----------

[](#observações)

- Os endpoints retornam JSON e validam CEP e coordenadas antes da consulta.
- A busca por logradouro exige pelo menos 3 caracteres.
- O banco SQLite distribuído no pacote precisa ser descompactado antes do uso.

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance97

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 97.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~115 days

Recently: every ~487 days

Total

20

Last Release

15d ago

PHP version history (3 changes)v0.0.2PHP ^7.2

v0.0.12PHP ^7.2|^7.3

v0.4.0PHP ^7.4|^8.0|^8.1|^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/81ac89d9bc29e3f4ed3adab8cd726e605ef5f0f7dd8fb4ac0ca8b4b4ba539b92?d=identicon)[alcimarcarlos](/maintainers/alcimarcarlos)

---

Top Contributors

[![alcimarcarlos](https://avatars.githubusercontent.com/u/15267066?v=4)](https://github.com/alcimarcarlos "alcimarcarlos (38 commits)")[![Dleysson](https://avatars.githubusercontent.com/u/84591213?v=4)](https://github.com/Dleysson "Dleysson (1 commits)")

---

Tags

apiapi-restceplaravelphp7

### Embed Badge

![Health badge](/badges/usinatech-cepwebservice/health.svg)

```
[![Health](https://phpackages.com/badges/usinatech-cepwebservice/health.svg)](https://phpackages.com/packages/usinatech-cepwebservice)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M982](/packages/statamic-cms)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

3.0k37.6M133](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k14.2M62](/packages/knuckleswtf-scribe)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

783.8k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
