PHPackages                             celsonery/laravel-viacep - 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. celsonery/laravel-viacep

ActiveLibrary[API Development](/categories/api)

celsonery/laravel-viacep
========================

A little Laravel package for integration with viacep api.

1.0.0(2mo ago)00MITPHPPHP ^8.2CI passing

Since Apr 30Pushed 2mo agoCompare

[ Source](https://github.com/celsonery/laravel-viacep)[ Packagist](https://packagist.org/packages/celsonery/laravel-viacep)[ Docs](https://github.com/celsonery/laravel-viacep)[ RSS](/packages/celsonery-laravel-viacep/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (6)Versions (3)Used By (0)

Laravel ViaCep Package - By Celso Nery
======================================

[](#laravel-viacep-package---by-celso-nery)

A little package utility to work with ViaCep web service
--------------------------------------------------------

[](#a-little-package-utility-to-work-with-viacep-web-service)

[![Maintainer](https://camo.githubusercontent.com/45e1990f156099c483e9b05133871192bcb8358d26633c38d7a989da6a16327c/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6d61696e7461696e65722d4063656c736f6e6572792d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/celsonery)[![Latest Version on Packagist](https://camo.githubusercontent.com/b3fe2f6cee7beea7ddaeac2bad991d76a3a8d245fe0e31d3b1a24c851e2daf40/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63656c736f6e6572792f6c61726176656c2d7669616365702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/celsonery/laravel-viacep)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![GitHub Tests Action Status](https://camo.githubusercontent.com/2c6791af38562dc17362873d0c64115a18d6d7dc737907fbe2a5e59bb788e257/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63656c736f6e6572792f6c61726176656c2d7669616365702f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/celsonery/laravel-viacep/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/aba1450f4ba59474dd43f73d9b82ecc1025ef12878abd5329c7a351495cacc6a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63656c736f6e6572792f6c61726176656c2d7669616365702f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/celsonery/laravel-viacep/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/0c8df8673092f29918564651c159de52b018127563fd3ab51bb910bc4768664e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63656c736f6e6572792f6c61726176656c2d7669616365702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/celsonery/laravel-viacep)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require celsonery/viacep
```

You can publish the config file with:

```
php artisan viacep:install
```

or

```
php artisan vendor:publish --tag="viacep-config"
```

This is the contents of the published config file:

```
return [
    base_url => env('BASE_URL', 'https://viacep.com.br/ws')
];
```

Usage
-----

[](#usage)

- Via Facade

```
use CelsoNery\ViaCep\Facades\BrasilApi;

$response = ViaCep::get('00100001');

return $response;
```

- Via DI

```
use Celso\ViaCep\ViaCepService;

public function index(ViaCepService $viaCep)
{
    return $viaCep->get('00100001');
}
```

Testing
-------

[](#testing)

```
composer tests
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Celso Nery](https://github.com/celsonery)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance83

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

85d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d3494ad3c6faeafb657ccf282f2bbef26c0a9f275136c455fe146c720e021151?d=identicon)[Celso Nery](/maintainers/Celso%20Nery)

---

Top Contributors

[![celsonery](https://avatars.githubusercontent.com/u/13930284?v=4)](https://github.com/celsonery "celsonery (5 commits)")

---

Tags

laravelcepviacepcelsonerylaravel-viacep

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/celsonery-laravel-viacep/health.svg)

```
[![Health](https://phpackages.com/badges/celsonery-laravel-viacep/health.svg)](https://phpackages.com/packages/celsonery-laravel-viacep)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

813336.8k3](/packages/defstudio-telegraph)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.6k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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