BrasilAPI (CNPJ, CEP, validation, holidays)
v0.1.0Brazilian public data via BrasilAPI: CNPJ and partners, CEP, CNPJ/CPF validation, holidays
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
lookup_cnpj Look up a company by CNPJ
Public registry data for a Brazilian company (Receita Federal, via BrasilAPI): legal name, registration status, main activity, address, size, tax regime and partners (QSA). Accepts a CNPJ with or without punctuation, including the alphanumeric format. Partner CPFs come masked by the registry. Use it to check that a company exists and is active.
| Parameter | Type | Description |
|---|---|---|
cnpj * | string | CNPJ, for example "00.000.000/0001-91" or "00000000000191" |
include_partners | boolean | Include the partners list (default true); false keeps the answer short |
validate_cnpj Validate a CNPJ offline
Checks the format and the check digits of a CNPJ (numeric or alphanumeric) without any network call. A valid number is not proof that the company exists: use lookup_cnpj for that.
| Parameter | Type | Description |
|---|---|---|
cnpj * | string | CNPJ with or without punctuation |
validate_cpf Validate a CPF offline
Checks the format and the check digits of a CPF without any network call. The number is not stored or sent anywhere.
| Parameter | Type | Description |
|---|---|---|
cpf * | string | CPF, for example "529.982.247-25" |
lookup_cep Look up an address by CEP
Street, neighborhood, city, state, IBGE city code and coordinates for a Brazilian postal code (CEP), via BrasilAPI.
| Parameter | Type | Description |
|---|---|---|
cep * | string | CEP, for example "01001-000" or "01001000" |
list_holidays List Brazilian national holidays
National holidays of a year with their dates and weekdays, via BrasilAPI. Useful for business-day and deadline calculations.
| Parameter | Type | Description |
|---|---|---|
year * | integer | Four-digit year, for example 2026 |