Brazil NF-e Invoice Lookup API by Access Key

Turn a 44-digit access key into the full electronic invoice XML and a DANFE PDF, with no digital certificate and no SEFAZ login.

JSON CSV XLSX XML

No Apify account? Sign up for free.

How to integrate

curl -X POST "https://api.apify.com/v2/actors/brasildados~api-consulta-nfe-por-chave/run-sync-get-dataset-items" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"chaves":["NFe35260444823938000187551090000002691092067649","3526 0444 8239 3800 0187 5510 9000 0002 6910 9206 7649"]}'
Sample response (Brazilian registry field names)
{
  "chave": "35260444823938000187551090000002691092067649",
  "encontrado": true,
  "consultadoEm": "2026-09-09T11:49:23.456Z",
  "referenciaConsulta": "bd-af03c0f94e82",
  "dados": {
    "identificacao": {
      "chave": "35260444823938000187551090000002691092067649",
      "modelo": "55",
      "serie": "109",
      "numero": "269",
      "naturezaOperacao": "VENDA",
      "dataEmissao": "2026-04-15T18:26:21-03:00",
      "dataSaidaEntrada": "2026-04-15T18:26:21-03:00",
      "tipoOperacao": "saída",
      "finalidade": "normal",
      "consumidorFinal": "sim",
      "presencaComprador": "presencial",
      "ambiente": "produção",
      "digitoVerificador": "9"
    },
    "emitente": {
      "cnpjCpf": "44823938000187",
      "razaoSocial": "PRODUTOS ALIMENTICIOS CORNETA LTDA - EPP",
      "nomeFantasia": "PADARIA CORNETA",
      "inscricaoEstadual": "637029531117",
      "indicadorIE": null,
      "email": null,
      "regimeTributario": "Regime Normal",
      "endereco": {
        "logradouro": "RUA ANANIAS E EVANGELISTA DE TOLETO",
        "numero": "869",
        "complemento": null,
        "bairro": "VILA PRADO",
        "codigoMunicipio": "3548906",
        "municipio": "Sao Carlos",
        "uf": "SP",
        "cep": "13574280",
        "pais": "BRASIL",
        "telefone": "1633721103"
      }
    },
    "destinatario": {
      "cnpjCpf": "12345678000195",
      "razaoSocial": "MERCEARIA MODELO LTDA ME",
      "nomeFantasia": null,
      "inscricaoEstadual": "637160318112",
      "indicadorIE": "1",
      "email": null,
      "regimeTributario": null,
      "endereco": {
        "logradouro": "PASSEIO DOS FLAMBOYANTS",
        "numero": "200",
        "complemento": "LJ 17B, 18B E19B PISO TERREO SHOPPING",
        "bairro": "PARQUE FABER",
        "codigoMunicipio": "3548906",
        "municipio": "SAO CARLOS",
        "uf": "SP",
        "cep": "13561352",
        "pais": "BRASIL",
        "telefone": null
      }
    },
    "itens": [
      {
        "numero": 1,
        "codigo": "1900",
        "codigoBarras": null,
        "descricao": "TORRADA TEMP. ATACADO",
        "ncm": "19054000",
        "cest": "1705900",
        "cfop": "5102",
        "unidadeComercial": "KG",
        "quantidade": 1.306,
        "valorUnitario": 29.5,
        "valorTotal": 38.53,
        "valorFrete": null,
        "valorDesconto": null,
        "valorOutros": null,
        "impostos": {
          "icms": {
            "origem": "0",
            "cst": "00",
            "csosn": null,
            "baseCalculo": 38.53,
            "aliquota": 3.2,
            "valor": 1.23,
            "percentualReducao": null,
            "baseCalculoST": null,
            "aliquotaST": null,
            "valorST": null
          },
          "ipi": null,
          "pis": {
            "origem": null,
            "cst": "49",
            "csosn": null,
            "baseCalculo": 0,
            "aliquota": 0,
            "valor": 0,
            "percentualReducao": null,
            "baseCalculoST": null,
            "aliquotaST": null,
            "valorST": null
          },
          "cofins": {
            "origem": null,
            "cst": "49",
            "csosn": null,
            "baseCalculo": 0,
            "aliquota": 0,
            "valor": 0,
            "percentualReducao": null,
            "baseCalculoST": null,
            "aliquotaST": null,
            "valorST": null
          }
        }
      },
      {
        "numero": 2,
        "codigo": "1900",
        "codigoBarras": null,
        "descricao": "TORRADA TEMP. ATACADO",
        "ncm": "19054000",
        "cest": "1705900",
        "cfop": "5102",
        "unidadeComercial": "KG",
        "quantidade": 1.846,
        "valorUnitario": 29.5,
        "valorTotal": 54.46,
        "valorFrete": null,
        "valorDesconto": null,
        "valorOutros": null,
        "impostos": {
          "icms": {
            "origem": "0",
            "cst": "00",
            "csosn": null,
            "baseCalculo": 54.46,
            "aliquota": 3.2,
            "valor": 1.74,
            "percentualReducao": null,
            "baseCalculoST": null,
            "aliquotaST": null,
            "valorST": null
          },
          "ipi": null,
          "pis": {
            "origem": null,
            "cst": "49",
            "csosn": null,
            "baseCalculo": 0,
            "aliquota": 0,
            "valor": 0,
            "percentualReducao": null,
            "baseCalculoST": null,
            "aliquotaST": null,
            "valorST": null
          },
          "cofins": {
            "origem": null,
            "cst": "49",
            "csosn": null,
            "baseCalculo": 0,
            "aliquota": 0,
            "valor": 0,
            "percentualReducao": null,
            "baseCalculoST": null,
            "aliquotaST": null,
            "valorST": null
          }
        }
      }
    ],
    "totais": {
      "baseCalculoICMS": 132.52,
      "valorICMS": 4.23,
      "valorICMSST": 0,
      "valorProdutos": 132.52,
      "valorFrete": 0,
      "valorSeguro": 0,
      "valorDesconto": 0,
      "valorIPI": 0,
      "valorPIS": 0,
      "valorCOFINS": 0,
      "valorOutros": 0,
      "valorTotalNota": 132.52,
      "valorTributosAproximado": 4.23
    },
    "transporte": {
      "modalidadeFrete": "sem frete",
      "transportadora": null,
      "volumes": []
    },
    "pagamento": [
      {
        "forma": "crédito loja",
        "valor": 132.52
      }
    ],
    "informacoesAdicionais": {
      "fisco": null,
      "complementares": "<lf>; CP:9206764 OP:000266<lf> ID:5263C6D21A58459E8E45D51C05B6D027"
    },
    "protocolo": {
      "numero": "135261438676180",
      "dataAutorizacao": "2026-04-15T18:26:20-03:00",
      "status": "100",
      "motivo": "Autorizado o uso da NF-e",
      "ambiente": null,
      "situacao": "autorizada"
    }
  },
  "xml": {
    "name": "NFE-35260444823938000187551090000002691092067649.xml",
    "type": "NFE",
    "format": "XML",
    "data": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><nfeProc versao=\"4.00\" xmlns=\"http://www.portalfiscal.inf.br/nfe\"><protNFe><infProt><nProt>135261438676180</nProt><digVal>97+X6Dr4Dj/ojeOOUje1g/D8htY=</digVal><dhRecbto>2026-04-15T18:26:20-03:00</dhR..."
  },
  "xmlUrl": "https://api.apify.com/v2/key-value-stores/*****/records/xml-35260444823938000187551090000002691092067649?signature=*****",
  "danfeUrl": "https://api.apify.com/v2/key-value-stores/*****/records/danfe-35260444823938000187551090000002691092067649?signature=*****",
  "erro": null
}

What the Brazil NF-e invoice lookup API returns

  • Full NF-e XML (nfeProc 4.00 layout)

  • Direct download link for the XML

  • Direct download link for the DANFE PDF

  • Issuer, recipient, line items and taxes as structured JSON

  • Authorization protocol and status code

  • Lookup status: key, found flag and timestamp

Brazil NF-e invoice lookup API use cases

Retrieving supplier invoices for accounting and tax filings

Importing NF-e XML into an ERP

Checking an invoice before receiving goods or paying a supplier

Reconciling invoices in AP and logistics workflows

Brazil NF-e invoice lookup API FAQ

What is an NF-e in Brazil?

NF-e (Nota Fiscal Eletrônica) is Brazil's mandatory electronic invoice for goods. Every NF-e is an XML document authorized by the state tax authority (SEFAZ) and identified by a 44-digit access key. The DANFE is its printable PDF version.

How do I download an NF-e XML from the access key?

Send the 44-digit key in the chaves list. The API returns a link to the full XML, a link to the DANFE PDF and the main fields parsed as JSON. Keys can include spaces or the NFe prefix; they are cleaned before the lookup.

Do I need a digital certificate to query NF-e invoices?

No. The official SEFAZ services usually require a company digital certificate, but this API only needs the access key printed on the DANFE, in the XML or in the invoice QR code.

Can I look up NF-e invoices in bulk?

Yes. Send up to 50 access keys per run; they are processed in parallel. For larger volumes, split the list across several runs or schedule them.

Where is the access key on a Brazilian invoice?

It is the 44-digit number printed on the DANFE, usually above or below the barcode, grouped in blocks of four. The same key appears in the XML file name and in the invoice QR code.

More Brazilian data APIs

Brazilian Vehicle License Plate Lookup API

Send a Brazilian plate and get the vehicle record: RENAVAM, chassis number, make, model and the risk flags that matter before a purchase.

View details

Brazil Tax Debtors API: PGFN Federal Debt Check by Tax ID

Find out whether a Brazilian company owes federal debt and how much, before extending credit or signing a contract.

View details

Brazil Company Leads API by CNAE Industry Code

Build B2B prospect lists of active Brazilian companies by industry, state and company size, straight from the official Tax ID registry.

View details