About
API for CPF lookup in the Brazilian Federal Revenue Service, enabling agile integration without captcha or date of birth. Get individual and company data in real-time, reducing fraud and ensuring the reliability of registrations in your applications.
Furthermore, our CPF and CNPJ lookup API has an average response time below 1 second, enabling process automation and maintaining a complete and secure database.
Learn more on our website.
Certifications
In 2025, we obtained three outstanding ISO/IEC certifications that demonstrate our commitment to privacy, information security, and regulatory compliance:
- Information Security Management 27001:2022 (Certificate Q7LUQTCU20251113BRAIS1Z1): certifies our Information Security Management System, ensuring data confidentiality, integrity, and availability.
- Privacy Information Management 27701:2025 (Certificate Q7LUQTCU20251113BRAPI15R): attests our compliance with best practices in privacy information management, including LGPD and GDPR.
- Compliance Management System 37301:2021 (Certificate Q7LUQTCC20251113BRACM1X7): demonstrates our adherence to a robust compliance management system, ensuring compliance with standards and regulations.
To learn more about our processes and policies, see:
Data Accuracy and Updates
We provide only real-time updated data (D+0) with 100% coverage of queried documents. Thus, any registration change by the holder is reflected exactly as it appears in the Federal Revenue Service. Unlike many providers in the market, we do not use old, incomplete, or leaked databases, which allows us to guarantee full coverage for all queried documents.
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!
An active registration on our platform is required to use the API.
If you don't have an account yet, register now.
Rules and Usage Limits
To prevent API misuse and maintain high availability, we have established the following restrictions:
- After 3 consecutive queries with 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 queries without credits in less than 1 minute: 5-minute block.
There is also a limit of 20 requests per second. If this limit is reached, wait for the next second and try again. If necessary, you can request an increase in this limit directly with technical support.
Base URL
GET requests are made to a base URL under the HTTPS.
URL: https://api.cpfcnpj.com.br/
Attention!
All requests pass through CloudFlare before reaching our servers.
Minimum acceptable TLS version: 1.2
Firewall
Make sure to grant permissions in your firewall for CloudFlare IPs.
Access the IP list for whitelisting: https://www.cloudflare.com/ips/
Content-Type
The API data response will be via JSON.
application/json.
Timeout
Use the default timeout of 60 seconds. If you use a lower value, during API instability your request may be aborted before receiving the response, consuming credits.
Currently, the average query response time is 2 seconds.
Tokens
To make queries, you will need to generate the integration token. To do this, access the option API > Tokens
in your Control Panel.
After registration, your token will be generated to be inserted in the URL of the request.
Token for integration testing:
Token: 5ae973d7a997af13f0aaf2bf60e65803
ATTENTION! This token will return only fictitious data for integration testing.
Package IDs
In each request, you will need to inform the Package ID in the URL, here named as {pacote}.
To purchase the desired packages, access the Control Panel. Check them on our website.
|
ID
|
Package | Returned Data | Cost per Query (BRL) |
|---|---|---|---|
| 1 | CPF A |
|
R$ 0,15 BRL |
| 7 | CPF B |
|
R$ 0,22 BRL |
| 2 | CPF C |
|
R$ 0,25 BRL |
| 8 | CPF D |
Consultas em tempo real com a Receita Federal e resposta em 1 segundo! |
R$ 0,36 BRL |
| 9 | CPF E |
Consultas em tempo real com a Receita Federal e resposta em 1 segundo! |
R$ 0,47 BRL |
| 3 | CPF F |
|
R$ 1,20 BRL |
| 14 | CPF H |
Também retorna relacionados familiares. Clique aqui e leia nosso artigo para mais informações. ¹ Caso não seja uma PPE/PEP (ou relacionado), o retorno será |
R$ 0,20² BRL |
| 15 | CPF I |
Lista de CNPJs em que o titular faz parte do quadro societário. |
R$ 0,20 BRL |
| 17 | CPF J |
|
R$ 0,18 BRL |
| 18 | CPF K |
Apenas a Situação Cadastral em tempo real, sem comprovante. |
R$ 1,40 BRL |
| 21 | CPF Lookalike |
|
R$ 0,24 BRL |
| 20 | CPF Family |
|
R$ 1,00 BRL |
| 22 | CPF Programas Sociais |
|
R$ 0,15 BRL |
| 23 | CPF Antecedentes Criminais |
|
R$ 1,30 BRL |
| 24 | CPF CNS |
|
R$ 0,22 BRL |
| 26 | CPF D Simplificado |
|
R$ 0,33 BRL |
| 4 | CNPJ A |
/4/?razao_social=GOOGLE BRASIL |
R$ 0,13 BRL |
| 5 | CNPJ B |
|
R$ 0,24 BRL |
| 10 | CNPJ C |
|
R$ 0,32 BRL |
| 6 | CNPJ D |
|
R$ 0,45 BRL |
| 11 | CNPJ F |
|
R$ 0,30 BRL |
| 16 | CNPJ H |
|
R$ 0,15 BRL |
| 19 | CNPJ Lookalike |
Cobrança feita por cada sócio retornado. |
R$ 0,26 BRL |
| 25 | CNPJ QsA Detalhado |
|
R$ 2,00 BRL |
| 100 | NFe Unificada PF e PJ |
|
R$ 0,15 BRL |
Making Queries
In a few steps, we will explain how queries are made through the CPF.CNPJ API.
After generating the token, as per Introduction, you will need to build the request URL.
Definition
Endpoint that will contain the Token, Package ID and CPF or CNPJ number to be queried, respectively.
URL:https://api.cpfcnpj.com.br/{token}/{pacote}/{cpfcnpj}
Request Parameters
| Parameter | Type | Description | Required? |
|---|---|---|---|
| token | string | Token generated in the Control Panel. | |
| pacote | int | Package ID to be used, according to table. | |
| cpfcnpj | string | CPF number with 11 digits or CNPJ with 14 digits. |
URL Examples:
Query CPF in package CPF E: https://api.cpfcnpj.com.br/5ae973d7a997af13f0aaf2bf60e65803/9/00000000000
Query CNPJ in package CNPJ D: https://api.cpfcnpj.com.br/5ae973d7a997af13f0aaf2bf60e65803/6/27272134000118
Query company list by Business Name in package CNPJ D: https://api.cpfcnpj.com.br/5ae973d7a997af13f0aaf2bf60e65803/4?razao_social=GOOGLE BRASIL
Response Parameters
Check below the fields returned for CPFs and CNPJs.
Each query package has its own response parameters. Therefore, integrate accordingly.
CPF Responses
Main response object 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 with 14 digits. |
| nome | string | Full name of the holder (without accents). |
| nomeSocial | string | Social name, according to Decree No. 8.727/2016. |
| nascimento | string | Date of birth, format DD/MM/YYYY. |
| mae | string | Mother's full name (without accents). |
| genero | string | M (Male), F (Female) or O (Other). |
| situacao | string | Registration status: Regular, Cancelada, Suspensa, Pendente, Nula. |
| situacaoDigito | string | Status 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 | Registration date at the IRS (DD/MM/YYYY or text like "prior to ..."). |
| situacaoComprovante | string | Real-time certificate control code. |
| situacaoComprovanteEmissao | string | Date (DD/MM/YYYY HH:MM:SS) when the query was made at the Federal Revenue (realtime). |
| situacaoComprovantePdf | string | PDF of the query in base64. |
| endereco | string | Main residential address (street). |
| numero | string | Address number. |
| complemento | string | Address complement. |
| bairro | string | Neighborhood. |
| cep | string | Postal code. |
| cidade | string | City. |
| uf | string | State (2 letters). |
| enderecos | enderecos[] | List containing address history and also the most recent (same as outside this object). |
| telefones | telefones[] | List containing possible phone number history. |
| whatsapp[] | Based on the phone list, a real-time check is performed to identify which phone numbers are WhatsApp. | |
| emails | emails[] | List containing possible email history. |
| ppe | ppe[] | List of PEP positions, if a Politically Exposed Person. |
| relacionados | relacionados[] | List of related relatives who are PEP. |
| empresas | empresas[] | List containing CNPJ of companies in which the holder is part of the corporate structure. |
| programasSociais | programasSociais[] | List containing social programs in which the holder is a beneficiary in the current year. |
| pacoteUsado | int | Package ID used. |
| saldo | int | Package balance after the query. |
| consultaID | string | Query ID (16 digits). |
| delay | float | Total query time in seconds. |
PPE Array
Array ppe[] containing list of PEP positions:
| Parâmetro | Tipo | Descrição |
|---|---|---|
| sigla | string | Political position acronym. |
| funcao | string | Position function. |
| nivel | string | Political hierarchy level. |
| orgao | string | Acting agency. |
| inicioexercicio | string | Start date (DD/MM/YYYY). |
| fimexercicio | string | End of term date (DD/MM/YYYY). |
| fimcarencia | string | End of grace period date (DD/MM/YYYY). |
CNPJ Responses
Main response object that varies according to the package:
| Parâmetro | Tipo | Descrição |
|---|---|---|
| status | bool | 1 for success and 0 for failure (see error table). |
| cnpj | string | Formatted CNPJ (18 digits). |
| razao | string | Company business name. |
| fantasia | string | Company trade name. |
| inicioAtividade | string | Business start date (DD/MM/YYYY). |
| string | Company registration email. | |
| responsavel | string | Legal representative name (without accents). |
| responsavelCpf | string | Legal representative CPF. |
| simplesNacional | simplesNacional[] | Possible Simples Nacional enrollment data. |
| simei | simei[] | Possible SIMEI enrollment data. |
| matrizEndereco | matrizEndereco[] | Complete address object for the queried CNPJ. Note: The "matriz" name in this object does not specifically refer to the headquarters address of the queried CNPJ. |
| matrizfilial | matrizfilial[] | Competent authority data (headquarters/branch). |
| telefones | telefones[] | Company phones (up to 2). |
| fax | fax[] | Company fax. |
| situacao | situacao[] | Registration status at the Federal Revenue. |
| naturezaJuridica | naturezaJuridica[] | Legal nature data. |
| cnae | cnae[] | Main CNAE. |
| porte | porte[] | Company size data. |
| socios | socios[] | QSA: partners/administrators. |
| pacoteUsado | int | Package ID used. |
| saldo | int | Package balance after the query. |
| consultaID | string | Query ID (16 digits). |
| delay | float | Time to process the query (seconds). |
Objeto simplesNacional
Objeto simplesNacional[] contendo informações de Simples Nacional:
| Parâmetro | Tipo | Descrição |
|---|---|---|
| optante | string | Sim ou Não. |
| inicio | string | Data início (DD/MM/AAAA). |
| fim | string | Data fim (DD/MM/AAAA). |
Objeto simei
Objeto simei[] contendo informações de SIMEI:
| Parâmetro | Tipo | Descrição |
|---|---|---|
| optante | string | Sim ou Não. |
| anteriores | matriz | Objeto anteriores[] com registros anteriores. |
Objeto anteriores
| Parâmetro | Tipo | Descrição |
|---|---|---|
| inicio | string | Data início (DD/MM/AAAA). |
| fim | string | Data fim (DD/MM/AAAA). |
| detalhamento | string | Descrição do registro. |
Objeto matrizEndereco
| Parâmetro | Tipo | Descrição |
|---|---|---|
| cep | string | CEP com 9 dígitos. |
| tipo | string | Tipo de endereço (ex: Rua, Avenida etc.). |
| logradouro | string | Logradouro da empresa. |
| numero | string | Address number. |
| complemento | string | Address complement. |
| bairro | string | Neighborhood. |
| cidade | string | City. |
| uf | string | State (2 letters). |
Objeto matrizfilial
Informações sobre o órgão competente (matriz ou filial):
| Parâmetro | Tipo | Descrição |
|---|---|---|
| id | int | ID do órgão. |
| tipo | string |
Órgão:
id 1: Matrizid 2: Filial |
Array telefones
| Parâmetro | Tipo | Descrição |
|---|---|---|
| ddd | string | DDD do telefone. |
| numero | string | Número do telefone. |
Objeto fax
| Parâmetro | Tipo | Descrição |
|---|---|---|
| ddd | string | DDD do fax. |
| numero | string | Número do fax. |
Objeto situacao
| Parâmetro | Tipo | Descrição |
|---|---|---|
| id | int | ID da situação cadastral. |
| nome | string |
Nome da situação, por exemplo:
id 1: Baixadaid 2: Ativaid 3: Suspensaid 4: Inaptaid 8: Baixada |
| data | string | Data da situação (DD/MM/AAAA). |
Objeto naturezaJuridica
Objeto naturezaJuridica[] com dados da natureza jurídica.
Lista oficial
| Parâmetro | Tipo | Descrição |
|---|---|---|
| codigo | string | Código da natureza jurídica (4 dígitos). |
| descricao | string | Descrição da natureza jurídica. |
Objeto cnae
Objeto cnae[] com dados do CNAE principal.
Tabela CNAE
| Parâmetro | Tipo | Descrição |
|---|---|---|
| divisao | string | Código da divisão. |
| grupo | string | Código do grupo. |
| classe | string | Código da classe. |
| subClasse | string | Código da subclasse. |
| fiscal | string | Código completo do CNAE (somente números). |
| descricao | string | Descrição do CNAE. |
Objeto porte
Objeto porte[] contendo dados do porte da empresa.
| Parâmetro | Tipo | Descrição |
|---|---|---|
| id | string | ID do porte. |
| descricao | string |
Descrição do porte, por exemplo:
id 0: Demaisid 1: Matrizid 3: Demaisid 5: Demais |
Array socios
Objeto socios[] contendo dados do QSA:
| Parâmetro | Tipo | Descrição |
|---|---|---|
| cpf_cnpj_socio | string | CPF completo ou CNPJ do sócio. |
| nome | string | Nome do sócio PF ou Razão Social PJ. |
| tipo | string | Pessoa Física ou Pessoa Jurídica |
| data_entrada | string | Data de entrada na dociedade no formato DD/MM/YYYY. |
| cpf_representante_legal | string | CPF completo do Representante Legal quando sócio Pessoa Jurídica. |
| nome_representante | string | Nome do Representante Legal quando sócio Pessoa Jurídica. |
| faixa_etaria | string | Faixa etária do representante PF. |
| atualizado_em | datetime | Data e hora da última atualização das informações do sócio. |
| pais_id | string | ID do país de origem do sócio. |
| qualificacao_socio | objeto | Contendo id e descricao da qualificação do sócio. |
| qualificacao_representante | objeto | Contendo id e descricao da qualificação do representante PF em caso de sócio PJ. |
| pais | objeto | Contendo id, iso2, iso3, nome do país e comex_id do representante PF em caso de sócio PJ. |
Checking Balance
At no cost, check the balance of the desired package.
Definition
Endpoint that will contain the Token and Package IDsID, respectively.
URL:https://api.cpfcnpj.com.br/{token}/saldo/{pacote}
Request Parameters
| Parâmetro | Tipo | Descrição | Obrigatório? |
|---|---|---|---|
| token | string | Token gerado no Painel de Controle. | |
| pacote | int | ID do pacote (ver tabela). |
Response Parameters
Objeto pacote[] with balance information:
| Parâmetro | Tipo | Descrição |
|---|---|---|
| id | int | ID do pacote. |
| nome | string | Nome do pacote. |
| saldo | int | Saldo disponível. |
Error Codes
List of errors returned in parameters erro and erroCodigo:
erroCodigo |
Value | erro |
Description |
|---|---|---|---|
|
100
|
CPF | CPF inválido! | Entered number is not a valid CPF. |
|
101
|
CPF | Informe um CPF com 11 dígitos! | Entered CPF has less than 11 digits. |
|
102
|
CPF | O CPF informado não existe (...) | Valid CPF, but not found in Federal Revenue databases. |
|
200
|
CNPJ | CNPJ inválido! | Entered number is not a valid CNPJ. |
|
201
|
CNPJ | Informe um CNPJ com 14 dígitos! | Entered CNPJ has less than 14 digits. |
|
202
|
CNPJ | O CNPJ informado não existe (...) | Valid CNPJ, but not found in Federal Revenue databases. |
|
400
|
CPF/CNPJ | Incorrect parameters. | URI formatting is incorrect. Check the guidance in topic "Making Queries > Definition". |
|
1000
|
CPF/CNPJ | Token inválido! (...) | Token does not belong to the origin IP. |
|
1001
|
CPF/CNPJ | Créditos insuficientes! | No credits in selected package. |
|
1002
|
CPF/CNPJ | Conta suspensa e/ou inativa! | Contact support. |
|
1003
|
CPF/CNPJ | Blacklist até *DATA* | IP and Token temporarily suspended. |
|
1004
|
CPF/CNPJ | Pacote indisponível para consultas! | Invalid or unavailable package ID. |
|
1005
|
CPF/CNPJ | Não é possível consultar *CPF/CNPJ* neste pacote! | Supplier failure or internal error. |
|
1006
|
CPF/CNPJ | Supplier 2 offline. Contact us! | Data supplier offline. |
|
1007
|
CPF/CNPJ | Limite de requisições (20) por segundo excedido... | Maximum of 20 queries per second. |