How do I get the company behind a VAT number?

GET /companies/by-identifier?type=vat&value=<number> returns the company record the number belongs to; GET /vat/{number} asks the EU VIES service whether the number is valid. Both work with the demo key.

Call 1: the company behind the number

curl 'https://api.prometiam.com/functions/v1/risk-api/companies/by-identifier?type=vat&value=ESA15075062' \
  -H 'Authorization: Bearer rk_live_demo_publichn'

Answer of 10 November 2026, shortened (one company object under data, about 60 fields in all):

{
  "data": {
    "id": 1741526,
    "country": "ES",
    "company_number": "A15075062",
    "company_name": "INDUSTRIA DE DISEÑO TEXTIL, S.A",
    "identifiers": [ { "type": "nif", "value": "A15075062" }, { "type": "vat", "value": "ESA15075062" } ],
    "vat_number": "ESA15075062",
    "vat_number_source": "rule",
    "lei": "549300TTCXZOGZM2EY83",
    "status": "active",
    ...
  },
  "meta": { "resolved_by": "vat_prefix", "country": "ES", ... }
}

The country prefix of the number (ES) chose the register. For a number without a prefix, add country=ES.

Call 2: is the number valid in VIES

curl 'https://api.prometiam.com/functions/v1/risk-api/vat/ESA15075062' \
  -H 'Authorization: Bearer rk_live_demo_publichn'
{
  "data": {
    "vat_number": "ESA15075062",
    "country_code": "ES",
    "number": "A15075062",
    "is_valid": true,
    "name": null,
    "address": null,
    "request_date": "2026-11-09T23:20:56.509Z",
    "source": "VIES — VAT Information Exchange System (European Commission)",
    "registry_match": {
      "company_id": 1741526,
      "company_name": "INDUSTRIA DE DISEÑO TEXTIL, S.A",
      "address": "AV. DIPUTACIÓN SIN EDIFICIO INDITEX, 15142, ARTEIXO, LA CORUÑA, 15142, ARTEIXO",
      "register": "BORME (Registro Mercantil)"
    }
  },
  "meta": { "query_ms": 524, ... }
}

VIES returned no name and no address for this number. registry_match is the company our register data holds under that number, so you still get the name.

How to read the answer

FieldWhat it tells you
vat_numberThe VAT number of the company, on every company object, also in identifiers as vat.
vat_number_source registerThe register publishes the number, or confirms the registration and the number is the law's format of its identifier.
vat_number_source ruleThe number is built from the company's identifier (Spain: ES plus the NIF). The format is right; the registration is not confirmed.
is_validVIES's answer: true when the number is registered for intra-EU trade.
registry_matchThe company in the register data behind the number, or null if none.
meta.resolved_byHow the country was found: vat_prefix when the number starts with a country code.

The two calls answer different questions. Call 1 says which company has the number in the register data; call 2 says whether the tax authority's system currently holds the number as valid. For a rule number, run both.

What it costs

Each call costs 1 credit, 2 credits for the pair. Errors are free. Starter EUR 9.99 includes 1,000 credits a month, Professional EUR 29.99 10,000, Scale EUR 99.99 50,000.

Limits

  • VIES covers numbers of EU member states only. It has no Norwegian or Swiss numbers; for NO and CH the VAT number is built or confirmed from the register data, not checked in VIES.
  • Where the register gives no VAT number and no rule exists, vat_number is null. That is the case for countries such as GB, IE, DE and US. A search by VAT number is then refused with a 400.
  • For Norway, Finland and Belgium the register confirms the VAT registration; where it says a company is not VAT-registered the field is null.
  • A rule number is a well-formed guess from the identifier, not proof that the company is registered for VAT.
  • VIES may return no name or address, as in the answer above.

What can go wrong

  • 400 validation_error: the number is malformed for its country. Fetched on 10 November 2026 for ESA1507506: "vat for country=ES is a Spanish company VAT number: ES plus a valid NIF (for example ESA28015865), or the NIF alone".
  • 400 for a country whose register holds no VAT number, for example "The GB register holds no VAT number, so a GB VAT number cannot be searched; use company_number or name".
  • GET /vat/{number} with a malformed number answers 200 with is_valid false and registry_match null.
  • 429 when the rate limit or credits are used up.

Related pages

Sign up · API documentation

The free trial lasts 14 days and includes 500 credits. A card is required and nothing is charged during the trial; it then continues as Starter (EUR 9.99/month) unless you cancel.

Frequently asked questions

Is a rule VAT number the same as a validated one?
No. rule means the number was built from the company identifier by the country's format. Only VIES, call 2, says whether it is registered.
Which source does the VAT number have for each country?
It is printed in vat_number_source on every company object. The register publishes it for some countries, such as Estonia, Latvia, Lithuania and Australia, and the rest are built by rule or null.
Can I look up many VAT numbers at once?
Yes for companies: POST /companies/lookup takes identifiers in batches of up to 100. VIES checks are one number a call.
Does this work for non-EU countries?
Search by VAT number works where the register holds or the law defines the number. VIES validation is for EU numbers only.