Guide · Trade checks

VAT number and EORI number checks in code: VIES, HMRC and EOS

If you sell to or buy from businesses in the EU or UK, you often need to confirm a trading partner's VAT number or EORI number. Three official public services answer those checks, and none of them needs an API key for a basic check.

Which service checks what

Number Service Notes
EU VAT (27 member states, plus Northern Ireland XI) VIES, the European Commission's VAT Information Exchange System Has a REST API. Says whether the number is valid for cross-border trade within the EU on the check date.
GB EORI HMRC's Check an EORI number API Open access.
EU and XI EORI The European Commission's EORI validation service (EOS) A SOAP service.
GB VAT HMRC's VAT number checking API Needs an HMRC developer account and application.

A VIES check in Python, no key

import json, urllib.request
body = json.dumps({"countryCode": "IE", "vatNumber": "6388047V"}).encode()
req = urllib.request.Request(
    "https://ec.europa.eu/taxation_customs/vies/rest-api/check-vat-number",
    data=body, headers={"Content-Type": "application/json"})
with urllib.request.urlopen(req, timeout=30) as r:
    ans = json.load(r)
print(ans["valid"], ans["requestDate"])

On 31 October 2026 it printed True and the check date.

Things that trip people up

We built this

Disclosure: Your Evenings Ltd built and sells this. It's independent and isn't affiliated with or endorsed by the European Commission or HMRC. The VAT Number Checker & EORI Checker on Apify Store takes up to 500 numbers per run and returns one row per number: valid, invalid or why it wasn't checked, with the official check date and source. It checks VAT numbers locally first (the format, and the check digits for most formats), checks each VAT number with VIES at most once a day, and never reports an outage as invalid. GB VAT numbers get a local check only. In monitor mode it tells you when a number became invalid or valid. Trader names and addresses are off by default.

It is for checking the numbers of businesses you trade with or are about to trade with. It checks only numbers you supply, with no search or listing mode. Don't republish or resell the results as a database.

It costs $0.002 per fresh valid or invalid answer, plus $0.01 for a monitor run where at least one number changed (base Apify prices; higher plans pay less). Local failures, cached answers, outages and unsupported numbers are free.

FAQ

Do I need an API key to check a VAT number with VIES? No. The VIES REST API answers a single VAT number check without a key. HMRC's Check an EORI number API is open access too.

Can I check GB VAT numbers? HMRC's VAT number checking API needs an HMRC developer account and application, so the Actor doesn't use it. GB VAT numbers get a free local check-digit result only.

What if VIES is down? The Actor returns a free source_unavailable row that says to try again later. An outage is never reported as invalid.

Can I build a database of VAT numbers with it? No. It is for checking your own trading partners' numbers. It checks only numbers you supply, and you shouldn't republish or resell the results.

Product names and logos belong to their owners. Your Evenings Ltd is not affiliated with or endorsed by them. VAT and EORI checks use VIES, HMRC and EOS, for checking your own trading partners only. Your Evenings Ltd is not affiliated with or endorsed by the European Commission or HMRC.