# E-Invoice Validator – XRechnung & ZUGFeRD (KoSIT) (`adamplaenitz/e-invoice-validator`) Actor

Bulk-validate German/EU e-invoices – XRechnung (UBL, CII) and ZUGFeRD / Factur-X PDFs – with the official KoSIT validator and XRechnung rules. Per invoice: valid yes/no, accept/reject, profile, rule messages with XPath, totals. No party names or bank data in the output.

- **URL**: https://apify.com/adamplaenitz/e-invoice-validator.md
- **Developed by:** [Adam Plänitz](https://apify.com/adamplaenitz) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 validated invoices

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## E-Rechnung prüfen – XRechnung & ZUGFeRD Validator (KoSIT)

**Prüft deutsche und europäische E-Rechnungen in großer Menge mit dem offiziellen KoSIT-Validator und der offiziellen XRechnung-Prüfkonfiguration: XRechnung (UBL und CII) sowie ZUGFeRD / Factur-X (PDF mit eingebettetem XML).** Pro Rechnung erhalten Sie: gültig ja/nein, die Empfehlung des Prüftools (annehmen/zurückweisen), Syntax und Profil, alle Regelverstöße mit Regel-ID, Text und XPath sowie Rechnungsnummer, Datum und Summen für die Buchhaltung. Export als JSON, CSV oder Excel oder Anbindung an Make, Zapier, n8n und Webhooks.

*English version below.*

> **Hinweis:** Dies ist eine **technische Prüfung, keine Steuer- oder Rechtsberatung.** Das Ergebnis zeigt, ob eine Datei den formalen Regeln (XML-Schema, EN 16931, XRechnung) entspricht. Ob eine Rechnung umsatzsteuerlich ordnungsgemäß ist (z. B. richtige Steuersätze, Pflichtangaben im Einzelfall, Vorsteuerabzug), prüft der Actor nicht.

### Was wird geprüft?

| Eingang | Erkanntes Profil (BT-24) | Angewendete Regeln |
|---|---|---|
| XRechnung 3.0 (UBL Invoice, UBL CreditNote, CII), auch Extension und CVD | `XRechnung 3.0`, `XRechnung 3.0 Extension`, `XRechnung 3.0 CVD` | XML-Schema + EN 16931 (CEN-Schematron) + XRechnung-Schematron (KoSIT) – genau wie das offizielle Prüftool |
| EN 16931 ohne nationale Erweiterung, z. B. ZUGFeRD/Factur-X-Profil **EN 16931 (COMFORT)** | `EN 16931` | XML-Schema + EN 16931 |
| ZUGFeRD/Factur-X **BASIC** | `BASIC` | XML-Schema (CII D16B) + EN 16931 |
| ZUGFeRD/Factur-X **EXTENDED** | `EXTENDED` | Teilprüfung: XML-Schema (CII D16B) + EN 16931; Abweichungen von EN 16931 und „unerwartete Elemente“ werden als Warnung gemeldet, weil EXTENDED davon abweichen darf |
| ZUGFeRD/Factur-X **MINIMUM** und **BASIC WL** | `MINIMUM`, `BASIC WL` | nur Wohlgeformtheit + XML-Schema – EN 16931- und XRechnung-Regeln gelten für diese Profile nicht. Laut BMF-Schreiben vom 15.10.2024 gelten sie in Deutschland nicht als E-Rechnung |
| ZUGFeRD/Factur-X-Profil **XRECHNUNG** (PDF mit `xrechnung.xml`) | `XRechnung 3.0` | wie XRechnung |
| Andere CIUS von EN 16931, z. B. Peppol BIS Billing 3.0 | `Peppol BIS Billing 3.0`, `Other CIUS of EN 16931` | XML-Schema + EN 16931 (CIUS-eigene Regeln werden nicht geprüft) |

Bei ZUGFeRD-/Factur-X-PDFs wird die eingebettete XML-Datei (`factur-x.xml`, `zugferd-invoice.xml` oder `xrechnung.xml`) automatisch herausgelöst. Format und Profil erkennt der Actor am Inhalt, nicht am Dateinamen. Das Feld `checkLevel` zeigt maschinenlesbar, wie tief geprüft wurde: `xrechnung`, `en16931`, `partial` (EXTENDED) oder `schema-only` (MINIMUM, BASIC WL).

**Nicht geprüft werden (v0.1):** PDF/A-Konformität des PDFs, elektronische Signaturen, die Übereinstimmung von PDF-Ansicht und XML, die profilspezifischen Factur-X-Schematron-Regeln (EXTENDED), Peppol-spezifische Regeln, ZUGFeRD 1.0 und veraltete XRechnung-Versionen (2.x).

### Für wen?

- **Buchhaltung, Rechnungseingang, Steuerkanzleien:** eingehende E-Rechnungen vor dem Buchen massenhaft prüfen und fehlerhafte Rechnungen mit konkreter Regel-ID an den Absender zurückgeben.
- **Softwarehersteller und ERP-/Shop-Betreiber:** eigene XRechnung- und ZUGFeRD-Ausgabe automatisch testen, z. B. nach jedem Release (Zeitplan + Webhook).
- **Integrationen:** Prüfschritt in Make, Zapier, n8n oder eigenen Workflows über die Apify-API.

Hintergrund: Seit dem 01.01.2025 müssen Unternehmen in Deutschland E-Rechnungen im inländischen B2B-Geschäft empfangen können. Die Pflicht zum Versand von E-Rechnungen gilt nach den Übergangsregeln ab dem 01.01.2027 für Unternehmen mit mehr als 800.000 € Vorjahresumsatz und ab dem 01.01.2028 für alle; Ausnahmen gibt es u. a. für Kleinbetragsrechnungen. Einzelheiten regeln das Wachstumschancengesetz und die BMF-Schreiben – im Zweifel fragen Sie Ihre Steuerberatung.

### Eingabe

| Feld | Beschreibung | Beispiel |
|---|---|---|
| Invoice file URLs | Links zu XML- oder PDF-Dateien, eine pro Zeile | `https://…/rechnung-4711.xml` |
| Invoice XML | XML einer einzelnen Rechnung direkt einfügen | `<ubl:Invoice …>` |
| Key-value store with invoice files | Key-Value-Store Ihres Apify-Kontos mit hochgeladenen Rechnungen auswählen (über die API: Store-ID); der Actor erhält nur Lesezugriff auf diesen Store | `eingangsrechnungen` |
| Key-value store record keys | Schlüssel der Dateien im Store; `*` = alle Dateien | `RE-2026-0815.pdf` oder `*` |
| Maximum messages per invoice | Höchstzahl der aufgelisteten Meldungen pro Rechnung (Fehler zuerst); die Zähler enthalten immer alle | `100` |
| Save KoSIT HTML report | offiziellen KoSIT-Prüfbericht (HTML, deutsch) je Rechnung speichern | aus |
| Maximum file size (MB) | größere Dateien werden kostenlos übersprungen | `20` |

Der Actor läuft mit eingeschränkten Apify-Berechtigungen: Auf Ihre Daten greift er nur zu, wenn Sie einen Store im Feld „Key-value store with invoice files“ auswählen. Links auf Datensätze anderer Stores funktionieren nur, wenn diese ohne Anmeldung lesbar sind. Die Vorbelegung enthält zwei gültige und eine fehlerhafte Rechnung aus den offiziellen KoSIT-Testdaten sowie ein Factur-X-PDF aus dem Mustang-Projekt.

### Ausgabe (gekürzt)

```json
{
  "fileName": "ubl-br-co-15-no-multiple-bt-110-allowed-test.xml",
  "fileType": "xml",
  "status": "validated",
  "valid": false,
  "recommendation": "reject",
  "format": "UBL Invoice",
  "profile": "XRechnung 3.0",
  "checkLevel": "xrechnung",
  "specificationIdentifier": "urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0",
  "errorCount": 2,
  "warningCount": 0,
  "informationCount": 0,
  "messages": [
    {
      "ruleId": "BR-CO-15",
      "severity": "error",
      "text": "[BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).",
      "location": "/ubl:Invoice[1]",
      "step": "Schematron rules for EN16931 (UBL)"
    },
    {
      "ruleId": "PEPPOL-EN16931-R053",
      "severity": "error",
      "text": "[PEPPOL-EN16931-R053]-Only one tax total with tax subtotals MUST be provided.",
      "location": "/ubl:Invoice[1]",
      "step": "Schematron rules for Invoice - CIUS XRechnung (UBL)"
    }
  ],
  "rulesChecked": ["XML Schema for UBL 2.1 Invoice", "Schematron rules for EN16931 (UBL)", "Schematron rules for Invoice - CIUS XRechnung (UBL)"],
  "scenario": "EN16931 XRechnung (UBL Invoice)",
  "invoiceNumber": "1234567",
  "issueDate": "2018-04-13",
  "invoiceTypeCode": "380",
  "currency": "EUR",
  "lineCount": 2,
  "totalNet": 10781.25,
  "totalTax": 2048.44,
  "totalGross": 12829.69,
  "amountDue": 12829.69,
  "fileSha256": "1661835138cf08027728892d42d908b3fcf09ae6bc6e6336d40d291decc7dca9",
  "validationEngine": "KoSIT Validator 1.6.3, XRechnung validator configuration 2026-08-31 (XRechnung 3.0.2, XRechnung Schematron 2.6.0, CEN EN 16931 Schematron 1.3.16)"
}
```

- `valid` = das Prüftool empfiehlt die Annahme (`recommendation: "accept"`): keine Fehler nach den angewendeten Regeln. Warnungen und Hinweise (`information`) machen eine Rechnung nicht ungültig.
- `severity` ist die wirksame Stufe nach der Prüfkonfiguration (die XRechnung-Konfiguration stuft einzelne CEN-Regeln hoch oder herab; dann steht die ursprüngliche Stufe in `originalSeverity`). Fehler stehen zuerst.
- `profileNote` erklärt bei Nicht-XRechnung-Profilen, was geprüft wurde und was nicht.
- Bei PDFs steht der Name der eingebetteten Datei in `embeddedXmlFileName`.
- Mit „Save KoSIT HTML report“ enthält jede Zeile `htmlReportKey` und `htmlReportUrl`.

**Kostenlose Zeilen:** Dateien, die nicht geladen oder gelesen werden können (Download-Fehler, kein XML/PDF, PDF ohne eingebettete Rechnung, nicht wohlgeformtes XML, ZUGFeRD 1.0, veraltete XRechnung 2.x, unbekannte Spezifikationskennung), erscheinen mit `status: "not-validated"`, `errorType` und `error` und werden **nicht berechnet**.

Eine Zusammenfassung (Anzahl gültig/ungültig, Formate, Profile, verwendete Versionen) steht im Key-Value-Store unter `RUN-SUMMARY`.

### Preis und Geschwindigkeit

Den aktuellen Preis finden Sie im Tab **Pricing**. Berechnet wird nur jede tatsächlich geprüfte Rechnung; Fehlerzeilen sind kostenlos. Wenn Sie ein Kostenlimit pro Lauf setzen, stoppt der Actor sauber, sobald es erreicht ist.

Gemessen auf der Apify-Plattform: Der Start des Validators dauert 7–9 Sekunden, die Vorbelegung (4 Rechnungen) ist nach rund 10 Sekunden fertig. 156 Dateien (XRechnung-Testsuite und ZUGFeRD-Beispiele) dauerten mit 2 GB Arbeitsspeicher (Standard) 31 Sekunden, mit 1 GB 81 Sekunden – mehr Arbeitsspeicher bringt auf Apify auch mehr CPU. Mindestens 1 GB sind nötig, weil der Validator in Java läuft.

### Prüfwerkzeuge, Versionen und Lizenzen

- **KoSIT-Validator** 1.6.3 (Koordinierungsstelle für IT-Standards, [itplr-kosit/validator](https://github.com/itplr-kosit/validator)), Apache License 2.0.
- **Prüfkonfiguration XRechnung** 2026-08-31 für XRechnung 3.0.2 ([itplr-kosit/validator-configuration-xrechnung](https://github.com/itplr-kosit/validator-configuration-xrechnung)), Apache License 2.0. Sie enthält:
  - XRechnung-Schematron 2.6.0 (KoSIT),
  - CEN-Schematron für EN 16931 in Version 1.3.16 ([ConnectingEurope/eInvoicing-EN16931](https://github.com/ConnectingEurope/eInvoicing-EN16931)), European Union Public Licence (EUPL) 1.2 – unverändert verwendet,
  - XML-Schemas UBL 2.1 (OASIS) und UN/CEFACT CII D16B.
- Validator und Konfiguration werden beim Bau des Docker-Images von den offiziellen GitHub-Releases geladen und per SHA-256 geprüft. Zusätzliche Prüfszenarien für ZUGFeRD/Factur-X-Profile und andere CIUS (siehe Tabelle oben) sind eigene Ergänzungen dieses Actors; sie nutzen dieselben Schemas und CEN-Regeln.
- PDF-Auslesen mit [pdf-lib](https://github.com/Hopding/pdf-lib) (MIT), Java-Laufzeit Eclipse Temurin (GPLv2 mit Classpath Exception).
- Beispieldateien der Vorbelegung: [XRechnung-Testsuite](https://github.com/itplr-kosit/xrechnung-testsuite) und Prüfkonfiguration (KoSIT, Apache 2.0), Factur-X-Beispiel aus dem [Mustang-Projekt](https://github.com/ZUGFeRD/mustangproject) (Apache 2.0).
- **Dieser Actor ist ein unabhängiges Werkzeug und steht in keiner Verbindung zur KoSIT, zum FeRD, zur FNFE-MPE oder zum CEN.**

**Aktualisierung:** Die KoSIT veröffentlicht etwa zwei neue Prüfkonfigurationen pro Jahr; XRechnung 3.0 gilt laut KoSIT mindestens bis 31.07.2027. Neue Versionen werden in `config/kosit.env` (Version, Download-Link, SHA-256-Prüfsumme) eingetragen; danach wird der Actor neu gebaut. Welche Versionen ein Lauf verwendet hat, steht in jeder Ergebniszeile (`validationEngine`) und in `RUN-SUMMARY`.

### Datenschutz

- Rechnungen enthalten oft personenbezogene Daten. Der Inhalt wird **nur innerhalb des Laufs verarbeitet** und nicht über die Ergebnisse hinaus gespeichert; Rechnungsinhalte werden nicht protokolliert.
- Die Ergebniszeilen enthalten **keine Namen von Verkäufer oder Käufer, keine Anschriften, keine Bankverbindungen (IBAN), keine E-Mail-Adressen und keine Kontaktpersonen** – nur technische Angaben, Rechnungsnummer, Datum, Typcode, Währung und Summen. Die Meldungstexte stammen aus den Prüfregeln; Meldungen des XML-Schemas können einzelne fehlerhafte Werte zitieren (z. B. ein ungültiges Datum).
- Ausnahme: Der optionale **KoSIT-HTML-Bericht** (standardmäßig aus) zeigt den vollständigen Rechnungsinhalt und wird im Key-Value-Store Ihres Laufs abgelegt.
- Ergebnisse liegen in Ihrem Apify-Konto (Dataset und Key-Value-Store des Laufs) und unterliegen dessen Aufbewahrungsfristen. Prüfen Sie vorab, ob die Verarbeitung auf der Apify-Plattform zu Ihren Datenschutzvorgaben passt (z. B. Auftragsverarbeitung).

### Grenzen

- Geprüft wird die Datei gegen die genannten Regelwerke. Fachliche Richtigkeit (z. B. ob die USt-IdNr. existiert oder der Steuersatz zum Geschäftsvorfall passt) wird nicht geprüft.
- EXTENDED wird nur teilweise geprüft (siehe Tabelle); für MINIMUM und BASIC WL nur das XML-Schema.
- Verschlüsselte PDFs und Peppol-Umschläge (SBDH) werden nicht ausgepackt – bitte die enthaltene Rechnung prüfen.
- Größte Dateigröße 100 MB (Standard 20 MB).

Fragen oder Wünsche? Bitte öffnen Sie ein Issue im Tab **Issues** – Antwort meist innerhalb von 1–2 Werktagen.

***

### English

**Bulk validation of German and EU e-invoices with the official KoSIT validator and the official XRechnung validator configuration: XRechnung (UBL and CII) and ZUGFeRD / Factur-X (PDF with embedded XML).** For every invoice you get valid yes/no, the validator's recommendation (accept/reject), syntax and profile, every rule violation with rule ID, text and XPath, plus invoice number, dates and totals for bookkeeping.

> **Disclaimer:** technical validation only, **no tax or legal advice.** The result shows whether a file complies with the formal rules (XML Schema, EN 16931, XRechnung). It does not check whether an invoice is correct for VAT purposes.

**What is checked**

- **XRechnung 3.0** (UBL Invoice, UBL CreditNote, CII; also Extension and CVD): XML Schema + EN 16931 (CEN Schematron 1.3.16) + XRechnung Schematron 2.6.0 – exactly as the official tool.
- **EN 16931** without national extension (e.g. ZUGFeRD/Factur-X profile EN 16931 / COMFORT) and **BASIC**: XML Schema + EN 16931.
- **EXTENDED**: partial check – XML Schema (CII D16B) + EN 16931, with EN 16931 violations and "unexpected element" schema messages reported as warnings because EXTENDED may legitimately deviate.
- **MINIMUM, BASIC WL**: well-formedness and XML Schema only – EN 16931 and XRechnung rules do not apply (in Germany these profiles are not regarded as e-invoices, BMF letter of 15 Oct 2024).
- **Other EN 16931 CIUS** such as Peppol BIS Billing 3.0: XML Schema + EN 16931 only (CIUS-specific rules are not checked).
- ZUGFeRD/Factur-X PDFs: the embedded `factur-x.xml`, `zugferd-invoice.xml` or `xrechnung.xml` is extracted automatically. **PDF/A conformance, signatures, ZUGFeRD 1.0 and outdated XRechnung 2.x are out of scope for v0.1.**

**Who is it for:** accounts-payable teams and tax advisers checking incoming e-invoices in bulk, software vendors testing their XRechnung / ZUGFeRD output, and automation workflows (Make, Zapier, n8n, API). Background: since 1 Jan 2025 businesses in Germany must be able to receive e-invoices (domestic B2B); the obligation to send them applies from 1 Jan 2027 for businesses with more than EUR 800,000 prior-year turnover and from 1 Jan 2028 for all, with exceptions such as small-amount invoices.

**Input:** invoice file URLs (XML or PDF), pasted XML of a single invoice, or records of a key-value store you select in the input (`*` = all records; the Actor runs with limited permissions and gets read access to the selected store only). Options: maximum messages per invoice, KoSIT HTML report per invoice (off by default), maximum file size. The prefilled input contains two valid and one invalid invoice from the official KoSIT test data and a Factur-X PDF from the Mustang project.

**Output:** one row per file – see the example above. Files that cannot be downloaded or read (not XML/PDF, PDF without invoice XML, malformed XML, ZUGFeRD 1.0, outdated XRechnung 2.x, unknown specification identifier) get a row with `status: "not-validated"` and the reason, **free of charge**. A run summary is stored as `RUN-SUMMARY`.

**Pricing and speed:** see the **Pricing** tab; only validated invoices are charged. On Apify the validator starts in 7–9 seconds and the prefilled input finishes in about 10 seconds; 156 files took 31 seconds with 2 GB memory (default) and 81 seconds with 1 GB. At least 1 GB memory is required (Java).

**Licences:** KoSIT validator 1.6.3 and XRechnung validator configuration 2026-08-31 (Apache 2.0), CEN EN 16931 Schematron (EUPL 1.2, used unmodified), UBL 2.1 and UN/CEFACT CII D16B schemas, pdf-lib (MIT). Components are downloaded from the official GitHub releases at build time and verified with SHA-256. Versions are listed in every result row (`validationEngine`) and in `RUN-SUMMARY`; updates are made in `config/kosit.env`. **This Actor is an independent tool and is not affiliated with KoSIT, FeRD, FNFE-MPE or CEN.**

**Privacy:** invoice content is processed only inside the run and not stored beyond the dataset of the validation results. The output contains **no party names, addresses, IBANs, e-mail addresses or contact persons** – only technical data, invoice number, dates, type code, currency and totals (XML Schema messages may quote a single invalid value, e.g. a malformed date). Exception: the optional KoSIT HTML report (off by default) renders the complete invoice and is stored in the run's key-value store.

Questions or feature requests? Please open an issue in the **Issues** tab – usually answered within 1–2 working days.

# Actor input Schema

## `invoiceUrls` (type: `array`):

Links to invoice files: XRechnung / EN 16931 XML (UBL Invoice, UBL CreditNote or CII) or ZUGFeRD / Factur-X PDFs with embedded XML. One URL per line. The format is detected from the file content, not from the file name.

## `invoiceXml` (type: `string`):

Optional: paste the XML of one invoice here instead of providing a URL.

## `keyValueStore` (type: `string`):

Optional: select a key-value store of your Apify account that contains invoice files (XML or PDF, e.g. uploaded via the Apify Console or API). The Actor gets read access to this store only. Via the API, pass the store ID. Leave empty to use the run's default key-value store.

## `keyValueStoreKeys` (type: `array`):

Optional: keys of the records (XML or PDF files) in the key-value store selected above. Use \* to validate all records of the store.

## `maxMessagesPerInvoice` (type: `integer`):

Maximum number of validation messages (errors first, then warnings and information) listed per invoice. The counts always include all messages.

## `saveHtmlReports` (type: `boolean`):

Stores the official KoSIT HTML test report (German) for every validated invoice in the run's key-value store and adds its key and URL to the result. Note: the HTML report renders the complete invoice content, including names and bank details.

## `maxFileSizeMb` (type: `integer`):

Files larger than this are skipped (free of charge).

## Actor input object example

```json
{
  "invoiceUrls": [
    "https://raw.githubusercontent.com/itplr-kosit/xrechnung-testsuite/v2026-08-31/src/test/business-cases/standard/01.01a-INVOICE_ubl.xml",
    "https://raw.githubusercontent.com/itplr-kosit/xrechnung-testsuite/v2026-08-31/src/test/business-cases/standard/01.01a-INVOICE_uncefact.xml",
    "https://raw.githubusercontent.com/itplr-kosit/validator-configuration-xrechnung/v2026-08-31/src/test/cen-unit-test/ubl-br-co-15-no-multiple-bt-110-allowed-test.xml",
    "https://raw.githubusercontent.com/ZUGFeRD/mustangproject/b04466afd9035b2925d33b286954b270109a01d9/library/src/test/resources/MustangBeispiel20221026.pdf"
  ],
  "maxMessagesPerInvoice": 100,
  "saveHtmlReports": false,
  "maxFileSizeMb": 20
}
```

# Actor output Schema

## `results` (type: `string`):

One item per invoice file: validity, KoSIT recommendation, detected syntax and profile, rule messages and bookkeeping totals (plus free rows for files that could not be validated).

## `summary` (type: `string`):

Counts of valid / invalid / not validated invoices, formats, profiles and the validator and rule versions used.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "invoiceUrls": [
        "https://raw.githubusercontent.com/itplr-kosit/xrechnung-testsuite/v2026-08-31/src/test/business-cases/standard/01.01a-INVOICE_ubl.xml",
        "https://raw.githubusercontent.com/itplr-kosit/xrechnung-testsuite/v2026-08-31/src/test/business-cases/standard/01.01a-INVOICE_uncefact.xml",
        "https://raw.githubusercontent.com/itplr-kosit/validator-configuration-xrechnung/v2026-08-31/src/test/cen-unit-test/ubl-br-co-15-no-multiple-bt-110-allowed-test.xml",
        "https://raw.githubusercontent.com/ZUGFeRD/mustangproject/b04466afd9035b2925d33b286954b270109a01d9/library/src/test/resources/MustangBeispiel20221026.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("adamplaenitz/e-invoice-validator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "invoiceUrls": [
        "https://raw.githubusercontent.com/itplr-kosit/xrechnung-testsuite/v2026-08-31/src/test/business-cases/standard/01.01a-INVOICE_ubl.xml",
        "https://raw.githubusercontent.com/itplr-kosit/xrechnung-testsuite/v2026-08-31/src/test/business-cases/standard/01.01a-INVOICE_uncefact.xml",
        "https://raw.githubusercontent.com/itplr-kosit/validator-configuration-xrechnung/v2026-08-31/src/test/cen-unit-test/ubl-br-co-15-no-multiple-bt-110-allowed-test.xml",
        "https://raw.githubusercontent.com/ZUGFeRD/mustangproject/b04466afd9035b2925d33b286954b270109a01d9/library/src/test/resources/MustangBeispiel20221026.pdf",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("adamplaenitz/e-invoice-validator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "invoiceUrls": [
    "https://raw.githubusercontent.com/itplr-kosit/xrechnung-testsuite/v2026-08-31/src/test/business-cases/standard/01.01a-INVOICE_ubl.xml",
    "https://raw.githubusercontent.com/itplr-kosit/xrechnung-testsuite/v2026-08-31/src/test/business-cases/standard/01.01a-INVOICE_uncefact.xml",
    "https://raw.githubusercontent.com/itplr-kosit/validator-configuration-xrechnung/v2026-08-31/src/test/cen-unit-test/ubl-br-co-15-no-multiple-bt-110-allowed-test.xml",
    "https://raw.githubusercontent.com/ZUGFeRD/mustangproject/b04466afd9035b2925d33b286954b270109a01d9/library/src/test/resources/MustangBeispiel20221026.pdf"
  ]
}' |
apify call adamplaenitz/e-invoice-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,adamplaenitz/e-invoice-validator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/lIsPXhe4AKHz71nKZ/builds/wVMhq3IjCfNVVv2HO/openapi.json
