PHPackages                             gleisonnanet/cep-gratis - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. gleisonnanet/cep-gratis

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gleisonnanet/cep-gratis
=======================

Com esse pacote você poderá realizar consultas de CEP gratuitamente.

v4.0.2(8y ago)032MITHTMLPHP &gt;=5.5

Since Oct 15Pushed 6y agoCompare

[ Source](https://github.com/gleisonnanet/cep-gratis)[ Packagist](https://packagist.org/packages/gleisonnanet/cep-gratis)[ RSS](/packages/gleisonnanet-cep-gratis/feed)WikiDiscussions 4.0 Synced today

READMEChangelogDependencies (3)Versions (18)Used By (0)

CEP Grátis
==========

[](#cep-grátis)

[![Travis](https://camo.githubusercontent.com/625352109844cd3a7700328e120d1280d004e613e503c8d8b12fece6721fd9ab/68747470733a2f2f6170692e7472617669732d63692e6f72672f676c6569736f6e6e616e65742f6365702d6772617469732e7376673f6272616e63683d342e30)](https://travis-ci.org/gleisonnanet/cep-gratis)[![StyleCI](https://camo.githubusercontent.com/4b0a66093cf919c3cdfb2fc3a037364227fdbf080faf09ecaf29887a7dc01c52/68747470733a2f2f7374796c6563692e696f2f7265706f732f32343834383933302f736869656c643f6272616e63683d342e30)](https://styleci.io/repos/24848930?branch=4.0)[![Latest Stable Version](https://camo.githubusercontent.com/ae8c75e941c2def8f2be84877a8734a2e258f5080f8bd82f1657fea6cb496ef1/68747470733a2f2f706f7365722e707567782e6f72672f676c6569736f6e6e616e65742f6365702d6772617469732f762f737461626c652e737667)](https://packagist.org/packages/gleisonnanet/cep-gratis)[![Total Downloads](https://camo.githubusercontent.com/2c7188983bc74c945b6d067fe76211f96902262d762703fca4f295599f5ecc0a/68747470733a2f2f706f7365722e707567782e6f72672f676c6569736f6e6e616e65742f6365702d6772617469732f646f776e6c6f6164732e737667)](https://packagist.org/packages/gleisonnanet/cep-gratis)[![MIT license](https://camo.githubusercontent.com/94651ba0e4562a6b55a730c1c10609149f0d88227f0be6c267d0e16605be313e/68747470733a2f2f706f7365722e707567782e6f72672f676c6569736f6e6e616e65742f6e66657068702d73657269616c697a652f6c6963656e73652e737667)](http://opensource.org/licenses/MIT)

Com esse pacote você poderá realizar consultas de CEP gratuitamente.

Para evitar problemas com indisponibilidade de serviços, a consulta é realizada paralelamente em providers diferentes:

- [Website dos correios](http://www.buscacep.correios.com.br/sistemas/buscacep/)
- [API Viacep](https://viacep.com.br/)

A library irá retornar para você a resposta mais rápida, aumentando assim a performance da consulta.

### Changelog

[](#changelog)

- 4.0.2 - 27/03/2018 Consulta direto na tela de detalhe dos Correios. Obrigado [@adrianogl](https://github.com/adrianogl)
- 4.0.0 - 11/03/2017 Consulta em múltiplos providers, interface HttpClient
- 3.0.1 - 10/03/2016 Tratar cep inexistente. Obrigado [@nunesbeto](https://github.com/nunesbeto)
- 3.0.0 - 08/03/2016 Up version fabpot/goutte
- 2.0.4 - 05/03/2016 Ajuste pois o site dos Correios sofreu alteração. Obrigado [@devLopez](https://github.com/devLopez)

### Como utilizar

[](#como-utilizar)

Adicione a library

```
$ composer require gleisonnanet/cep-gratis
```

Adicione o autoload.php do composer no seu arquivo PHP.

```
require_once 'vendor/autoload.php';
```

Agora basta chamar o método `CepGratis::search($cep)`

```
use gleisonnanet\CepGratis\CepGratis;

$address = CepGratis::search('31030080');
```

### Gostou? Conheça também

[](#gostou-conheça-também)

- [CnpjGratis](https://github.com/gleisonnanet/cnpj-gratis)
- [CpfGratis](https://github.com/gleisonnanet/cpf-gratis)
- [CidadesGratis](https://github.com/gleisonnanet/cidades-gratis)
- [NFePHPSerialize](https://github.com/gleisonnanet/nfephp-serialize)

### License

[](#license)

The MIT License (MIT)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 88.8% 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 ~111 days

Recently: every ~255 days

Total

18

Last Release

2326d ago

Major Versions

1.0.x-dev → v2.0.02015-02-02

2.0.x-dev → v3.0.02016-03-08

3.0.x-dev → v4.0.02017-03-11

PHP version history (4 changes)v1.0.0PHP &gt;=5.3.0

v2.0.0PHP &gt;=5.4.0

v4.0.1PHP &gt;=5.5

4.0.x-devPHP ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4deaf39aa524bb7afb6c5753541d78e07150bf68eb4239de3aa2505d152db6a7?d=identicon)[gleisonnanet](/maintainers/gleisonnanet)

---

Top Contributors

[![jansenfelipe](https://avatars.githubusercontent.com/u/3134214?v=4)](https://github.com/jansenfelipe "jansenfelipe (71 commits)")[![adrianogl](https://avatars.githubusercontent.com/u/4664367?v=4)](https://github.com/adrianogl "adrianogl (3 commits)")[![devLopez](https://avatars.githubusercontent.com/u/5889460?v=4)](https://github.com/devLopez "devLopez (2 commits)")[![gleisonnanet](https://avatars.githubusercontent.com/u/3974987?v=4)](https://github.com/gleisonnanet "gleisonnanet (2 commits)")[![hevertonfreitas](https://avatars.githubusercontent.com/u/2679081?v=4)](https://github.com/hevertonfreitas "hevertonfreitas (1 commits)")[![nunesbeto](https://avatars.githubusercontent.com/u/5921319?v=4)](https://github.com/nunesbeto "nunesbeto (1 commits)")

---

Tags

phpcorreioscep

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gleisonnanet-cep-gratis/health.svg)

```
[![Health](https://phpackages.com/badges/gleisonnanet-cep-gratis/health.svg)](https://phpackages.com/packages/gleisonnanet-cep-gratis)
```

###  Alternatives

[jansenfelipe/cep-gratis

Com esse pacote você poderá realizar consultas de CEP gratuitamente.

689.4k](/packages/jansenfelipe-cep-gratis)[flyingluscas/correios-php

Uma maneira fácil de interagir com as principais funcionalidades dos Correios.

141362.4k3](/packages/flyingluscas-correios-php)[dusterio/link-preview

Link preview generation for PHP with Laravel support

126326.6k3](/packages/dusterio-link-preview)[jansenfelipe/cnpj-gratis

Com esse pacote você poderá consultar, gratuitamente, CNPJs diretamente no site da receita.

17620.9k](/packages/jansenfelipe-cnpj-gratis)[godbout/dash-docset-builder

Dash (LOVE) Docset Builder in PHP (LOVE).

1263.5k](/packages/godbout-dash-docset-builder)[madeitbelgium/wappalyzer

PHP Library that uncovers the technologies used on websites.

1417.5k](/packages/madeitbelgium-wappalyzer)

PHPackages © 2026

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