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

PathBest forTime to go liveComplexityCost
HMRC v2 (direct)Audit/compliance workflows2–4 weeksHighFree
Third-party VAT APIFaster integration1–2 hoursLowPaid
APITier VAT APIAll-in-one validationMinutesVery lowFree tier

Path 1 — Migrate directly to HMRC VAT API v2

Registration process (important steps)

  1. Register on HMRC Developer Hub
  2. Create an application
  3. Subscribe to VAT API
  4. Complete sandbox testing
  5. Wait for approval (~2 weeks)
  6. Get client_id and client_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 Accept header
  • 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

FeatureHMRC v2APITier
GB VATYesYes
EU VATNoYes
XI VATNoYes
OAuth handlingManualAutomatic
Setup timeWeeksMinutes
Downtime handlingNoYes
Free tierLimited500/month

UK VAT number format validation

Common formats:

  • GB123456789
  • 123456789
  • GB123456789012
  • GBGD123
  • GBHA123

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

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/