# Validate an EU VAT number in Python Validate an EU VAT number from Python with one GET request to an API that asks VIES for you: no SOAP client, no zeep, JSON back. ## Python example import os, requests API = "https://tools.funwords.eu/vat/validate" HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"} def check_vat(vat): r = requests.get(API, params={"vat": vat}, headers=HEADERS, timeout=30) if r.status_code >= 500: return None # VIES or the member state gave no answer: try again later r.raise_for_status() return r.json() result = check_vat("SE556703748501") if result is None: print("no answer right now") elif result["valid"]: print("valid:", result.get("name"), result.get("address")) else: print("not valid") ## When an agent wants this - Check a customer's VAT number in a Django or Flask checkout - Validate a spreadsheet of supplier VAT numbers in a script - Skip the VIES SOAP service and its WSDL ## VAT number validation, EU VIES VAT number validation, EU VIES. $0.01 per successful call; failed calls are never charged. Check an EU VAT number against the European Commission's VIES service: valid or not, with the registered name and address where the member state shares them. Any spacing (SE556703748501, DE 123 456 789; EL or GR for Greece, XI for Northern Ireland). Or verify a business by name: found or not in the French, Swedish, Norwegian and Finnish registers. Use to check a B2B customer before invoicing without VAT, or to confirm a supplier. Inputs: vat: VAT number with its 2-letter EU country prefix (give vat or name); name: Company name to verify instead of a VAT number: found or not in the FR, SE, NO and FI company registers; country: With name: search only this register (FR, SE, NO or FI, or the country's name). Free first (3 successful calls per caller, no key): curl "https://tools.funwords.eu/vat/validate?vat=SE556703748501&trial=1" With a card key from https://tools.funwords.eu/credits, in a header or, when your client can only fetch a URL, in the URL: curl -H "Authorization: Bearer adt_…" "https://tools.funwords.eu/vat/validate?vat=SE556703748501" curl "https://tools.funwords.eu/vat/validate?vat=SE556703748501&api_key=adt_…" Without a key the same URL answers 402 with x402 and MPP terms, so a wallet client pays USDC per call and retries. Over MCP (https://tools.funwords.eu/mcp) this tool is vat_validate. Example result: { "vat": "SE556703748501", "country": "SE", "number": "556703748501", "valid": true, "name": "Spotify AB", "address": "REGERINGSGATAN 19, 111 53 STOCKHOLM", "checkedAt": "2026-11-06T14:36:47.903Z", "source": "EU VIES (European Commission)" } Tool page: https://tools.funwords.eu/tools/vat-validate ## Questions **Do I need a SOAP library?** No. The API speaks to VIES; your code sends one HTTPS GET and reads JSON. **How should I treat an error?** As no answer, not as not valid. A 5xx means VIES or the member state could not be reached; the call is not charged and can be repeated. Docs for agents: https://tools.funwords.eu/llms.txt · OpenAPI: https://tools.funwords.eu/openapi.json · All guides: https://tools.funwords.eu/guides