PHPackages                             aka-sacci/getcnpj-php - 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. aka-sacci/getcnpj-php

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

aka-sacci/getcnpj-php
=====================

Consulta de dados referentes ao CNPJ online

2.2.0(4y ago)056MITPHPPHP &gt;=7.2.0

Since Jul 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/aka-sacci/getcnpj-php)[ Packagist](https://packagist.org/packages/aka-sacci/getcnpj-php)[ RSS](/packages/aka-sacci-getcnpj-php/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (6)Used By (0)

getcnpj-php
===========

[](#getcnpj-php)

A simple project that returns the data of a organization with a valid brazilian EIN (CNPJ);

I developed this to study some concepts and functionalities of Composer and PHPUnit, so, a simple unitary test is attached to the project.

To make the requisition of data, [a external API was used](https://www.receitaws.com.br/). As it is free, the API has a limit of 3 queries per minute for each IP. There some another paid plans that increase this limit, but, for this project, subscribing to any of them is unnecessary.

How to use in your project (via Composer)
-----------------------------------------

[](#how-to-use-in-your-project-via-composer)

Install the package:

> composer require aka-sacci/getcnpj-php

Require the dependencies of Composer:

> require\_once "vendor/autoload.php";

Import the namespace to your project:

> use \\AkaSacci\\GetcnpjPhp\\Search;

Declare the instance of the class:

> $mySearch = new Search();

Search to a CNPJ and get the data!

> $data = $mySearch-&gt;getDataFromCNPJ($sringCNPJ);

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Every ~0 days

Total

5

Last Release

1747d ago

Major Versions

1.1.0 → 2.0.02021-07-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc5296628f2971aa12178ef014d7db72c24ed199597f65ac6c4a509cc854a667?d=identicon)[aka-sacci](/maintainers/aka-sacci)

---

Top Contributors

[![aka-sacci](https://avatars.githubusercontent.com/u/70353393?v=4)](https://github.com/aka-sacci "aka-sacci (6 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/aka-sacci-getcnpj-php/health.svg)

```
[![Health](https://phpackages.com/badges/aka-sacci-getcnpj-php/health.svg)](https://phpackages.com/packages/aka-sacci-getcnpj-php)
```

###  Alternatives

[maartenstaa/glicko2

PHP implementation of the Glicko-2 rating algorithm

147.3k](/packages/maartenstaa-glicko2)

PHPackages © 2026

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