> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bunny.build/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /cnpj-data/:cnpj

> Look up any registered Brazilian company by CNPJ. Returns legal name, status, activity, address, and founding date in a single request.

## Endpoint

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

## Authentication

| Header      | Required | Value                    |
| ----------- | -------- | ------------------------ |
| `X-API-Key` | Yes      | Your 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

| Parameter | Type   | Required | Description                                                                       |
| --------- | ------ | -------- | --------------------------------------------------------------------------------- |
| `cnpj`    | string | Yes      | Brazilian company registration number (CNPJ), digits only (e.g. `11222333000181`) |

## Response

### 200 OK

| Field                  | Type           | Description                                   |
| ---------------------- | -------------- | --------------------------------------------- |
| `cnpj`                 | string         | The CNPJ that was looked up (digits only)     |
| `name`                 | string         | Legal company name (razão social)             |
| `trade_name`           | string \| null | Trade/fantasy name                            |
| `status`               | string         | Registration status (e.g. `ATIVA`, `BAIXADA`) |
| `status_date`          | string         | Date the current status was set (ISO 8601)    |
| `founded_at`           | string         | Date operations began (ISO 8601)              |
| `legal_nature`         | string         | Legal nature description                      |
| `main_activity`        | string         | Primary CNAE activity description             |
| `address`              | object         | Address details (see fields below)            |
| `address.street`       | string         | Street name                                   |
| `address.number`       | string         | Street number                                 |
| `address.complement`   | string \| null | Unit or complement                            |
| `address.neighborhood` | string         | Neighborhood                                  |
| `address.city`         | string         | City name                                     |
| `address.state`        | string         | State abbreviation (e.g. `SP`)                |
| `address.zip`          | string         | ZIP code                                      |
| `email`                | string \| null | Contact email on file                         |
| `phone`                | string \| null | Contact phone (DDD + number)                  |
| `size`                 | string         | Company size category (e.g. `PEQUENO PORTE`)  |
| `capital`              | number         | Share capital in BRL                          |

**Example**

```json theme={null}
{
  "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

```json theme={null}
{
  "detail": "Missing API key. Include X-API-Key header."
}
```

### 402 Payment Required

```json theme={null}
{
  "detail": "Monthly quota exceeded. Upgrade your plan."
}
```

### 404 Not Found

CNPJ not found.

```json theme={null}
{
  "detail": "CNPJ not found"
}
```

### 422 Unprocessable Entity

Invalid CNPJ format.

```json theme={null}
{
  "detail": "Invalid CNPJ format"
}
```

### 429 Too Many Requests

```json theme={null}
{
  "detail": "Rate limit exceeded. Try again in 60 seconds."
}
```

## cURL example

```bash theme={null}
curl https://api.bunny.build/api/v1/cnpj-data/11222333000181 \
  -H "X-API-Key: bun_your_api_key"
```
