EU VAT & Global Tax ID Validator
Validates tax IDs across EU VAT (VIES), UK VAT, US EIN, Australian ABN, and Indian GSTIN. Returns business name, address, and registration status.
/api/validate-tax-id
Why Use This API?
Instantly validate tax identification numbers across multiple global jurisdictions. Verify business legitimacy, retrieve official registration details, and ensure tax compliance for B2B transactions. Supports real-time VIES lookups for EU VAT numbers with automatic fallback during service outages.
Code Examples
curl -X POST https://api.atomicapis.dev/api/validate-tax-id \
-H "X-RapidAPI-Proxy-Secret: YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"taxId": "DE123456789",
"countryHint": "DE"
}'
Description
The EU VAT & Global Tax ID Validator API provides comprehensive validation of tax identification numbers across multiple jurisdictions worldwide. Whether you're verifying EU VAT numbers through the official VIES (VAT Information Exchange System), checking US Employer Identification Numbers (EIN), or validating Australian Business Numbers (ABN), this API delivers accurate, real-time results.
Key Features
- Real-time VIES Integration — Direct connection to EU's VAT Information Exchange System for live validation of EU VAT numbers
- Multi-Jurisdiction Support — Validate tax IDs from EU, UK, US, Australia, and India with a single API
- Business Details Retrieval — Get official business name, registered address, and current registration status
- Automatic Fallback — Format validation continues to work even when government services are unavailable
- Checksum Validation — Algorithmic checksum verification for UK VAT (mod 97), Australian ABN (mod 89), US EIN (IRS campus prefix), and Indian GSTIN (Luhn mod 36)
Supported Tax ID Formats
All 27 EU member states via VIES
DE123456789, FRXX123456789
Post-Brexit UK VAT validation
GB123456789, GB123456789001
Employer Identification Number
12-3456789, 98-7654321
Australian Business Number
12 345 678 901
Goods and Services Tax Identification Number
22AAAAA0000A1Z5
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
taxId |
string | Yes | The tax identification number to validate | DE123456789 |
countryHint |
string | Optional | ISO 3166-1 alpha-2 country code. Auto-detected if not provided. | DE |
Tip: The countryHint parameter is optional because the API can often auto-detect the country from the tax ID format. However, providing it explicitly improves accuracy and response time.
Response Format
{
"isValid": true,
"taxIdType": "eu_vat",
"country": "DE",
"formattedId": "DE123456789",
"businessName": null,
"businessAddress": null,
"isActive": null,
"validationMethod": "vies_fallback_format",
"error": "VIES service unavailable. Format validation only."
}
Response Fields
| Field | Type | Description |
|---|---|---|
isValid |
boolean | Whether the tax ID is valid |
taxIdType |
string | Type of tax ID: eu_vat, uk_vat, us_ein, au_abn, or in_gstin |
country |
string | ISO 3166-1 alpha-2 country code (e.g., DE, GB, US, AU, IN) |
formattedId |
string | The tax ID formatted according to its jurisdiction's standard format |
businessName |
string | null | Official registered business name (if available) |
businessAddress |
string | null | Registered business address (if available) |
isActive |
boolean | null | Whether the registration is currently active (if available) |
validationMethod |
string | null | Method used for validation: vies_live, vies_fallback_format, checksum, or format_only |
error |
string | null | Error message if validation failed, otherwise null |
Use Cases
B2B Invoice Validation
Automatically validate customer VAT numbers before issuing invoices to ensure tax compliance and avoid rejected claims.
// Validate before invoice
{
"taxId": customer.vatNumber,
"countryHint": customer.country
}
// Only issue 0% VAT invoice if valid
Tax Compliance
Maintain accurate tax records by verifying supplier and customer tax IDs for audit trails and regulatory compliance.
// Store validation record
{
"validationMethod": "vies_live",
"isActive": true,
"isValid": true
}
Vendor Onboarding
Verify new vendors and suppliers during onboarding to ensure legitimate business entities and accurate tax documentation.
// Onboarding validation
if (response.isValid &&
response.isActive === true) {
approveVendor(vendor);
}
Build Constraints
Understanding the technical implementation details helps you design robust integrations. Here are the key architectural considerations for this API:
VIES SOAP API Integration
EU VAT validation connects directly to the official VIES (VAT Information Exchange System) SOAP API. This provides real-time validation but means response times may vary based on VIES availability (typically 500ms-2s).
Jurisdiction-Specific APIs
Non-EU validations (UK VAT, US EIN, ABN, GSTIN) use local checksum algorithms and format validation. UK VAT uses modulus 97, US EIN validates IRS campus prefixes, Australian ABN uses modulus 89, and Indian GSTIN uses Luhn mod 36. These validations are synchronous and very fast.
Format-Only Fallback
During VIES outages or when government services are unavailable, the API automatically falls back to format validation only. The response will include "validationMethod": "vies_fallback_format" or "format_only" to indicate this mode. Always check this field for critical validations.
Rate Limiting
VIES imposes rate limits on requests. The API has a 5-second HTTP timeout for VIES lookups and falls back to format-only validation if the service is unavailable. For high-volume use cases, consider implementing client-side caching with a TTL of at least 24 hours.
Data Freshness
VIES data is updated by member states on varying schedules. Some countries update in real-time, others batch update daily or weekly.
Error Codes
| HTTP Status | Response Body | Description | Resolution |
|---|---|---|---|
| 200 | { "isValid": false, "error": "..." } |
Tax ID is invalid or unrecognized. The error field contains the reason (e.g., invalid format, failed checksum, unknown type). |
Check the error field for details and correct the tax ID |
| 400 | { "message": "The 'taxId' field is required and cannot be empty." } |
The taxId field is missing or empty |
Provide a non-empty taxId in the request body |
| 400 | { "message": "An error occurred during tax ID validation." } |
An unexpected error occurred during validation | Retry the request or contact support |
| 401 | { "message": "Unauthorized: Invalid or missing X-RapidAPI-Proxy-Secret header." } |
The API secret header is missing or invalid | Verify your X-RapidAPI-Proxy-Secret header value |
Ready to validate tax IDs?
Start validating EU VAT numbers and global tax IDs in minutes. Get your API key and make your first request.
MCP Integration MCP Ready
What is MCP?
Model Context Protocol (MCP) allows AI assistants like Claude to call this API as a native tool during conversation. Instead of writing HTTP requests, the AI invokes the tool directly — no API keys or boilerplate needed on the client side.
Tool Details
TaxIdValidatorTools
ValidateTaxId()
Description
Validates VAT and Tax IDs with optional VIES lookup