XRechnung & ZUGFeRD / Factur-X Parser – E-Invoice to JSON avatar

XRechnung & ZUGFeRD / Factur-X Parser – E-Invoice to JSON

Pricing

$3.00 / 1,000 parsed e-invoices

Go to Apify Store
XRechnung & ZUGFeRD / Factur-X Parser – E-Invoice to JSON

XRechnung & ZUGFeRD / Factur-X Parser – E-Invoice to JSON

Convert German and EU e-invoices to clean JSON: XRechnung (UBL & CII), ZUGFeRD and Factur-X PDFs (embedded XML extracted automatically). Seller, buyer, Leitweg-ID, IBAN, totals, VAT breakdown, line items and plausibility checks. Pay only per parsed invoice.

Pricing

$3.00 / 1,000 parsed e-invoices

Rating

0.0

(0)

Developer

Fast Data

Fast Data

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

20 hours ago

Last modified

Security

Limited permissions

Share

XRechnung & ZUGFeRD / Factur-X E-Invoice Parser – XML/PDF to JSON

Turn German and EU e-invoices into clean, flat JSON in seconds. Give the actor links to XRechnung XML files (UBL or CII) or ZUGFeRD / Factur-X PDFs – it extracts the embedded XML from the PDF automatically, detects the format and profile, and returns one row per invoice with seller, buyer, Leitweg-ID, IBAN/BIC, payment terms, totals, VAT breakdown, line items and plausibility warnings.

Price: $0.003 per successfully parsed invoice ($3 per 1,000). Files that fail to download or parse are free.

Who is it for?

  • Accounts payable & bookkeeping teams that receive XRechnung / ZUGFeRD invoices and want the data in a spreadsheet, ERP, DATEV pipeline or database
  • Developers & automation builders (n8n, Make, Zapier, AI agents) who need one stable JSON schema instead of two XML syntaxes and dozens of profiles
  • SaaS tools, tax advisors and auditors who want to bulk-read invoice archives and spot calculation errors
  • AI / LLM workflows – the output is flat and self-describing, ideal for agents via MCP

What it does

FeatureDetails
Supported formatsXRechnung UBL (Invoice + CreditNote), XRechnung CII, ZUGFeRD 2.x / Factur-X (MINIMUM, BASIC WL, BASIC, EN16931, EXTENDED, XRECHNUNG), generic EN 16931 / Peppol UBL
PDF supportExtracts factur-x.xml, zugferd-invoice.xml or xrechnung.xml from hybrid PDFs (pypdf, BSD licence)
Unified schemaSame field names for UBL and CII – no XPath needed
Plausibility checksSum of lines vs. line total (BR-CO-10), line total ± allowances/charges = tax basis (BR-CO-13), tax basis + VAT = grand total (BR-CO-15), grand total − prepaid = amount due (BR-CO-16), VAT breakdown sums and rates, required EN 16931 fields, XRechnung Leitweg-ID / seller e-mail / payment means
Safe XML parsingdefusedxml – protects against XXE and entity-expansion attacks
Fast & cheap3 invoices in ~3 seconds on 256 MB, no browser, no proxy

Important: This is a fast parser with plausibility checks, not a certified validator. It does not run the official KoSIT validator / EN 16931 Schematron rules. For legally binding conformance checks use the KoSIT validator.

Why this actor?

  • One schema for everything – XRechnung UBL, XRechnung CII and ZUGFeRD/Factur-X come out identical.
  • Cheaper than alternatives – most e-invoice actors in the Store charge $0.008–$0.04 per document; this one costs $0.003 and failed files are free.
  • Ready for automation – flat numbers (not strings), ISO dates, nested seller / buyer objects, validationWarnings list for alerting.

Input

FieldTypeDefaultDescription
fileUrlsarray of URLs3 public sample invoicesDirect links to XML or PDF e-invoices (public or presigned URLs, e.g. S3, Google Cloud Storage, Apify key-value store records)
includeLineItemsbooleantrueAdds the lineItems array
includeRawXmlbooleanfalseAdds the complete invoice XML as rawXml
{
"fileUrls": [
"https://raw.githubusercontent.com/itplr-kosit/xrechnung-testsuite/master/src/test/business-cases/standard/01.01a-INVOICE_ubl.xml",
"https://raw.githubusercontent.com/itplr-kosit/xrechnung-testsuite/master/src/test/business-cases/standard/02.01a-INVOICE_uncefact.xml",
"https://raw.githubusercontent.com/ZUGFeRD/mustangproject/master/library/src/test/resources/EN16931_Einfach.pdf"
],
"includeLineItems": true,
"includeRawXml": false
}

The default samples come from the official XRechnung test suite (KoSIT) and the Mustangproject ZUGFeRD library.

Output

Real result for the ZUGFeRD sample PDF (EN16931_Einfach.pdf, shortened):

{
"fileUrl": "https://raw.githubusercontent.com/ZUGFeRD/mustangproject/master/library/src/test/resources/EN16931_Einfach.pdf",
"status": "ok",
"format": "ZUGFeRD/Factur-X",
"syntax": "CII",
"profile": "EN16931",
"invoiceNumber": "471102",
"issueDate": "2024-11-15",
"typeCode": "380",
"typeName": "Commercial invoice",
"currency": "EUR",
"seller": {
"name": "Lieferant GmbH",
"vatId": "DE123456789",
"taxNumber": "201/113/40209",
"street": "Lieferantenstraße 20",
"postalCode": "80333",
"city": "München",
"country": "DE"
},
"buyer": { "name": "Kunden AG Mitte", "id": "GE2020211", "city": "Frankfurt", "country": "DE" },
"paymentTerms": "Zahlbar innerhalb 30 Tagen netto bis 15.12.2024, 3% Skonto innerhalb 10 Tagen bis 25.11.2024",
"lineTotal": 473.0,
"taxBasis": 473.0,
"taxTotal": 56.87,
"grandTotal": 529.87,
"prepaid": 0.0,
"payableAmount": 529.87,
"vatBreakdown": [
{ "category": "S", "rate": 7.0, "taxable": 275.0, "tax": 19.25 },
{ "category": "S", "rate": 19.0, "taxable": 198.0, "tax": 37.62 }
],
"lineItems": [
{ "id": "1", "name": "Trennblätter A4", "sellerItemId": "TB100A4", "quantity": 20.0, "unit": "H87", "netPrice": 9.9, "lineTotal": 198.0, "vatCategory": "S", "vatRate": 19.0 },
{ "id": "2", "name": "Joghurt Banane", "sellerItemId": "ARNR2", "quantity": 50.0, "unit": "H87", "netPrice": 5.5, "lineTotal": 275.0, "vatCategory": "S", "vatRate": 7.0 }
],
"sourceType": "PDF",
"pdfAttachmentName": "factur-x.xml",
"lineItemCount": 2,
"validationWarnings": [],
"validationWarningCount": 0
}

The XRechnung samples from the same run: XRechnung-UBL invoice 123456XX, Leitweg-ID 04011000-12345-03, IBAN DE79000000001234567890, grand total 336.90 EUR; XRechnung-CII invoice 1234567, Leitweg-ID 90000000-03083-72, grand total 12,829.69 EUR – all with 0 warnings.

All output fields

fileUrl, status (ok / error), error, format (XRechnung-UBL, XRechnung-CII, ZUGFeRD/Factur-X, UBL (EN 16931 / Peppol)), syntax, profile, specificationId, documentType, invoiceNumber, issueDate, dueDate, typeCode, typeName, currency, buyerReference (Leitweg-ID), orderReference, contractReference, notes, seller / buyer {name, tradingName, id, vatId, taxNumber, legalRegistrationId, street, postalCode, city, country, email, phone, contactName, electronicAddress}, paymentTerms, paymentMeansCode, iban, bic, accountName, lineTotal, allowanceTotal, chargeTotal, taxBasis, taxTotal, grandTotal, prepaid, roundingAmount, payableAmount, vatBreakdown, lineItems, lineItemCount, sourceType, pdfAttachmentName, validationWarnings, validationWarningCount, rawXml (optional).

Empty fields are omitted inside seller, buyer and line items.

Pricing

Pay per event: $0.003 per successfully parsed invoice. Download errors, PDFs without XML, and non-invoice files cost nothing (only the tiny platform start fee). 1,000 invoices ≈ $3.

Use via API, n8n, Make or AI agents

API (sync, returns the dataset items):

curl -X POST "https://api.apify.com/v2/acts/fast_data_asap~xrechnung-zugferd-einvoice-parser/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"fileUrls": ["https://example.com/invoice.pdf"]}'

Python:

from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("fast_data_asap/xrechnung-zugferd-einvoice-parser").call(run_input={"fileUrls": ["https://example.com/rechnung.xml"]})
for inv in client.dataset(run["defaultDatasetId"]).iterate_items():
print(inv["invoiceNumber"], inv.get("grandTotal"), inv.get("validationWarnings"))

n8n / Make / Zapier: use the Apify node, action "Run Actor and get dataset items", actor fast_data_asap/xrechnung-zugferd-einvoice-parser.

MCP (Claude, Cursor, other AI agents): https://mcp.apify.com?tools=fast_data_asap/xrechnung-zugferd-einvoice-parser

Limitations

  • Not a certified KoSIT / EN 16931 validator – plausibility checks only.
  • ZUGFeRD 1.0 (CrossIndustryDocument) is not supported; ZUGFeRD 2.x, Factur-X and XRechnung are.
  • Files must be reachable via URL (no login). Encrypted PDFs may fail.

Kurzfassung auf Deutsch

XRechnung- und ZUGFeRD-Rechnungen automatisch auslesen. Seit dem 1. Januar 2025 müssen alle Unternehmen in Deutschland E-Rechnungen im B2B-Bereich empfangen können (Wachstumschancengesetz); die Pflicht zum Versand folgt schrittweise bis 2028. Dieser Actor liest XRechnung (UBL und CII) sowie ZUGFeRD-/Factur-X-PDFs (eingebettetes XML wird automatisch extrahiert) und liefert sauberes JSON: Rechnungsnummer, Datum, Fälligkeit, Verkäufer und Käufer inkl. USt-IdNr. und Steuernummer, Leitweg-ID, IBAN/BIC, Zahlungsbedingungen, Summen, USt-Aufschlüsselung und Rechnungspositionen – plus Plausibilitätsprüfungen (Summen, Steuerbeträge, Pflichtfelder). Kein zertifizierter KoSIT-Validator. Preis: 0,003 $ pro erfolgreich gelesener Rechnung, fehlerhafte Dateien sind kostenlos.