VATlayer API

Data Validation / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

VATlayer is a REST API for validating EU VAT numbers in real time against official EU VIES (VAT Information Exchange System) data, returning company name, address, and registration status. It also provides VAT rate tables by country and category, useful for e-commerce tax compliance across the European Union. A free plan allows 100 requests per month.

💡

Beginner Tip

Get a free API key at vatlayer.com. VAT numbers must include the country code prefix (e.g., `GB123456789`, `DE123456789`). The validate endpoint is `http://apilayer.net/api/validate?access_key=YOUR_KEY&vat_number=GB123456789`. Note that the free plan uses HTTP only — HTTPS requires a paid plan.

Available Data

Use case: Integrate vat number validation data into web and mobile applications
VATlayer data via REST API
JSON-formatted response data
Requires API key authentication

Example Response

JSON Response
{
  "input": "[email protected]",
  "is_valid": true,
  "format_valid": true,
  "details": "Input passes all validation checks"
}

Field Reference

valid Whether the VAT number is currently registered and active in the EU VIES system.
vat_number The VAT number that was checked, without the country prefix.
country_code ISO 2-letter country code of the VAT registration (e.g., `GB`, `DE`).
company_name Registered company name returned by VIES (may be null if VIES does not expose it).
company_address Registered company address from VIES (may be null depending on member state disclosure rules).

Implementation Example

const url = "https://vatlayer.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

invalid_access_key in response Missing or incorrect API key.
Copy the exact key from your vatlayer dashboard. Keys are case-sensitive and tied to your account email.
invalid_vat_number — valid-looking number fails VAT number format is wrong for the country, or the number is not yet registered in VIES.
Include the 2-letter country prefix (e.g., `DE` for Germany). VIES data can lag up to 48 hours for newly registered numbers.
HTTPS request blocked on free plan VATlayer's free tier only supports HTTP connections.
Upgrade to a paid plan for HTTPS, or make requests server-side to avoid exposing the key in a browser over HTTP.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Data Validation
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →