# EU VAT Number Validator – Bulk VIES Check (USt-IdNr.) (`adamplaenitz/eu-vat-number-validator`) Actor

Check lists of EU VAT numbers: offline format and check-digit test for all 27 member states and Northern Ireland, then a live check in the official VIES service. Retries outages, reports them per number. No names or addresses are output.

- **URL**: https://apify.com/adamplaenitz/eu-vat-number-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 $3.00 / 1,000 vat number checkeds

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

## EU VAT Number Validator – Bulk VIES Check (USt-IdNr.)

**Check lists of EU VAT identification numbers against VIES, the official VAT number validation service of the European Commission – with an offline format and check-digit test first, automatic retries when a member state is down, and a clear status for every number.** No trader names or addresses are output. Export as JSON, CSV or Excel, or connect to Google Sheets, Make, Zapier, n8n or webhooks.

*Deutsche Kurzfassung weiter unten.*

### What does it do?

1. **Normalises** each number (spaces, dots, dashes and lower case are fine; `GR` is accepted for Greece = `EL`). Duplicates are checked once.
2. **Offline check** for all 27 member states and Northern Ireland (`XI`): length and characters per country, plus the **official check-digit algorithm** where one is published (all countries except Latvia; for some countries only for company numbers). Numbers that fail are reported with the reason – free of charge and without a VIES request.
3. **Live VIES check** for the remaining numbers: `valid` = the number is currently registered for intra-EU transactions.
4. **Outages are handled per number:** VIES depends on the national databases, which are regularly unavailable or overloaded (`MS_UNAVAILABLE`, `MS_MAX_CONCURRENT_REQ`, `TIMEOUT`). The Actor retries with backoff, waits and tries again in a second pass, and if a member state stays down, the affected rows get `status: "unavailable"` with the error code – the rest of the run continues. Such rows are free.

#### Status values

| status | meaning |
|---|---|
| `valid` | VIES confirms the number is valid |
| `invalid` | VIES says the number is not valid (not registered, deregistered, or not activated for intra-EU trade) |
| `format-invalid` | rejected offline: wrong length/characters, wrong check digit, no or unknown country prefix, or a UK `GB` number (no longer in VIES since 2021) |
| `unavailable` | the member state (or VIES) did not answer after several retries – try again later |
| `error` | VIES refused the request (e.g. `INVALID_INPUT`) |

### Who is it for?

- **Accounting and tax teams** checking customer VAT numbers before issuing reverse-charge invoices or filing EC Sales Lists (Zusammenfassende Meldung).
- **E-commerce and B2B platforms** verifying business customers at onboarding.
- **Data teams** cleaning VAT numbers in CRM or ERP master data – on a schedule, too.

### Input

| Field | Example |
|---|---|
| VAT numbers (one per line) | `DE143454214`, `ATU33803701`, `FR40303265045`, `GR094014201` |
| Default country for numbers without prefix | `DE` |
| Also check numbers that fail the offline format test | off (default) |

### Output example

```json
{
  "input": "DE143454214",
  "vatNumber": "DE143454214",
  "countryCode": "DE",
  "formatValid": true,
  "checksum": "valid",
  "valid": true,
  "status": "valid",
  "requestDate": "2026-11-17T21:11:20.190Z",
  "error": null,
  "errorMessage": null
}
```

```json
{
  "input": "IT00488410010",
  "vatNumber": "IT00488410010",
  "countryCode": "IT",
  "formatValid": true,
  "checksum": "valid",
  "valid": null,
  "status": "unavailable",
  "error": "MS_UNAVAILABLE",
  "errorMessage": "The member state's VAT database is currently unavailable in VIES. Please try again later."
}
```

`requestDate` is the timestamp VIES returns for the check. A run summary (counts, member states that were down, number of VIES requests and retries) is stored as `RUN-SUMMARY` in the key-value store.

### Pricing and speed

See the **Pricing** tab for the current price. Only numbers that were actually checked in VIES are charged; offline rejections, unavailable and error rows are free. To be fair to the shared public service, the Actor sends one request at a time. VIES itself usually needs 1–10 seconds per answer, so expect about 10–15 numbers per minute (tested: 79 VIES checks in under 7 minutes) – 1,000 numbers take roughly 1–1.5 hours. For long lists, raise the run **timeout** in the run options. Outages add waiting time for retries. Offline rejections are instant.

### Data source and privacy

- Data: **VIES** (VAT Information Exchange System) of the **European Commission**, public REST service `ec.europa.eu/taxation_customs/vies/rest-api`. VIES only says whether a number is valid at the time of the request; the national tax authorities are responsible for the data. **This Actor is an independent tool and is not affiliated with, endorsed by or sponsored by the European Commission or any tax authority.**
- **No names, no addresses:** VIES can return the registered name and address. For sole traders and freelancers these are personal data, so this Actor **never outputs them** – only the number, country, format result, VIES validity, request date and status.
- A VIES result is not a "qualified confirmation" (qualifizierte Bestätigungsabfrage) in the sense of § 18e UStG; for that, German businesses use the Federal Central Tax Office (BZSt).

### Limits

- VIES itself is the bottleneck: national databases are sometimes offline (often at night or at weekends). Re-run the `unavailable` rows later.
- The offline check-digit test covers company numbers; for some countries, numbers of individuals (e.g. 10-digit Bulgarian or 9/10-digit Czech numbers) are only checked for length. Use "Also check numbers that fail the offline format test" if you think a number was rejected wrongly.
- UK (`GB`) VAT numbers are not in VIES since 2021; Northern Ireland numbers (`XI`) are.

Questions or feature requests? Please open an issue in the **Issues** tab.

***

### Deutsch (Kurzfassung)

**USt-IdNr. in großen Listen prüfen** – gegen VIES, den offiziellen Bestätigungsdienst der EU-Kommission. Vorher prüft der Actor offline Länge, Zeichen und **Prüfziffer** für alle 27 EU-Staaten und Nordirland (XI); fehlerhafte Nummern werden kostenlos mit Grund gemeldet. Fällt ein Mitgliedstaat aus (`MS_UNAVAILABLE`, Überlastung), wird automatisch wiederholt und die betroffene Zeile als `unavailable` markiert – der Rest läuft weiter. **Keine Namen und Adressen** in der Ausgabe (Datenschutz bei Einzelunternehmern). Hinweis: Keine qualifizierte Bestätigungsabfrage nach § 18e UStG (dafür BZSt). Keine Verbindung zur EU-Kommission.

# Actor input Schema

## `vatNumbers` (type: `array`):

One VAT identification number per line, with country prefix (e.g. DE123456789, ATU12345678, FR12345678901). Spaces, dots and dashes are ignored; GR is accepted for Greece (EL). Duplicates are checked once.

## `defaultCountry` (type: `string`):

Two-letter VIES country code (e.g. DE, AT, EL, XI) used for numbers that do not start with a country prefix. Leave empty to reject such numbers.

## `sendFormatInvalidToVies` (type: `boolean`):

By default, numbers with a wrong length or check digit are rejected offline (free, no VIES request). Enable to send them to VIES anyway; they are then charged like every other VIES check.

## Actor input object example

```json
{
  "vatNumbers": [
    "DE143454214",
    "ATU33803701",
    "FR40303265045",
    "IT00488410010",
    "ESA28015865",
    "NL003660564B01",
    "IE6388047V",
    "DE 123 456 789"
  ],
  "sendFormatInvalidToVies": false
}
```

# Actor output Schema

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

One row per unique VAT number: VIES result, offline format check, or the reason it could not be checked.

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

Counts of valid, invalid, unavailable and offline-rejected numbers, member states that were down, VIES request statistics.

# 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 = {
    "vatNumbers": [
        "DE143454214",
        "ATU33803701",
        "FR40303265045",
        "IT00488410010",
        "ESA28015865",
        "NL003660564B01",
        "IE6388047V",
        "DE 123 456 789"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("adamplaenitz/eu-vat-number-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 = { "vatNumbers": [
        "DE143454214",
        "ATU33803701",
        "FR40303265045",
        "IT00488410010",
        "ESA28015865",
        "NL003660564B01",
        "IE6388047V",
        "DE 123 456 789",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("adamplaenitz/eu-vat-number-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 '{
  "vatNumbers": [
    "DE143454214",
    "ATU33803701",
    "FR40303265045",
    "IT00488410010",
    "ESA28015865",
    "NL003660564B01",
    "IE6388047V",
    "DE 123 456 789"
  ]
}' |
apify call adamplaenitz/eu-vat-number-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,adamplaenitz/eu-vat-number-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/GLGNRrpIwmTCTuvS5/builds/4vJGigAdn37Tlt29Z/openapi.json
