Brazil Receita WS API

Free to Use 3 per window (2 remaining at test time)
72 B
Measured Score 0 50 100 Speed 17/30 Consistency 20/20 Security 20/20 Browser access 0/15 Transparency 15/15 TESTED 2026-08-10

Overview

Brazil Receita WS lets you look up official information about Brazilian companies using their CNPJ (tax registration number). You get data like company name, address, status, and registration details from Brazil s federal revenue authority. No API key is required for basic lookups, making it easy to get started.

Beginner Tip

The CNPJ must be exactly 14 digits with no dots, slashes, or dashes; strip all formatting before sending the request.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://www.receitaws.com.br/v1/cnpj/27865757000102
Result
HTTP 200 · application/json · 5,093 bytes · compressed
Response time
226 ms (median of 3) · fastest 221 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
Browser CORS
No Access-Control-Allow-Origin header — call it from a server, not the browser
Rate limit
3 per window (2 remaining at test time)
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
abertura string 31/01/1986
situacao string ATIVA
tipo string MATRIZ
nome string GLOBO COMUNICACAO E PARTICIPACOES S/A
fantasia string TV/REDE/GLOBO.COM/CANAIS GLOBO/GLOBOPLAY/ELET…
porte string DEMAIS
natureza_juridica string 205-4 - Sociedade Anônima Fechada
atividade_principal array [1 item]
atividades_secundarias array [1 item]
qsa array [1 item]
logradouro string R LOPES QUINTAS
numero string 303
municipio string RIO DE JANEIRO
bairro string JARDIM BOTANICO

Captured Response

Captured from a real request to https://www.receitaws.com.br/v1/cnpj/27865757000102 on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "abertura": "31/01/1986",
  "situacao": "ATIVA",
  "tipo": "MATRIZ",
  "nome": "GLOBO COMUNICACAO E PARTICIPACOES S/A",
  "fantasia": "TV/REDE/GLOBO.COM/CANAIS GLOBO/GLOBOPLAY/ELETROMIDIA",
  "porte": "DEMAIS",
  "natureza_juridica": "205-4 - Sociedade Anônima Fechada",
  "atividade_principal": [
    {
      "code": "60.21-7-00",
      "text": "Atividades de televisão aberta"
    }
  ],
  "atividades_secundarias": [
    {
      "code": "47.52-1-00",
      "text": "Comércio varejista especializado de equipamentos de telefonia e comunicação"
    }
  ],
  "qsa": [
    {
      "nome": "PAULO DAUDT MARINHO",
      "qual": "10-Diretor"
    }
  ],
  "logradouro": "R LOPES QUINTAS",
  "numero": "303",
  "municipio": "RIO DE JANEIRO",
  "bairro": "JARDIM BOTANICO",
  "…": "(18 more fields)"
}

Field Reference

nome Official registered name of the company
fantasia Trade name or brand name of the company, if different from the registered name
situacao Current registration status of the company (e.g. ATIVA means active)
municipio City where the company is registered

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://www.receitaws.com.br/v1/cnpj/27865757000102";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist text/html

Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

Too Many Requests (429) The free tier only allows one request per minute per IP
Add a delay of at least 60 seconds between requests on the free plan, or consider a paid plan for higher throughput
CNPJ invalido (invalid CNPJ) The CNPJ number failed the checksum validation before being queried
Validate the CNPJ format—14 digits, no punctuation—and use a CNPJ validator library to catch typos early
404 Not Found The CNPJ does not match any registered company in the Receita Federal database
Verify the CNPJ number directly on the official Receita Federal website to confirm it exists

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 17/30
Consistency 20/20
Security 20/20
Browser access 0/15
Transparency 15/15
Endpoint Response Time 226ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Government
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →