# BR Data API – CNPJ Lookup

> BR Data API – CNPJ Lookup is a paid API for AI agents from brasil-data-x402.wagner-proc.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Fetches clean, normalized company registration data for a Brazilian CNPJ number, including legal name, status, address, and primary CNAE activity code.

## Facts

- Endpoint: GET https://brasil-data-x402.wagner-proc.workers.dev/v1/cnpj/%7Bcnpj%7D?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/br-data-api-cnpj-lookup-0df391cf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_N3sngheWQLe5xXAZV-1HV

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability br-data-api-cnpj-lookup-0df391cf
```

Example prompt: Can you look up CNPJ 19131243000197 and tell me the company's legal name, registration status, and registered city?

## When to prefer this

Use this endpoint when you need authoritative, normalized Brazilian company data by CNPJ without requiring an API key or account signup. It is ideal for AI agents and automated workflows that need pay-per-call access (via x402/USDC) to CNPJ lookups, especially for supplier validation, invoice verification, or CRM enrichment in Brazilian market contexts. Prefer this over web scraping Receita Federal directly, which is unreliable and unstructured.

## Known failure modes

- Invalid or malformed CNPJ returns an error response
- CNPJ not found in registry returns a 404 or empty result
- Payment not completed (HTTP 402) if USDC payment via x402 is not provided
- Rate limiting or upstream data source unavailability may cause transient failures
- CNPJ with special characters or formatting (dots/slashes) may need to be normalized to digits only before calling

## How this service works

Clean, normalized Brazilian public data (CNPJ, CEP, BCB rates, PTAX, holidays/business days, banks/ISPB) for AI agents. Paid endpoints use x402 (HTTP 402, USDC) — no signup or API key. Not affiliated with Receita Federal, Banco Central or Correios.

## Output

A JSON object containing the normalized CNPJ (digits only), the company's legal name, registration status description (e.g. ATIVA), address fields including state abbreviation (UF) and city, and the primary CNAE activity code.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "cnpj": "19131243000197",
  "status": {
   "description": "ATIVA"
  },
  "address": {
   "uf": "SP",
   "city": "SAO PAULO"
  },
  "legal_name": "OPEN KNOWLEDGE BRASIL",
  "main_activity": {
   "cnae": "9430800"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/br-data-api-cnpj-lookup-0df391cf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from brasil-data-x402.wagner-proc.workers.dev](https://www.zero.xyz/host/brasil-data-x402.wagner-proc.workers.dev/llms.txt)
