Alphanumeric CNPJ Test Example
The CNPJ.ws API is already prepared. Adapt your application calmly using this example and you'll be ready when the first alphanumeric registrations start being issued, in July 2026.
Last updated
Was this helpful?
Was this helpful?
curl https://publica.cnpj.ws/cnpj/UKPVME1E8HI996async function lookupCNPJ(cnpj) {
const response = await fetch(`https://publica.cnpj.ws/cnpj/${cnpj}`);
const data = await response.json();
console.log(data);
}
lookupCNPJ("UKPVME1E8HI996");yarn add consultar-cnpj
# or
npm i consultar-cnpj --saveconst consultarCNPJ = require("consultar-cnpj");
async function getCNPJ() {
// The token is optional — without it, the Public API is used (3 requests/min)
const token = "ENTER YOUR ACCESS TOKEN";
try {
const company = await consultarCNPJ("UKPVME1E8HI996", token);
console.log(company);
} catch (e) {
console.log(e);
}
}
getCNPJ();