NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server →

VAT Validation API

The VAT Validation API validates VAT numbers from the EU, Northern Ireland, Switzerland, and Norway against the official national registries, with instant format and checksum checks, live registry status, company name and address, and audit-ready consultation numbers.

Unlike querying government registries directly, this API always returns an answer: when a national registry is down, you get the last confirmed result with its timestamp instead of an error, and unresolved numbers are automatically re-checked in the background.

For EU VAT tax rates, please use the VAT Rates API.

Online
(4.5)

From 3,757 users

3,000+

Application used this API in the last 28 days.

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
393ms423ms471ms734ms1097ms

Didn't find what you were looking for? Suggest an improvement

https://api.api-ninjas.com/v1/vatvalidation

Validates a VAT number from any of the 27 EU member states, Northern Ireland (XI), Switzerland (CH), or Norway (NO).

Format and checksum validation, registry status, and cached answers are available to all users.

To obtain a consultation_number — the official EU record proving you checked a customer, required as audit evidence when zero-rating intra-EU B2B sales — pass your own company's VAT number in the requester_vat parameter. Consultation numbers are issued for EU and Northern Ireland VAT numbers.

Parameters

  • vat  required

    The VAT number to validate, including its country prefix (for example FR40303265045, CHE-116.281.710 MWST, or NO923609016MVA). Spaces, dots, and hyphens are tolerated, and the Swiss MWST/TVA/IVA and Norwegian MVA suffixes are optional. The prefix may be omitted when the country parameter is set.

  • country  optional

    Two-letter country code (for example DE). Only needed when the vat parameter has no country prefix. Greece is accepted as either GR or the official EL.

  • requester_vat  optional Premium only

    Your own company's EU or Northern Ireland VAT number (with country prefix). Forces a live registry check and returns an official consultation_number as audit evidence. Ignored for Swiss and Norwegian numbers, whose registries do not issue consultation numbers.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v1/vatvalidation endpoint returns a JSON object with the following fields, or an error if the request parameters are invalid. Registry downtime never produces an error — see status and cached.

  • vat

    The normalized VAT number including its country prefix (for example FR40303265045, CHE116281710, or NO923609016MVA).

  • country

    Two-letter registry country code. Greece is returned as EL; Northern Ireland is XI; Switzerland is CH; Norway is NO.

  • number

    The national part of the VAT number, without the country prefix or the Swiss and Norwegian suffixes.

  • format_valid

    Whether the number matches the country's VAT number format. Checked instantly offline — catches typos without a registry round-trip.

  • checksum_valid

    Whether the number passes the country's checksum algorithm. Also checked instantly offline; a failed checksum means the number cannot be valid.

  • status

    The validation verdict: valid (the number is registered for VAT), invalid (failed format/checksum validation, or the registry confirmed it is not registered), or unknown (the number is well-formed but the registry is temporarily unreachable and no cached answer exists — it will be re-checked automatically, so query again shortly).

  • source

    The official registry that confirmed the answer: vies (the EU's VIES system, for EU and Northern Ireland numbers), uid_ch (the Swiss UID register), brreg (the Norwegian Brønnøysund Register Centre), or seed (a result loaded from a national register's published registration data). null when the number failed format or checksum validation or no registry answer exists yet.

  • cached

    true when the answer came from a confirmed registry check made in the last 30 days, or — while a registry is down — from the last confirmed check, rather than a live registry call. Pass requester_vat to force a live check of an EU or Northern Ireland number.

  • checked_at

    UTC timestamp of the registry answer (ISO 8601). For cached results, the time the number was last confirmed.

  • company_name Premium only

    The registered company name.

  • company_address Premium only

    The registered company address.

  • consultation_number Premium only

    The official EU consultation number proving this check took place — the audit evidence for zero-rating intra-EU B2B supplies. Returned only for a live check of an EU or Northern Ireland number made with requester_vat; otherwise null.

  • message

    Human-readable note about the result, for example why a number is invalid (not registered for VAT, deleted, or a member of a Swiss VAT group), that a registry is temporarily unavailable, or that the registry does not disclose company name and address (for example, for German numbers). Only present when there is something to note.

Live Demo

Live demo · no API key required
Query parameters
vat
country
requester_vat

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/vatvalidation?vat=FR40303265045
Sample response
{
"vat": "FR40303265045",
"country": "FR",
"number": "40303265045",
"format_valid": true,
"checksum_valid": true,
"status": "valid",
"source": "vies",
"cached": true,
"checked_at": "2026-10-28T13:01:01Z",
"company_name": "SA SODIMAS",
"company_address": "11 RUE AMPERE\n26600 PONT DE L ISERE",
"consultation_number": null
}

Code Examples

curl -X GET "https://api.api-ninjas.com/v1/vatvalidation?vat=FR40303265045" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the VAT Validation API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.
  • The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.
  • The API validates VAT numbers against the official registries — the EU's VIES system for EU and Northern Ireland numbers, the Swiss UID register, and the Norwegian Brønnøysund Register Centre — but absorbs their unreliability: instant offline format and checksum checks, cached last-known-good answers when a national registry is down, and automatic background re-checking. You get one clean REST call with an API key instead of government endpoints, per-country outages, and error-code folklore.
  • You always get an answer, never a registry error. The status field is three-state: valid, invalid, or unknown. If a registry is unreachable, the API serves the last confirmed result with cached: true and its checked_at timestamp; if the number has never been seen, it returns unknown and keeps re-checking in the background so a follow-up query resolves. See the error codes reference — downtime is never a 4xx or 5xx.
  • A consultation number is the EU's official proof that you checked a customer's VAT number on a given date — the evidence tax auditors ask for when you zero-rate intra-EU B2B sales. Pass your own EU or Northern Ireland VAT number in the requester_vat parameter and the response includes a consultation_number from a live registry check. Consultation numbers exist for EU and Northern Ireland numbers only; the Swiss and Norwegian registries do not issue them. This field is available on paid plans.
  • All 27 EU member states, Northern Ireland (XI prefix), Switzerland (CHE numbers, with or without the MWST, TVA, or IVA suffix), and Norway (NO prefix, with or without the MVA suffix). Greek numbers are accepted with either the GR or the official EL prefix. For EU VAT rates rather than number validation, see the VAT Rates API.
  • Yes, for every supported country except Germany and Spain, which do not publish company name and address through the EU registry. For valid DE and ES numbers those fields are null and the API notes this in the message field. Registration status, format and checksum validation, and consultation numbers all work normally for both countries.