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, the "NCM – Lista" operation allows users to search and retrieve lists of NCM (Nomenclatura Comum do Mercosul) codes, which are standardized codes used for classifying goods in international trade.

Common scenarios for this node include:

  • Automating product classification workflows by fetching NCM codes based on search terms.
  • Enriching datasets with official NCM information for compliance or reporting.
  • Integrating NCM lookups into larger automation processes involving customs, logistics, or taxation.

For example, a user can input a partial product description to find matching NCM codes, facilitating accurate tariff classification.

Properties

Name Meaning
Buscar (NCM) A string to search/filter NCM codes by keyword or partial match.
Extra Query (JSON) Optional JSON object with additional key-value filters to refine the query results.

Output

The node outputs an array of JSON objects representing the NCM data retrieved from BrasilAPI. Each item corresponds to an NCM entry matching the search criteria or all entries if no search term is provided.

The output structure typically includes fields such as:

  • NCM code
  • Description
  • Additional metadata related to the NCM classification

No binary data is produced by this operation.

Dependencies

  • The node requires internet access to call the BrasilAPI endpoints at https://brasilapi.com.br/api.
  • No authentication or API keys are needed since BrasilAPI is a public service.
  • Network timeout is set to 10 seconds per request.

Troubleshooting

  • Timeouts or network errors: Ensure the n8n instance has internet connectivity and that BrasilAPI is reachable.
  • Unsupported operation error: This occurs if an invalid operation name is specified; verify that "ncmList" is selected.
  • Invalid JSON in Extra Query: If the Extra Query property contains malformed JSON, the request may fail. Validate JSON syntax before use.
  • Empty results: If the search term does not match any NCM codes, the output will be empty. Try broadening the search or removing filters.

Links and References

Discussion