# Brazilayer CNPJ Company Search

> Brazilayer CNPJ Company Search is a paid API for AI agents from api.brazilayer.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Search and filter Brazilian companies in the official Receita Federal CNPJ registry by name, state, city, activity code, size, or status

## Facts

- Endpoint: GET https://api.brazilayer.com/v1/cnpj/busca
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brazilayer-cnpj-company-search-56a8dbae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_g7SdJWZ-C9CZQRjzv0HtD

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 brazilayer-cnpj-company-search-56a8dbae
```

Example prompt: Search the Brazilian CNPJ registry for active micro-empresas in São Paulo (SP) that have 'farmácia' in their name, using CNAE code 4771701, and show me the first 20 results.

## When to prefer this

Use this endpoint when you need to search or filter multiple Brazilian companies by various criteria (name, location, activity, size, status) and get a paginated list of results. Prefer this over the single-CNPJ lookup endpoint when you don't know the exact CNPJ number, or when you need to find multiple companies matching a profile. Use the partner/shareholder reverse-lookup endpoint instead if you need to find companies by a specific person's involvement.

## Known failure modes

- No filters provided — at least one filter (nome, uf, municipio, cnae, porte, or situacao) is required
- Invalid state code (uf) — must be a valid 2-letter Brazilian state abbreviation
- Invalid municipio — must be a 4-digit RFB city code
- Invalid CNAE — must be a 7-digit activity code
- Invalid porte value — must be micro_empresa, pequeno_porte, or demais
- Invalid situacao value — must be ativa, baixada, suspensa, inapta, or nula
- Page size exceeds maximum of 50
- Payment failure — $0.01 USDC per call via x402 protocol required

## How this service works

Search Brazilian companies in the official Receita Federal CNPJ registry. Filters (at least one required): nome (full-text on names, accent-insensitive), uf (state), municipio (4-digit RFB code), cnae, porte (size), abertura_de/abertura_ate (opening-date window YYYY-MM-DD, for newly registered companies), situacao (default "ativa"). Paginated; total capped at "10000+". Free sample, no payment: https://api.brazilayer.com/v1/cnpj/amostra

## Output

A paginated list of Brazilian companies matching the specified filters, including each company's legal name, trade name, CNPJ, registration status, company size, CNAE activity code, state, and municipality. Total result count is capped at '10000+' when results exceed 10,000.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "uf": {
       "type": "string",
       "description": "2-letter Brazilian state code, e.g. SP"
      },
      "cnae": {
       "type": "string",
       "description": "7-digit CNAE activity code"
      },
      "nome": {
       "type": "string",
       "description": "full-text search on company names"
      },
      "porte": {
       "type": "string",
       "description": "company size: micro_empresa | pequeno_porte | demais"
      },
      "pagina": {
       "type": "integer",
       "description": "page number, default 1"
      },
      "situacao": {
       "type": "string",
       "description": "registration status: ativa (default) | baixada | suspensa | inapta | nula"
      },
      "municipio": {
       "type": "string",
       "description": "4-digit RFB city code"
      },
      "por_pagina": {
       "type": "integer",
       "description": "page size, default 20, max 50"
      },
      "abertura_de": {
       "type": "string",
       "description": "opening date from (YYYY-MM-DD) — newly registered companies"
      },
      "abertura_ate": {
       "type": "string",
       "description": "opening date to (YYYY-MM-DD)"
      },
      "com_investidor": {
       "type": "boolean",
       "description": "only companies with a VC/PE fund in the ownership structure — a public proxy for venture-backed startups"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brazilayer-cnpj-company-search-56a8dbae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.brazilayer.com](https://www.zero.xyz/host/api.brazilayer.com/llms.txt)
