CNPJ
Consulta de CNPJ
Razão social, situação cadastral, endereço, CNAE e quadro societário a partir de um CNPJ, direto da Receita Federal.
CNPJ lookup
Legal name, registration status, address, business activity and partners from a Brazilian company registry number (CNPJ), straight from the Federal Revenue.
SYNC resposta na mesma chamada answers in the same call
Endpoints
Endpoints
/api/v1/cnpj/{cnpj}
busca os dados cadastrais de um CNPJ
looks up a CNPJ's registration data
Parâmetros
Parameters
| Nome | Name | Onde | In | Descrição | Description |
|---|---|---|---|---|---|
cnpj |
path | 14 dígitos, com ou sem pontuação (33683111000280 ou 33.683.111/0002-80), precisa passar no dígito verificador oficial, não é só checagem de tamanho |
14 digits, with or without punctuation (33683111000280 or 33.683.111/0002-80), must pass the official check-digit algorithm, not just a length check |
Exemplo
Example
curl https://api.alicercelabs.com.br/api/v1/cnpj/33683111000280 \
-H "Authorization: Bearer <token>"
{
"success": true,
"data": {
"cnpj": "33683111000280",
"matriz": false,
"razao_social": "SERVICO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO)",
"nome_fantasia": "REGIONAL BRASILIA-DF",
"situacao_cadastral": 2,
"descricao_situacao_cadastral": "ATIVA",
"data_inicio_atividade": "1967-06-30",
"natureza_juridica": "Empresa Pública",
"porte": "DEMAIS",
"capital_social": 1786196100,
"cnae_fiscal": { "codigo": 6204000, "descricao": "Consultoria em tecnologia da informação" },
"cnaes_secundarios": [
{ "codigo": 6201501, "descricao": "Desenvolvimento de programas de computador sob encomenda" }
],
"endereco": {
"logradouro": "L2 SGAN", "numero": "601", "bairro": "Asa Norte",
"cep": "70836900", "municipio": "Brasília", "uf": "DF"
},
"opcao_pelo_simples": false,
"opcao_pelo_mei": false,
"qsa": [
{ "nome": "FULANO DE TAL", "qualificacao": "Diretor", "cpf_cnpj_mascarado": "***641988**" }
]
},
"meta": { "elapsed_ms": 3, "request_id": "..." }
}
Erros possíveis
Possible errors
| Status | Motivo | Reason |
|---|---|---|
| 400 | CNPJ inválido: os 14 dígitos não passam no dígito verificador oficial | invalid CNPJ: the 14 digits don't pass the official check-digit algorithm |
| 401 | token ausente ou inválido | missing or invalid token |
| 404 | CNPJ não encontrado | CNPJ not found |
| 429 | limite de taxa excedido | rate limit exceeded |
| 503 | dado indisponível no momento | data temporarily unavailable |
Usando o SDK
Using the SDK
SDKs oficiais: Go · Python · JavaScript.
Official SDKs: Go · Python · JavaScript.
Buscar empresa por CNPJ
Look up a company by CNPJ
import (
"context"
"fmt"
alicercelabs "github.com/alicercelabs/alicercesdk-go"
)
client := alicercelabs.New("alk_...")
ctx := context.Background()
empresa, err := client.CNPJ.Get(ctx, "33683111000280")
if err != nil {
panic(err)
}
fmt.Println(empresa.RazaoSocial, empresa.DescricaoSituacaoCadastral)from alicercelabs import AlicerceLabs
client = AlicerceLabs(api_key="alk_...")
empresa = client.cnpj.get("33683111000280")
print(empresa["razao_social"], empresa["descricao_situacao_cadastral"])import { AlicerceLabs } from "alicercesdk-javascript";
const client = new AlicerceLabs("alk_...");
const empresa = await client.cnpj.get("33683111000280");
console.log(empresa.razao_social, empresa.descricao_situacao_cadastral);Limites
Limits
100/dia · 4/hora sem token, por IP chamador; com uma API key (gerada no painel), 1.000/dia · 41/hora. Resposta em cache por 24h. Chamadas repetidas pro mesmo CNPJ dentro desse período respondem direto do cache.
100/day · 4/hour without a token, per calling IP; with an API key (generated in the panel), 1,000/day · 41/hour. Response cached for 24h. Repeated calls for the same CNPJ within that window are answered straight from cache.