# EU VAT number validator (VIES) (`kaderlab/vies-validator`) Actor

Validates EU VAT identification numbers against the European Commission's VIES service. Returns validity per number and nothing else — no trader names, no addresses.

- **URL**: https://apify.com/kaderlab/vies-validator.md
- **Developed by:** [Kaderlab](https://apify.com/kaderlab) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

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 (VIES)

Checks EU VAT identification numbers against the European Commission's VIES service, in bulk, and
returns **validity and nothing else** — no trader names, no addresses.

### What it does

- Takes up to 5,000 VAT numbers per run, in any spelling (`NL123456789B01`, `BE 0123.456.749`,
  `DE123456789`), with the country code in front.
- Normalises each number, checks the syntax for the country, and asks VIES whether the number is
  registered.
- Writes one row per distinct number to the default dataset. Duplicates are checked once by default.

### Output

One item per number, with these fields:

| Field | Meaning |
|---|---|
| `input` | The number exactly as you gave it |
| `countryCode` | The two-letter country code, once parsed |
| `number` | The number without the country code, once parsed |
| `syntaxValid` | Whether the spelling matches the country's format |
| `status` | `valid`, `invalid`, `unavailable` or `skipped` |
| `reason` | Why a row is `invalid`, `unavailable` or `skipped`, where VIES or the parser says |
| `checkedAt` | Time of the check (ISO 8601, UTC) |

`unavailable` means VIES did not answer for that country at that moment. VIES is a free public
service and member states' registers go offline from time to time; this Actor reports that and does
not guess. Re-run those rows later.

### Pricing

Pay per result: you are charged per row in the dataset (plus Apify's small fixed fee per run start),
and nothing for platform usage. A run over a list with duplicates costs one row per distinct number
when *Check each number once* is on (the default).

### Privacy

VIES can return the name and address of a registered trader. This Actor never requests them, so
they never reach the dataset. The only data stored is the row shown above.

### Limits

- VIES asks callers to keep request rates modest; the *Parallel lookups* setting is capped at 5.
- A `valid` result means the number was registered in VIES at the time of the check. Whether a
  transaction qualifies for a VAT treatment is a question for your accountant or tax adviser, not
  for this Actor.

### Support

support@kaderlab.com — read by the same one-person business that builds and operates the Actor,
partly with AI assistance. Kaderlab is a trade name of AVS Digital, KvK 67123783, Amsterdam.

# Actor input Schema

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

EU VAT identification numbers, with the country code, in any spelling: NL123456789B01, BE 0123.456.749, DE123456789. Maximum 5000 per run.

## `skipDuplicates` (type: `boolean`):

Check every distinct number once, however often it appears in the list. Cheaper, and kinder to the free VIES service.

## `concurrency` (type: `integer`):

How many lookups run at once. VIES is a free public service; keep this low.

## Actor input object example

```json
{
  "vatNumbers": [
    "NL123456789B01",
    "BE0123456749"
  ],
  "skipDuplicates": true,
  "concurrency": 2
}
```

# Actor output Schema

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

The default dataset: one item per distinct VAT number, with the fields declared in the dataset schema.

# 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": [
        "NL123456789B01",
        "BE0123456749"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kaderlab/vies-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": [
        "NL123456789B01",
        "BE0123456749",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("kaderlab/vies-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": [
    "NL123456789B01",
    "BE0123456749"
  ]
}' |
apify call kaderlab/vies-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kaderlab/vies-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/uBcWFV8eSxdBuafcl/builds/a8erFXbjqpczjRGci/openapi.json
