Brasil API icon

Brasil API

Consulta endpoints públicos da BrasilAPI

Overview

This node integrates with BrasilAPI, a public API providing various Brazilian data endpoints. Specifically for the CNPJ operation, it fetches detailed information about a Brazilian company based on its CNPJ number (Cadastro Nacional da Pessoa Jurídica), which is the national registry identifier for legal entities in Brazil.

Common scenarios where this node is useful include:

  • Validating and enriching company data during onboarding or KYC processes.
  • Automating business intelligence workflows by retrieving official company details.
  • Integrating with CRM or ERP systems to keep company records up-to-date.

For example, given a CNPJ number, the node will return comprehensive company information such as name, address, status, and other registration details from the official public database.

Properties

Name Meaning
CNPJ The unique identifier number of a Brazilian company (Cadastro Nacional da Pessoa Jurídica). This string input should be a valid CNPJ number without formatting characters.

Output

The node outputs a JSON object containing the full response from the BrasilAPI endpoint for the given CNPJ. This typically includes:

  • Company identification details (e.g., name, trade name).
  • Registration status and dates.
  • Address information.
  • Contact details.
  • Activity codes and descriptions.

The exact structure depends on the API response but generally mirrors the official public registry data for the specified CNPJ.

No binary data output is produced by this node.

Dependencies

  • Requires internet access to call the BrasilAPI public endpoints at https://brasilapi.com.br/api.
  • No authentication or API keys are needed since the API is public.
  • Uses the HTTP client library internally to perform GET requests with a 10-second timeout.

Troubleshooting

  • Invalid CNPJ format: If the provided CNPJ is malformed or invalid, the API may return an error or empty result. Ensure the CNPJ is correctly formatted (only digits, no punctuation).
  • Network issues or timeouts: The node has a 10-second request timeout. Network instability or slow responses from BrasilAPI can cause errors. Retry or check network connectivity.
  • Unsupported operation error: This node only supports operations defined by the BrasilAPI. Using an unsupported operation value will throw an error.
  • Empty or missing data: If the CNPJ does not exist in the registry, the API might return an empty object or error. Verify the CNPJ is active and registered.

Links and References

Discussion