/api/ncm/getLook up NCM
Returns one entry of the official NCM nomenclature by code, with the chain of descriptions from chapter to code, the rate taken from the IPI rate table, and the CEST codes the entry belongs to. The code may be sent with or without dots, as a full 8-digit code or as a chapter (2 digits), heading (4 digits) or intermediate level (5 to 7 digits). This endpoint is free of charge.
Required headers
tokenstring | string | Either an integrator token or a company token; no subscription is required. If the header is not sent, the token may also be placed in the token field of the body, but the signature is still computed with the header |
signstring | string | MD5 signature |
timestampstring | string | Unix timestamp in seconds |
Body
| Field | Type | Required | Description |
|---|---|---|---|
| ncm | string | Yes | 2, 4, 5, 6, 7 or 8 digits, e.g. "8517.13.00" or "85171300". Discontinued codes can also be queried; see vigencia_fim |
Only 8-digit codes may be written on an invoice line (valido_para_nota is true); levels of 2 to 7 digits are classification steps, useful for browsing and filtering but not valid on a document.
The official nomenclature carries codes, descriptions and validity dates only, never rates. ipi comes from the IPI rate table, and excecoes lists the exception rates under the same code; ipi is null when the code does not have 8 digits or is not in the rate table, and aliquota is null when nao_tributado is true (NT); cest comes from the tax substitution list, and appearing in that list means the goods fall within the scope where tax substitution may apply, while whether it actually applies depends on the agreement between the two states involved.
The descricao of a leaf is often a fragment such as "Outras", unreadable on its own. Prefer descricao_completa, or assemble the text from hierarquia.
The nomenclature is replaced whenever a new official act is published. Cache it by versao and resynchronise when that value changes.
Common errors
| Message | Cause |
|---|---|
| Informe o NCM com 2, 4, 5, 6, 7 ou 8 dígitos (ex.: 8471.30.19) / ... | ncm has an invalid number of digits after removing punctuation |
| NCM não encontrado na nomenclatura oficial / 官方名录中未找到该 NCM | The code is not in the nomenclature |
| Nomenclatura NCM ainda não carregada. Contate o suporte. / NCM 名录尚未加载,请联系技术支持 | The platform has not loaded the NCM nomenclature yet |
| Falha na consulta. Tente novamente mais tarde. / 查询失败,请稍后重试 | The platform query failed; retry later |
Examples
# sign = md5(token + path + body + timestamp) # Template generated from the endpoint path; replace the placeholders curl -X POST "https://api.tffiscal.com/api/ncm/get" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"ncm": "8517.13.00"
}
{
"success": true,
"message": "成功",
"data": {
"ncm": "85171300",
"codigo": "8517.13.00",
"descricao": "Telefones inteligentes (smartphones)",
"descricao_completa": "Máquinas, aparelhos e materiais elétricos, e suas partes; ... > Aparelhos telefônicos, incluindo os telefones inteligentes (smartphones) ... > Telefones inteligentes (smartphones)",
"nivel": 8,
"capitulo": "85",
"posicao": "8517",
"valido_para_nota": true,
"vigencia_inicio": "2022-04-01",
"vigencia_fim": "",
"ato": "Res Gecex 272/2021",
"ato_fim": "",
"hierarquia": [
{ "ncm": "85", "codigo": "85", "descricao": "Máquinas, aparelhos e materiais elétricos, e suas partes; ..." },
{ "ncm": "8517", "codigo": "85.17", "descricao": "Aparelhos telefônicos, incluindo os telefones inteligentes (smartphones) ..." },
{ "ncm": "85171", "codigo": "8517.1", "descricao": "Aparelhos telefônicos, incluindo os telefones inteligentes (smartphones) e outros telefones para redes celulares ou para outras redes sem fio" },
{ "ncm": "85171300", "codigo": "8517.13.00", "descricao": "Telefones inteligentes (smartphones)" }
],
"ipi": {
"aliquota": 15,
"nao_tributado": false,
"descricao": "Telefones inteligentes (smartphones)",
"versao": "Ato Declaratório Executivo RFB nº 1, de 30 de janeiro de 2026",
"excecoes": []
},
"cest": [
{ "cest": "21.110.00", "anexo": "XX", "item": "110.0", "descricao": "Aparelhos elétricos para telefonia; outros aparelhos para transmissão ...", "escala_nao_relevante": false },
{ "cest": "21.111.00", "anexo": "XX", "item": "111.0", "descricao": "Interfones, seus acessórios, tomadas e plugs", "escala_nao_relevante": false }
],
"consta_lista_st": true,
"versao": "Resolução Gecex nº 926/2026 (Vigente em 11/09/2026)",
"fonte": "Portal Único de Comércio Exterior / Nomenclatura Comum do Mercosul",
"atualizado_em": "2026-09-11 09:12:33"
}
}