PHPackages                             jansenfelipe/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. jansenfelipe/cep-gratis

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

jansenfelipe/cep-gratis
=======================

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

v4.0.2(8y ago)689.4k↓50%29[1 issues](https://github.com/jansenfelipe/cep-gratis/issues)[1 PRs](https://github.com/jansenfelipe/cep-gratis/pulls)MITHTMLPHP &gt;=5.5

Since Oct 15Pushed 6y ago10 watchersCompare

[ Source](https://github.com/jansenfelipe/cep-gratis)[ Packagist](https://packagist.org/packages/jansenfelipe/cep-gratis)[ RSS](/packages/jansenfelipe-cep-gratis/feed)WikiDiscussions 4.0 Synced 1mo ago

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

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

[](#cep-grátis)

[![Travis](https://camo.githubusercontent.com/b6863ce3e9935897d09b17494dc936787e57add8e377c6cd7dff31549f40bbab/68747470733a2f2f6170692e7472617669732d63692e6f72672f6a616e73656e66656c6970652f6365702d6772617469732e7376673f6272616e63683d342e30)](https://travis-ci.org/jansenfelipe/cep-gratis)[![StyleCI](https://camo.githubusercontent.com/4b0a66093cf919c3cdfb2fc3a037364227fdbf080faf09ecaf29887a7dc01c52/68747470733a2f2f7374796c6563692e696f2f7265706f732f32343834383933302f736869656c643f6272616e63683d342e30)](https://styleci.io/repos/24848930?branch=4.0)[![Latest Stable Version](https://camo.githubusercontent.com/d85ff79f6f80bc99292994efd0ebfce45c8b62c69d459555418f595619454e85/68747470733a2f2f706f7365722e707567782e6f72672f6a616e73656e66656c6970652f6365702d6772617469732f762f737461626c652e737667)](https://packagist.org/packages/jansenfelipe/cep-gratis)[![Total Downloads](https://camo.githubusercontent.com/c27b58d698080bd49d54d9367d8c931629848c891e07c5a5d4a330dee54e0f06/68747470733a2f2f706f7365722e707567782e6f72672f6a616e73656e66656c6970652f6365702d6772617469732f646f776e6c6f6164732e737667)](https://packagist.org/packages/jansenfelipe/cep-gratis)[![MIT license](https://camo.githubusercontent.com/0171f095651a253be2c09e635672b5d0dc710d46b8762ef01b05823538a4cbe0/68747470733a2f2f706f7365722e707567782e6f72672f6a616e73656e66656c6970652f6e66657068702d73657269616c697a652f6c6963656e73652e737667)](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 jansenfelipe/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 JansenFelipe\CepGratis\CepGratis;

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

### Gostou? Conheça também

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

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

### License

[](#license)

The MIT License (MIT)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 94.7% 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 ~74 days

Recently: every ~95 days

Total

18

Last Release

2966d 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 (3 changes)v1.0.0PHP &gt;=5.3.0

v2.0.0PHP &gt;=5.4.0

v4.0.1PHP &gt;=5.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3134214?v=4)[Jansen Felipe](/maintainers/jansenfelipe)[@jansenfelipe](https://github.com/jansenfelipe)

---

Top Contributors

[![jansenfelipe](https://avatars.githubusercontent.com/u/3134214?v=4)](https://github.com/jansenfelipe "jansenfelipe (71 commits)")[![devLopez](https://avatars.githubusercontent.com/u/5889460?v=4)](https://github.com/devLopez "devLopez (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

cepconsulta-cepcorreiosphpcorreioscep

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[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).

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

PHP Library that uncovers the technologies used on websites.

1417.5k](/packages/madeitbelgium-wappalyzer)[minime/brasil-endereco

Brasil/Endereco é um componente de consulta que facilita a obtenção de endereços a partir do site dos correios

163.1k](/packages/minime-brasil-endereco)

PHPackages © 2026

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