LatAm E-Invoice Parser: DIAN, CFDI 4.0 and NF-e to JSON avatar

LatAm E-Invoice Parser: DIAN, CFDI 4.0 and NF-e to JSON

Pricing

$5.00 / 1,000 parsed documents

Go to Apify Store
LatAm E-Invoice Parser: DIAN, CFDI 4.0 and NF-e to JSON

LatAm E-Invoice Parser: DIAN, CFDI 4.0 and NF-e to JSON

Turn Latin American electronic invoice XML (Colombia DIAN UBL 2.1 and AttachedDocument, Mexico CFDI 3.3/4.0 with Pagos 2.0, Brazil NF-e 4.00) into clean, normalized JSON with totals, taxes, withholdings, line items and validation status. Accepts XML or ZIP URLs and raw XML.

Pricing

$5.00 / 1,000 parsed documents

Rating

0.0

(0)

Developer

Ceiba Data

Ceiba Data

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Security

Limited permissions

Share

Turn Latin American electronic invoice XML into clean, normalized JSON in one call. One schema for Colombia (DIAN UBL 2.1), Mexico (CFDI 3.3 and 4.0) and Brazil (NF-e 4.00): seller and buyer tax IDs, totals, taxes and withholdings, line items, and whether the tax authority validated the document.

CountryDocumentsHighlights
🇨🇴 ColombiaFactura electrónica (Invoice), nota crédito, nota débito, documento soporte, and the AttachedDocument container that suppliers emailCUFE/CUDE, NIT with check digit, IVA, INC, ICA, ReteIVA, ReteRenta, ReteICA, DIAN authorization range, and the DIAN validation result inside the AttachedDocument
🇲🇽 MexicoCFDI 3.3 and 4.0: ingreso, egreso, traslado, nómina, pagoUUID and Timbre Fiscal Digital, RFC, régimen and uso CFDI, IVA/IEPS/ISR transfers and withholdings, Pagos 2.0 payments with related invoices
🇧🇷 BrazilNF-e and NFC-e 4.00 (nfeProc or bare NFe)44-digit access key, CNPJ/CPF, NCM, CFOP, ICMS/IPI/PIS/COFINS per item and totals, payment method (PIX, boleto…), SEFAZ authorization status

Why use it

  • Accounts payable automation: read the invoices your suppliers send and load them into your ERP or spreadsheet without retyping.
  • Colombian email ZIPs work as they arrive: pass the ZIP link and the Actor finds the XML, unwraps the AttachedDocument and reads the DIAN's "Documento validado por la DIAN" response.
  • One schema for three countries: build your pipeline once for CO, MX and BR.
  • AI agents: give an agent a reliable tool for invoice data instead of asking it to read XML. Works through the Apify MCP server.

No website is scraped. The Actor only downloads the files you link to (or reads the XML you send) and parses them.

How to use it

  1. Add links to .xml or .zip files in XML or ZIP file URLs, or send raw XML in Raw XML from the API.
  2. Keep Include line items on if you need products and services; turn on One row per line item for a spreadsheet-friendly table.
  3. Run the Actor and export the dataset as JSON, CSV or Excel, or read it from the API.

Want to see the output first? Start the Actor with no input: it parses a built-in sample CFDI for free (the row has "demo": true).

Output example (Colombia, AttachedDocument)

{
"source": "https://example.com/FE1023.zip#FE1023.xml",
"status": "ok",
"country": "CO",
"format": "DIAN_UBL_2.1",
"documentType": "invoice",
"number": "FE1023",
"uniqueId": "cufe-sha384…",
"issueDate": "2026-10-20T10:15:30-05:00",
"currency": "COP",
"seller": { "taxId": "900123456", "taxIdCheckDigit": "8", "taxIdType": "NIT", "name": "Software Andino S.A.S.", "city": "Bogotá, D.C." },
"buyer": { "taxId": "901234567", "taxIdCheckDigit": "7", "taxIdType": "NIT", "name": "Distribuciones El Ceibo S.A.S.", "city": "Medellín" },
"totals": { "subtotal": 1200000, "taxes": 228000, "withholdings": 48000, "total": 1428000, "payable": 1428000 },
"taxes": [
{ "type": "IVA", "code": "01", "rate": 19, "base": 1200000, "amount": 228000, "withheld": false },
{ "type": "ReteRenta", "code": "06", "rate": 4, "base": 1200000, "amount": 48000, "withheld": true }
],
"validation": { "status": "validated", "code": "02", "message": "Documento validado por la DIAN" },
"warnings": []
}

Mexican documents report validation.status as stamped or not_stamped (Timbre Fiscal Digital), and Brazilian ones as authorized with the SEFAZ cStat and protocol number.

Use cases

  • Accounts payable: turn supplier XML invoices into rows for your ERP or spreadsheet.
  • Accounting firms: consolidate DIAN, CFDI and NF-e documents from clients in several countries in one schema.
  • Expense and tax tools: read totals, taxes and line items without writing three parsers.
  • AI agents: give an agent the invoice XML and get structured JSON back to reason about.

Use with AI agents (MCP)

Every Apify Actor is also a tool for AI agents. Add this Actor to Claude, Cursor, VS Code or any MCP client with the Apify MCP server:

https://mcp.apify.com?tools=ceibadata/latam-einvoice-parser

Or run it locally:

$npx -y @apify/actors-mcp-server --tools ceibadata/latam-einvoice-parser

Then just ask, for example:

Parse this electronic invoice XML and give me the issuer, total, taxes and line items: https://example.com/invoices/factura-001.xml

Example input (API / AI agents)

{
"xmlUrls": [
"https://example.com/invoices/factura-001.xml"
],
"includeLines": true
}

From code, one call returns the results:

curl -X POST "https://api.apify.com/v2/acts/ceibadata~latam-einvoice-parser/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' -d @input.json

Pricing

You pay per document parsed successfully, whatever its number of lines. Files that cannot be downloaded or are not supported invoices are free.

FAQ

Does it validate the digital signature? No. It reads what the document and the tax authority response say (DIAN ApplicationResponse, SAT Timbre Fiscal Digital, SEFAZ protocol). It does not query the tax authority's servers.

Can I send PDFs? No, only the XML. The PDF is a printed copy; the XML is the legal document. ZIP files with both are fine: the PDF is skipped.

Is my data stored? Only in your own Apify storage. Ceiba Data never sees your invoices.

What if a field is missing? You get null for that field and, when it matters, a note in warnings (for example a CFDI without Timbre Fiscal Digital).


En español / Em português

Lector de facturas electrónicas a JSON: factura electrónica DIAN (incluido el AttachedDocument que llega por correo, con CUFE, NIT, IVA, ReteFuente y validación de la DIAN), CFDI 4.0 del SAT con complemento de pagos, y NF-e de Brasil. Leitor de NF-e para JSON: chave de acesso, CNPJ, NCM, CFOP, ICMS, IPI, PIS, COFINS e status de autorização da SEFAZ.


Built and maintained by Ceiba Data, a studio that publishes Latin American data tools on Apify. Ceiba Data is operated with AI. Missing a document type or country? Open an issue on this Actor and we will answer within 24 hours.