About
API for CPF consultation with the Federal Revenue Service, allowing agile integration, without captcha or date of birth. This way, you can obtain data on people and companies in real time, reducing fraud and guaranteeing the reliability of registrations in your applications.
In addition, our API for CPF and CNPJ queries has an average response time of less than 1 second, making it possible to automate processes and maintain a complete and secure database.
Find out more on our website.
Certifications
In 2025, we obtained three outstanding certifications that prove our commitment to privacy, information security and compliance with the law:



- LGPD Seal: attests to our full compliance with the General Data Protection Law, guaranteeing the proper and secure processing of personal data in Brazil.
- GDPR seal: confirms our adherence to European data protection standards, ensuring high levels of privacy globally.
- CyberSec Seal: recognizes our good practices in cyber security, reinforcing the protection of systems and information against digital threats.
To find out more about our processes and policies, see:
Data accuracy and updating
We only provide data that is updated in real time (D+0). This means that any change in the owner's registration is reflected exactly as it appears in the Receita Federal. Unlike many providers in the market, we do not use old, incomplete or leaked databases, which allows us to guarantee full coverage for all the documents consulted.
For more information, visit: www.cpfcnpj.com.br
Introduction
This document presents the guidelines for quickly integrating with CPF.CNPJ services via HTTP (HTTP API).
Any programming language is compatible with our solution.
Attention!
You must have an active account on our platform to use the API.
If you don't have an account yet, register now.
Usage Rules
To prevent misuse of the API and maintain its high availability, we have established the following restrictions:
- After 3 consecutive queries with an invalid token: 5-minute block;
- After 3 consecutive queries of the same CPF/CNPJ in the same package in less than 1 minute: 3-minute block;
- After 3 consecutive appointments without credits in less than 1 minute: 5-minute block.
Base URL
GET requests are made on a base URL under HTTPS protocol.
URL: https://api.cpfcnpj.com.br/
Attention!
All requests go through CloudFlare before reaching our servers.
Minimum acceptable TLS version: 1.2
Firewall
Make sure you grant permissions on your firewall for the CloudFlare IPs.
Acesse a lista de IPs para liberação: https://www.cloudflare.com/ips/
Content-Type
The API data return will be via JSON
.
application/json
.
Timeout
Use the default timeout of 60 seconds. If you use a lower value, in case of API instability your request may be aborted before receiving the response, consuming credits.
Currently, the average turnaround time for queries is 2 seconds.
Tokens
To perform queries, you will need to generate the integration token. To do this, go to
API > Tokens
in your
Control Panel.
After registration, your token will be generated so that it can be inserted into the URL
of the requisition.
Token for integration tests:
Token: 5ae973d7a997af13f0aaf2bf60e65803
ATTENTION! This token will return only dummy data for integration tests.
Package IDs
In each request, it will be necessary to inform in the URL the ID of the desired Package, here named {pacote}
.
To contract the packages you want, go to the Control Panel. Check them out on our website.
|
Pacote | Returned Data | Cost per Check (BRL) |
---|---|---|---|
1 | CPF A |
|
R$0,15 |
7 | CPF B |
|
R$0,22 |
2 | CPF C |
|
R$0,25 |
8 | CPF D |
Real-time consultations with the IRS and a response in 1 second! |
R$0,36 |
9 | CPF E |
Real-time consultations with the IRS and a response in 1 second! |
R$0,47 |
3 | CPF F |
|
R$1,20 |
13 | CPF G |
Click here and read our article for more information. |
R$1,00 |
14 | CPF H |
He also returns with relatives. Click here and read our article for more information. ¹ If it is not a PPE/PEP (or related), the return will be |
R$0,20² |
15 | CPF I |
List of CNPJs in which the owner is a member of the corporate board. |
R$0,20 |
17 | CPF J |
|
R$0,18 |
18 | CPF K |
Only the Registration Status in real time, without proof. |
R$1,40 |
21 | CPF Lookalike |
|
R$0,24 |
4 | CNPJ A |
|
R$0,13 |
5 | CNPJ B |
|
R$0,24 |
10 | CNPJ C |
|
R$0,32 |
6 | CNPJ D |
|
R$0,45 |
11 | CNPJ F |
|
R$0,30 |
12 | CNPJ G |
Click here and read our article for more information. |
R$1,00 |
16 | CNPJ H |
|
R$0,15 |
19 | CNPJ Lookalike |
Charges for each returning member. |
R$0,26 |
Making Queries
In a few steps, we will explain how the query is made by the CPF.CNPJ.
After generating the token, as in Introductionyou need to build the URL of the request.
Definition
Endpoint that will contain the TokenID of Pacote and the number of the CPF or CNPJ to be consulted, respectively.
URL:https://api.cpfcnpj.com.br/{token}/{pacote}/{cpfcnpj}
Request Parameters
Parameter | Type | Description | Mandatory? |
---|---|---|---|
token | string | Token generated in the Control Panel. | |
package | int | ID of the package to be used, according to the table. | |
cpfcnpj | string | 11-digit CPF number or 14-digit CNPJ number. |
URL examples:
See CPF in the package CPF E:
https://api.cpfcnpj.com.br/5ae973d7a997af13f0aaf2bf60e65803/9/00000000000
Consult CNPJ in the package CNPJ D:
https://api.cpfcnpj.com.br/5ae973d7a997af13f0aaf2bf60e65803/6/27272134000118
Response Parameters
Check below the fields returned for CPFs and CNPJs.
Each query package has its own response parameters. So, integrate accordingly.
CPF Answers
Main object of the response that varies according to the package:
Parameter | Type | Description |
---|---|---|
status | bool | 1 for success and 0 for failure (see error table). |
cpf | string | Formatted CPF number queried with 14 digits. |
nome | string | Full name of the holder (without accents). |
nomeSocial | string | Social name, according to Decree 8.727/2016. |
nascimento | string | Date of birth, format DD/MM/YYYY. |
mae | string | Mother's full name (without accents). |
genero | string | M (Male) or F (Female). |
situacao | string | Registration status: Regular , Cancelada , Suspensa , Pendente , Nula . |
situacaoDigito | string | Situation code (00, 02, 03, 04, 05, 08, 09). |
situacaoMotivo | string | Reason for registration status. |
situacaoAnoObito | string | Year of death (DD/MM/YYYY), if any. |
situacaoInscricao | string | Date of registration with the Tax Office (DD/MM/YYYY or text such as "prior to ..."). |
situacaoComprovante | string | Real-time voucher control code. |
situacaoComprovanteEmissao | string | Date (DD/MM/YYYY HH:MM:SS) on which the query was made at Receita Federal (realtime). |
situacaoComprovantePdf | string | PDF of the query made in base64. |
risco | risco[] | Object of probability of future default (SERASA Score). |
endereco | string | Main residential address (street). |
numero | string | Number in the address. |
complemento | string | Address complement. |
bairro | string | Address neighborhood. |
cep | string | Address zip code. |
cidade | string | City of address. |
uf | string | State (UF) with 2 letters. |
enderecos | enderecos[] | List containing the history of addresses and also the most recent one (which is outside the array). |
telefones | telefones[] | List containing the history of possible telephone numbers. |
whatsapp[] | Based on the list of phones, a real-time check is made and identifies which phone numbers are WhatsApp. | |
emails | emails[] | List containing the history of possible emails. |
ppe | ppe[] | List of PPE/PEP positions, if you are a Politically Exposed Person. |
relacionados | relacionados[] | Lists related relatives who are PPE/PEP. |
empresas | empresas[] | List containing the CNPJ of companies in which the owner is a shareholder. |
pacoteUsado | int | ID of the package used. |
saldo | int | Package balance after consultation. |
consultaID | string | Query ID (16 digits). |
delay | float | Total consultation time in seconds. |
PPE array
Array ppe[]
containing a list of PPE/PEP positions:
Parameter | Type | Description |
---|---|---|
sigla | string | Symbol of the political office. |
funcao | string | Job function. |
nivel | string | Level of political hierarchy. |
orgao | string | Operating body. |
inicioexercicio | string | Start date (DD/MM/YYYY). |
fimexercicio | string | End date of the financial year (DD/MM/YYYY). |
fimcarencia | string | End of grace period date (DD/MM/YYYY). |
CNPJ Answers
Main object of the response that varies according to the package:
Parameter | Type | Description |
---|---|---|
status | bool | 1 for success, 0 for failure (see mistakes). |
cnpj | string | Formatted CNPJ (18 digits). |
razao | string | Company name. |
fantasia | string | Company's trade name. |
inicioAtividade | string | Start date of activities (DD/MM/YYYY). |
string | Company registration e-mail. | |
responsavel | string | Name of legal guardian (without accent marks). |
simplesNacional | simplesNacional[] | Data on possible adhesion to Simples Nacional. |
simei | simei[] | Data on possible SIMEI membership. |
matrizEndereco | matrizEndereco[] | Object of the full address of the CNPJ consulted. |
matrizfilial | matrizfilial[] | Details of the competent body (head office/branch). |
telefones | telefones[] | Company phone numbers (up to 2). |
fax | fax[] | Company fax. |
situacao | situacao[] | Registration status with the IRS. |
naturezaJuridica | naturezaJuridica[] | Legal information. |
cnae | cnae[] | Main CNAE. |
porte | porte[] | Company size data. |
socios | socios[] | QSA: partners/administrators. |
risco | risco[] | Level of probability of default (SERASA). |
pacoteUsado | int | ID of the package used. |
saldo | int | Package balance after consultation. |
consultaID | string | Query ID (16 digits). |
delay | float | Time to process the query (seconds). |
Objeto simplesNacional
Object simplesNacional[]
containing Simples Nacional information:
Parameter | Type | Description |
---|---|---|
optante | string | Sim or Não . |
inicio | string | Start date (DD/MM/YYYY). |
fim | string | End date (DD/MM/YYYY). |
Objeto simei
Object simei[]
containing SIMEI information:
Parameter | Type | Description |
---|---|---|
optante | string | Sim or Não . |
anteriores | matrix | Object anteriores[] with previous records. |
Objeto anteriores
Parameter | Type | Description |
---|---|---|
inicio | string | Start date (DD/MM/YYYY). |
fim | string | End date (DD/MM/YYYY). |
detalhamento | string | Record description. |
Objeto matrizEndereco
Parameter | Type | Description |
---|---|---|
cep | string | 9-digit zip code. |
tipo | string | Type of address (e.g. Street, Avenue, etc.). |
logradouro | string | Company address. |
numero | string | Number in the address. |
complemento | string | Address complement. |
bairro | string | Address neighborhood. |
cidade | string | City of address. |
uf | string | State (UF) with 2 letters. |
Objeto matrizfilial
Information on the competent body (head office or branch):
Parameter | Type | Description |
---|---|---|
id | int | Body ID. |
tipo | string |
Organ:
id 1 : Matriz id 2 : Filial |
Array telefones
Parameter | Type | Description |
---|---|---|
ddd | string | Telephone code. |
numero | string | Phone number. |
Objeto fax
Parameter | Type | Description |
---|---|---|
ddd | string | Fax code. |
numero | string | Fax number. |
Objeto situacao
Parameter | Type | Description |
---|---|---|
id | int | ID of the cadastral situation. |
nome | string |
Name of the situation, for example:
id 1 : Baixada id 2 : Ativa id 3 : Suspensa id 4 : Inapta id 8 : Baixada |
data | string | Date of situation (DD/MM/YYYY). |
Objeto naturezaJuridica
Object naturezaJuridica[]
with details of the legal nature.
Official list
Parameter | Type | Description |
---|---|---|
codigo | string | Legal nature code (4 digits). |
descricao | string | Description of the legal nature. |
Objeto cnae
Object cnae[]
with data from the main CNAE.
CNAE Table
Parameter | Type | Description |
---|---|---|
divisao | string | Room code. |
grupo | string | Group code. |
classe | string | Class code. |
subClasse | string | Subclass code. |
fiscal | string | Full CNAE code (numbers only). |
descricao | string | CNAE Description. |
Objeto porte
Object porte[]
containing data on the company's size.
Parameter | Type | Description |
---|---|---|
id | string | Port ID. |
descricao | string |
Description of size, for example:
id 0 : Demais id 1 : Matriz id 3 : Demais id 5 : Demais |
Array socios
Object socios[]
containing QSA data:
Parameter | Type | Description |
---|---|---|
nome | string | Name of partner PF or PJ (without accentuation). |
cnpj | string | Formatted CNPJ, if partner. |
tipo | string | Type of partner. |
capitalSocial | float | Percentage of share capital. |
pais | string | Country of origin of the partner. |
Objeto risco
Object risco[]
with data from the SERASA Score:
Parameter | Type | Description |
---|---|---|
nivel | int | Risk level ID (0 to 4). |
descricao | string | Level description: Unknown, Low, Medium, High, Very High. |
score | string | Score range associated with the level. |
Checking Balances
Free of charge, check the balance of the desired package.
Definition
Endpoint that will contain the Token and Packetrespectively.
URL:https://api.cpfcnpj.com.br/{token}/saldo/{pacote}
Request Parameters
Parameter | Type | Description | Mandatory? |
---|---|---|---|
token | string | Token generated in the Control Panel. | |
pacote | int | Package ID (see table). |
Response Parameters
Object pacote[]
with balance information:
Parameter | Type | Description |
---|---|---|
id | int | Package ID. |
nome | string | Package name. |
saldo | int | Available balance. |
Error Codes
List of errors returned in the parameters erro
e erroCodigo
:
erroCodigo |
Value | erro |
Description |
---|---|---|---|
|
CPF | CPF inválido! | Number entered is not a valid CPF. |
|
CPF | Informe um CPF com 11 dígitos! | The CPF entered has less than 11 digits. |
|
CPF | O CPF informado não existe (...) | Valid CPF, but not included in Receita databases. |
|
CNPJ | CNPJ inválido! | The number entered is not a valid CNPJ. |
|
CNPJ | Informe um CNPJ com 14 dígitos! | The CNPJ informed has less than 14 digits. |
|
CNPJ | O CNPJ informado não existe (...) | Valid CNPJ, but not included in Revenue databases. |
|
CPF/CNPJ | Token inválido! (...) | Token does not belong to the source IP. |
|
CPF/CNPJ | Créditos insuficientes! | No credits in the selected package. |
|
CPF/CNPJ | Conta suspensa e/ou inativa! | Contact support. |
|
CPF/CNPJ | Blacklist até *DATA* | IP and token temporarily suspended. |
|
CPF/CNPJ | Pacote indisponível para consultas! | Package ID invalid or unavailable. |
|
CPF/CNPJ | Não é possível consultar *CPF/CNPJ* neste pacote! | Supplier failure or internal error. |
|
CPF/CNPJ | Supplier 2 offline. Contact us! | Offline data provider. |
|
CPF/CNPJ | Limite de requisições (20) por segundo excedido... | Maximum of 20 queries per second. |