Official Python SDK for the EuroValidate API -- validate EU VAT numbers, IBANs, EORI numbers, and look up company data in one unified API.
pip install eurovalidateRequires Python 3.9+.
from eurovalidate import EuroValidate
client = EuroValidate("ev_live_your_key_here")
# Validate a VAT number
result = client.validate_vat("NL820646660B01")
print(result.valid) # True
print(result.company_name) # "COOLBLUE B.V."
print(result.company_address)
print(result.meta.confidence) # "HIGH"Get your free API key at eurovalidate.com.
result = client.validate_vat("DE121132589")
print(result.valid, result.company_name, result.country_code)result = client.validate_iban("DE89370400440532013000")
print(result.valid, result.bank_name, result.bic)result = client.validate_eori("DE328169180000040")
print(result.valid, result.company_name)result = client.lookup_company_by_lei("724500Y6DUVHQD6OXN27")
print(result.company_name, result.registered_address)rates = client.get_vat_rates("DE")
print(rates.standard_rate) # 19.0
for rate in rates.rates:
print(f"{rate.type}: {rate.rate}%")
# All EU countries
all_rates = client.get_all_vat_rates()result = client.validate(
vat="NL820646660B01",
iban="DE89370400440532013000",
eori="DE328169180000040",
)
print(result.vat.valid, result.iban.valid, result.eori.valid)account = client.get_account()
print(f"Plan: {account.plan}, Used: {account.calls_used}/{account.calls_limit}")Every method is also available as an async version:
from eurovalidate import AsyncEuroValidate
async with AsyncEuroValidate("ev_live_your_key_here") as client:
result = await client.validate_vat("NL820646660B01")
print(result.valid, result.company_name)The SDK raises typed exceptions for API errors:
from eurovalidate import EuroValidate, AuthError, RateLimitError, ValidationError
client = EuroValidate("ev_live_your_key_here")
try:
result = client.validate_vat("INVALID")
except AuthError:
print("Invalid API key")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after}s")
print(f"Limit: {e.rate_limit.limit}, Remaining: {e.rate_limit.remaining}")
except ValidationError as e:
print(f"Bad input: {e.detail}")Rate-limited requests (HTTP 429) are automatically retried up to 3 times using the Retry-After header.
EuroValidateError-- base class for all API errorsAuthError-- 401 UnauthorizedRateLimitError-- 429 Too Many RequestsValidationError-- 400 / 422 invalid inputNotFoundError-- 404 Not FoundServerError-- 5xx server errors
All exceptions include status_code, detail, request_id, and rate_limit attributes.
Every result includes a meta field with data freshness information:
result = client.validate_vat("NL820646660B01")
print(result.meta.confidence) # "HIGH", "MEDIUM", "LOW", or "UNKNOWN"
print(result.meta.source) # "vies_live", "cache", etc.
print(result.meta.cached) # True/False
print(result.meta.response_time_ms)
print(result.meta.last_verified) # ISO 8601 timestampclient = EuroValidate(
"ev_live_your_key_here",
base_url="https://api.eurovalidate.com", # default
timeout=30.0, # seconds, default
)MIT