# API de Dados de CNPJ (ReceitaWS)

> API de Dados de CNPJ (ReceitaWS) is a paid API for AI agents from protocolo-x40.onrender.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Looks up Brazilian company registration data by CNPJ number using ReceitaWS public data, gated by x402 micropayment.

## Facts

- Endpoint: POST https://protocolo-x40.onrender.com/cnpj/%7Bnumero%7D
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-de-dados-de-cnpj-receitaws-b5bcebb9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nhISaoj0z2nhZVX9nLmcF

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 api-de-dados-de-cnpj-receitaws-b5bcebb9 -d '<json body>'
```

Example prompt: Can you look up the public registration data for the Brazilian company with CNPJ 11.222.333/0001-81 — I need the registered name, address, status, and CNAE activity code.

## When to prefer this

Use this endpoint when you need to retrieve public Brazilian company registration data by CNPJ number, especially for supplier onboarding, invoice validation, KYB checks, or any workflow requiring Receita Federal data. It is well-suited for single CNPJ lookups with a low per-call cost ($0.05 USDC). Prefer this over scraping Receita Federal directly since it wraps ReceitaWS and handles the extraction for you.

## Known failure modes

- Invalid or malformed CNPJ number returns an error or empty result
- CNPJ not found in ReceitaWS database (e.g. very new or foreign entity)
- ReceitaWS rate limiting or upstream downtime causing 503/timeout
- x402 payment failure if USDC balance insufficient
- Render cold-start delay causing slow first response

## How this service works

Consulta de dados públicos de CNPJ via ReceitaWS com proteção x402.

## Output

Returns structured public registration data from the Brazilian Receita Federal via ReceitaWS, including the company's registered name (razão social), trade name (nome fantasia), CNPJ status (ativa/baixada/etc.), opening date, legal nature, primary and secondary CNAE activity codes, registered address (street, number, municipality, state, CEP), and listed partners/administrators.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-de-dados-de-cnpj-receitaws-b5bcebb9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from protocolo-x40.onrender.com](https://www.zero.xyz/host/protocolo-x40.onrender.com/llms.txt)
