- Home
- API
- Verification API
- HMRC VAT API v1 is dead — he ...

On 17 February 2025, HMRC removed the open-access version of the UK VAT number check API. If you were calling
https://api.service.hmrc.gov.uk/organisations/vat/check-vat-number/lookup/{VRN}without an Authorization header, your requests now return 401 Unauthorized.
You now have three migration paths:
- Upgrade to HMRC v2 (OAuth 2.0, approval required)
- Use a third-party VAT API wrapper
- Switch to a dedicated VAT validation API
This guide explains all three — with working code.
What happened — and why it matters
- HMRC introduced VAT API v1 in January 2021 (post-Brexit) as an open endpoint
- On 17 February 2025, it was permanently removed
- All unauthenticated calls now return HTTP 401
- HMRC VAT API v2 requires OAuth 2.0 authentication
- Registration takes ~2 weeks or more
👉 If your production system is broken today, skip ahead to the fastest solution below.
Your three migration paths at a glance
| Path | Best for | Time to go live | Complexity | Cost |
|---|---|---|---|---|
| HMRC v2 (direct) | Audit/compliance workflows | 2–4 weeks | High | Free |
| Third-party VAT API | Faster integration | 1–2 hours | Low | Paid |
| APITier VAT API | All-in-one validation | Minutes | Very low | Free tier |
Path 1 — Migrate directly to HMRC VAT API v2
Registration process (important steps)
- Register on HMRC Developer Hub
- Create an application
- Subscribe to VAT API
- Complete sandbox testing
- Wait for approval (~2 weeks)
- Get
client_idandclient_secret
Python — Get OAuth Token
import requests
CLIENT_ID = "your_client_id"
CLIENT_SECRET = "your_client_secret"
def get_token():
response = requests.post(
"https://api.service.hmrc.gov.uk/oauth/token",
data={
"grant_type": "client_credentials",
"client_id": CLIENT_ID,
"client_secret": CLIENT_SECRET,
},
)
return response.json()["access_token"]Python — VAT Lookup
def check_vat(vrn, token):
response = requests.get(
f"https://api.service.hmrc.gov.uk/organisations/vat/check-vat-number/lookup/{vrn}",
headers={
"Accept": "application/vnd.hmrc.2.0+json",
"Authorization": f"Bearer {token}",
},
)
return response.json()Key gotchas
- OAuth token expires in 4 hours
- Must send correct
Acceptheader - 404 = VAT not valid (not error)
- Only supports GB VAT numbers
- XI (Northern Ireland) requires EU VIES
Path 2 — APITier VAT Check API (fastest solution)
If you need a working solution today, use
👉 APITier
Why this works better
- No HMRC registration required
- No OAuth complexity
- Supports GB, EU, and XI VAT numbers
- Handles fallback and downtime automatically
Python Example
import requests
API_KEY = "your_api_key"
response = requests.get(
"https://vat.apitier.com/v1/vat/check",
params={
"vatNumber": "GB553557881",
"x-api-key": API_KEY,
},
)
print(response.json())Node.js Example
const axios = require("axios");
axios.get("https://vat.apitier.com/v1/vat/check", {
params: {
vatNumber: "GB553557881",
"x-api-key": "your_api_key",
},
}).then(res => console.log(res.data));CTA — Start using VAT API instantly
👉 Skip the 2-week wait. Go live in minutes.
- Free tier: 500 requests/month
- No credit card required
- Works with Python, Node.js, REST
👉Explore Validate VAT APIs
👉Start free VAT validation now
What APITier adds over HMRC v2
| Feature | HMRC v2 | APITier |
|---|---|---|
| GB VAT | Yes | Yes |
| EU VAT | No | Yes |
| XI VAT | No | Yes |
| OAuth handling | Manual | Automatic |
| Setup time | Weeks | Minutes |
| Downtime handling | No | Yes |
| Free tier | Limited | 500/month |
UK VAT number format validation
Common formats:
GB123456789123456789GB123456789012GBGD123GBHA123
Python Regex
import re
pattern = re.compile(r"^(GB)?(\d{9}|\d{12}|GD[0-4]\d{2}|HA[5-9]\d{2})$")
def is_valid(vat):
return bool(pattern.match(vat))Frequently asked questions
Can I still use HMRC VAT API v1?
No. It was removed on 17 February 2025. All calls return 401.
How long does HMRC v2 registration take?
Typically 2 weeks, sometimes longer.
Does HMRC v2 support EU VAT numbers?
No. Only GB numbers. Use VIES separately.
Is there a free alternative?
Yes — APITier offers 500 free API calls/month.
JSON-LD FAQ Schema
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "Can I still use HMRC VAT API v1?",
"acceptedAnswer": {
"@type": "Answer",
"text": "No. HMRC removed VAT API v1 on 17 February 2025."
}
},
{
"@type": "Question",
"name": "What is the alternative to HMRC VAT API v1?",
"acceptedAnswer": {
"@type": "Answer",
"text": "You can use HMRC v2, third-party APIs, or APITier VAT API."
}
}
]
}Internal resources
- 👉 UK VAT number validation API:https://www.apitier.com/api-catalogue
- 👉 validate UK VAT numbers in Python:https://docs.apitier.com/docs/validate-vat-api/api-requests
- 👉 UK lead validation pipeline: https://docs.apitier.com/
Final thoughts
The removal of HMRC VAT API v1 is not temporary — it’s a permanent shift to authenticated access.
For most teams, the fastest and most practical solution is:
Use APITier
Go live in minutes instead of weeks
🚀 Start Using APITier APIs Today
👉 Start free VAT validation now
https://docs.apitier.com/vat
👉 Explore full API suite
https://www.apitier.com/


