Tax Data API API

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

Overview

Tax Data API by APILayer lets you instantly validate VAT numbers and retrieve tax rate information for countries around the world. It is especially useful for e-commerce platforms, invoicing software, and SaaS businesses that need to handle international tax compliance. An API key is required and can be obtained through the APILayer marketplace.

💡

Beginner Tip

When validating a VAT number, always include the country code prefix (e.g., "GB123456789" for UK, "DE123456789" for Germany). The API returns whether the number is valid along with the associated company name and address.

Available Data

Tax Data API 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 valid and registered.
vat_number The VAT number that was validated, including the country prefix.
company_name Registered company name associated with the VAT number.
company_address Registered business address of the VAT-registered company.
country_code Two-letter ISO country code extracted from the VAT number.

Implementation Example

const url = "https://apilayer.com/marketplace/tax_data-api";
// 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

401 Unauthorized API key is missing or not passed in the correct header.
Pass your API key in the apikey request header (not as a query parameter): -H "apikey: YOUR_API_KEY".
400 Bad Request - invalid VAT format VAT number is missing the country code prefix or contains invalid characters.
Prepend the ISO 3166-1 alpha-2 country code to the VAT number (e.g., "DE" + "123456789" = "DE123456789").
valid: false for a known-valid number The VAT validation service may be temporarily unavailable for certain EU countries.
Retry the request after a short delay, or implement a fallback to the EU VIES system for critical validations.

Matrix Score Breakdown

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

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Finance
Difficulty Intermediate
Verified: 2026-04-07

Similar APIs

View All →