Actions24
- FIPE – Preço
- CEP (v1)
- CEP (v2)
- DDD → UF & cidades
- Banco por Código
- Câmbio – Cotação
- CNPJ
- Corretora por CNPJ
- Registro.br – Domínio
- Taxa por Sigla
- Feriados por Ano
- FIPE – Marcas
- FIPE – Veículos por Marca
- IBGE – UF por Código
- IBGE – Municípios
- NCM – Lista
- NCM por Código
- ISBN
- CPTEC – Buscar Cidade
- CPTEC – Clima Aeroporto
- CPTEC – Previsão 1 dia
- CPTEC – Previsão N dias
- CPTEC – Ondas 1 dia
- CPTEC – Ondas N dias
Overview
This node integrates with BrasilAPI, a public API providing various Brazilian data endpoints. It allows users to query diverse datasets such as postal codes (CEP), bank information, currency exchange rates, company registration data (CNPJ), vehicle pricing tables, geographic data from IBGE, and more.
The "NCM por Código" operation specifically retrieves detailed information about a Brazilian Mercosur Common Nomenclature (NCM) code, which is used for classifying goods in foreign trade. This is useful for businesses dealing with import/export, customs classification, tax calculations, or regulatory compliance.
Practical example:
A logistics company can input an NCM code to fetch its description and related details to ensure correct tariff application during international shipping.
Properties
| Name | Meaning |
|---|---|
| Código NCM | The specific NCM code to look up. Example: "33051000". Used to retrieve detailed info about this classification code. |
Output
- The output is a JSON object containing the data returned by BrasilAPI for the given NCM code.
- The structure typically includes fields describing the NCM code, such as its description, chapter, position, and other classification metadata.
- No binary data is output by this operation.
Example output snippet (simplified):
{
"codigo": "33051000",
"descricao": "Perfumes e águas-de-colônia",
"capitulo": "33",
"posicao": "3305"
}
Dependencies
- Requires internet access to call the BrasilAPI public endpoints.
- No authentication or API keys are needed since BrasilAPI is publicly accessible.
- Uses the HTTP client library internally to perform GET requests with a 10-second timeout.
Troubleshooting
- Timeouts or network errors: Ensure the n8n instance has internet connectivity and BrasilAPI is reachable.
- Unsupported operation error: Occurs if an invalid operation name is provided; verify that "ncmByCode" is correctly selected.
- Invalid or non-existent NCM code: The API may return an error or empty response if the code does not exist; validate the code before querying.
- Malformed input: Make sure the NCM code is a string of digits without extra characters.
Links and References
- BrasilAPI official documentation: https://brasilapi.com.br/docs
- NCM classification info (Brazilian government): https://www.gov.br/receitafederal/pt-br/assuntos/aduana-e-comercio-exterior/ncm
- n8n documentation on creating custom nodes: https://docs.n8n.io/integrations/creating-nodes/