Skip to main content

Endpoint

GET https://api.bunny.build/api/v1/cnpj-data/:cnpj

Authentication

HeaderRequiredValue
X-API-KeyYesYour API key (bun_...)

Overview

Look up any registered Brazilian company by its CNPJ. Bunny returns the legal name, trade name, registration status, founding date, legal nature, primary activity, address, and capital: everything you need to verify a business partner or pre-fill B2B forms.

Use cases

  • KYC and onboarding verification for B2B platforms
  • Pre-fill company registration forms
  • Validate supplier and partner CNPJs
  • Compliance and due diligence checks

Details

Pass the 14-digit CNPJ with or without formatting. Dots, slashes, and hyphens are stripped automatically. Inactive or suspended CNPJs are still returned with their status indicated.

Path parameters

ParameterTypeRequiredDescription
cnpjstringYesBrazilian company registration number (CNPJ), digits only (e.g. 11222333000181)

Response

200 OK

FieldTypeDescription
cnpjstringThe CNPJ that was looked up (digits only)
namestringLegal company name (razão social)
trade_namestring | nullTrade/fantasy name
statusstringRegistration status (e.g. ATIVA, BAIXADA)
status_datestringDate the current status was set (ISO 8601)
founded_atstringDate operations began (ISO 8601)
legal_naturestringLegal nature description
main_activitystringPrimary CNAE activity description
addressobjectAddress details (see fields below)
address.streetstringStreet name
address.numberstringStreet number
address.complementstring | nullUnit or complement
address.neighborhoodstringNeighborhood
address.citystringCity name
address.statestringState abbreviation (e.g. SP)
address.zipstringZIP code
emailstring | nullContact email on file
phonestring | nullContact phone (DDD + number)
sizestringCompany size category (e.g. PEQUENO PORTE)
capitalnumberShare capital in BRL
Example
{
  "cnpj": "11222333000181",
  "name": "EMPRESA EXEMPLO LTDA",
  "trade_name": "Empresa Exemplo",
  "status": "ATIVA",
  "status_date": "2010-05-20",
  "founded_at": "2010-05-20",
  "legal_nature": "206-2 - Sociedade Empresária Limitada",
  "main_activity": "Desenvolvimento de programas de computador sob encomenda",
  "address": {
    "street": "Rua das Flores",
    "number": "100",
    "complement": "Sala 1",
    "neighborhood": "Centro",
    "city": "São Paulo",
    "state": "SP",
    "zip": "01310100"
  },
  "email": "contato@empresaexemplo.com.br",
  "phone": "11 99999-0000",
  "size": "PEQUENO PORTE",
  "capital": 50000
}

401 Unauthorized

{
  "detail": "Missing API key. Include X-API-Key header."
}

402 Payment Required

{
  "detail": "Monthly quota exceeded. Upgrade your plan."
}

404 Not Found

CNPJ not found.
{
  "detail": "CNPJ not found"
}

422 Unprocessable Entity

Invalid CNPJ format.
{
  "detail": "Invalid CNPJ format"
}

429 Too Many Requests

{
  "detail": "Rate limit exceeded. Try again in 60 seconds."
}

cURL example

curl https://api.bunny.build/api/v1/cnpj-data/11222333000181 \
  -H "X-API-Key: bun_your_api_key"