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

VAT Validation API

The VAT Validation API validates EU VAT numbers against the official EU 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 (a routine occurrence), 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.

(4.5)

From 3,757 users

3,000+

Applications using this API

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


/v1/vatvalidation GET

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

Validates a VAT number from any of the 27 EU member states or Northern Ireland (XI).

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.

Parameters

  • vat  required

    The VAT number to validate, including its 2-letter country prefix (for example FR40303265045). Spaces, dots, and hyphens are tolerated. 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 VAT number (with country prefix). Forces a live registry check and returns an official consultation_number as audit evidence.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON object containing 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).

  • country

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

  • number

    The national part of the VAT number, without the country prefix.

  • 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

    Where the answer came from: vies (the official EU registry) or seed (a national open-registry snapshot). null for offline format/checksum verdicts.

  • cached

    true when the answer was served from the validation cache (for example while a registry is down) rather than a live registry check.

  • 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. Note: Germany and Spain suppress this field in the EU registry, so it is null for valid DE and ES numbers (the message field notes this).

  • company_address premium only

    The registered company address. Suppressed by Germany and Spain in the EU registry, like company_name.

  • 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 on live checks when requester_vat is supplied; null on cached answers.

  • message

    Optional human-readable note, for example when a registry is temporarily unavailable or when a country suppresses company details.

Sample Request Live Demo!

vat
country
requester_vat

Try this endpoint live with a free API key

Instant access — no credit card required.

https://api.api-ninjas.com/v1/vatvalidation?vat=FR40303265045

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
{
    vat:"FR40303265045",
    country:"FR",
    number:"40303265045",
    format_valid:true,
    checksum_valid:true,
    status:"valid",
    source:"vies",
    cached:false,
    checked_at:"2026-07-12T09:14:03Z",
    company_name:"SA SODIMAS",
    company_address:"11 RUE AMPERE, 26600 PONT-DE-L'ISERE",
    consultation_number:"WAPIAAAAY7X6vLmO"
}

Code Examples

1 2 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 EU VAT numbers against the official EU registries, 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 VAT number in the requester_vat parameter and the response includes a consultation_number from a live registry check. This field is available on paid plans.
  • All 27 EU member states plus Northern Ireland (XI prefix). Greek numbers are accepted with either the GR or the official EL prefix. United Kingdom, Switzerland, Norway, and Australia coverage is coming soon. For EU VAT rates rather than number validation, see the VAT Rates API.
  • Germany and Spain suppress company name and address in the EU registry for privacy reasons, so those fields are null for valid DE and ES numbers — the API notes this in the message field. Registration status, format and checksum validation, and consultation numbers all work normally for both countries.