/api/ncm/listNCM list (paginated)
Returns the official NCM nomenclature page by page. The result can be narrowed to a subtree by code prefix, searched by keyword, or limited to the 8-digit codes that may be used on an invoice. Filters travel in the JSON request body; all of them are optional and combinable, and an empty body ({}) returns the whole nomenclature (over fifteen thousand entries) one page at a time. Entries always come in ascending code order. 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 |
|---|---|---|---|
| page | int | No | Page number, starting at 1; defaults to 1. A value below 1 returns an error |
| page_ | int | No | Entries per page; defaults to 50, from 1 to 200; a value outside this range returns an error |
| prefixo | string | No | Code prefix restricting the result to one subtree: 2, 4, 5, 6, 7 or 8 digits. "8517", for instance, returns every code under that heading |
| termo | string | No | Keyword matched against the full description; at least 2 characters. The match runs over the whole chain, so when the word appears in a parent title the entire subtree is returned; narrow it with prefixo or somente_folhas |
| somente_ | string | No | Send "1" ("true", "sim", "yes", "s" and "y" are also accepted, here and below) to return only 8-digit codes, the sole level accepted on an invoice line |
| incluir_ | string | No | Send "1" to include codes already revoked; by default only codes in force are returned |
| incluir_ | string | No | Send "0" to omit ipi, cest and consta_lista_st for a smaller response; included by default |
| incluir_ | string | No | Send "0" to omit hierarquia for a smaller response; included by default |
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 |
|---|---|
| Prefixo inválido. Use 2, 4, 5, 6, 7 ou 8 dígitos / ... | prefixo has an invalid number of digits after removing punctuation |
| O termo de busca precisa de pelo menos 2 caracteres / ... | termo has only 1 character |
| Página inválida / 页码无效 | page is less than 1 |
| page_size deve ficar entre 1 e 200 / ... | page_size is out of range |
| 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/list" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"prefixo": "8517",
"somente_folhas": "1",
"page": 1,
"page_size": 50
}
{
"success": true,
"message": "成功",
"data": {
"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",
"total": 33,
"page": 1,
"page_size": 50,
"pages": 1,
"items": [
{
"ncm": "85171300",
"codigo": "8517.13.00",
"descricao": "Telefones inteligentes (smartphones)",
"descricao_completa": "Máquinas, aparelhos e materiais elétricos, e suas partes; ... > 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": [ ... ],
"ipi": { "aliquota": 15, "nao_tributado": false, "excecoes": [] },
"cest": [ { "cest": "21.110.00", "anexo": "XX", "item": "110.0", "escala_nao_relevante": false } ],
"consta_lista_st": true
}
]
}
}