Tax Data API

Tax Data API

Instant VAT number and tax validation across the globe.
Free Plan $0.00 Monthly Subscribe
100 Requests / Monthly
Free for Lifetime
No Credit Card Required
MOST POPULAR
Starter Plan $19.99 Monthly Subscribe
1,000 Requests / Monthly
Standard Support
VAT Number Validation Endpoint
VAT Rate Endpoint
Price Calculation VAT Compliant
Pro Plan $49.99 Monthly Subscribe
5,000 Requests / Monthly
Standard Support
VAT Number Validation Endpoint
VAT Rate Endpoint
Price Calculation VAT Compliant
Enterprise Plan $399.99 Monthly Subscribe
50,000 Requests / Monthly
Standard Support
VAT Number Validation Endpoint
VAT Rate Endpoint
Price Calculation VAT Compliant
Custom Plan Volume Monthly Contact Us
Any requests volume you need
VAT Number Validation Endpoint
VAT Rate Endpoint
Price Calculation VAT Compliant

Tax Data API is a REST API that is able to validate VAT numbers, provide information for the tax rates per single country or all countries based on country code or IP address, and to convert prices according to the tax rates and the type of the product, Tax Data API validates VAT numbers in 38 countries and retrieves tax information for over 130 countries across the globe.

Request the API to perform a country-specific & VAT compliant price calculation on your behalf. It is a simple and secure API that delivers results in light JSON format and is secured via 256-bit HTTPS encryption. Prettyprint your JSON response, make use of JSONP Callbacks, Access-Control headers, and much more.

Example Request


  curl --request GET 'https://api.apilayer.com/tax_data/validate?vat_number=U75488713&country_code=AT' \
  --header 'apikey: YOUR API KEY'
  

Example Response


{
  "address": "Untere Donaustraße 13-15, AT-1020 Wien",
  "countryCode": "AT",
  "format_valid": true,
  "name": "apilayer Data Products GmbH",
  "requestDate": "2022-06-20 15:54:09",
  "valid": true,
  "vat_number": "U75488713"
}

Tax Data API Reference

This API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Just Getting Started?

Check out our development quickstart guide.

Authentication

Tax Data API uses API keys to authenticate requests. You can view and manage your API keys in the Accounts page.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

All requests made to the API must hold a custom HTTP header named "apikey". Implementation differs with each programming language. Below are some samples.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Endpoints

Canada tax rates by state

Parameters
No parameters.
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Calculate price according to tax rate

Parameters

amount (required)

Amount that will be used for price calculation

Location: Query, Data Type: string

city (optional)

City

Location: Query, Data Type: string

country (optional)

ISO country code (Required if ip_address and use_client_ip are not present)

Location: Query, Data Type: string

incl (optional)

Set to 1 or true to preform reverse calculation if amount already includes tax

Location: Query, Data Type: boolean

ip_address (optional)

Get tax rates according to IP address location

Location: Query, Data Type: string

state (optional)

Two letter state ISO code (Required if country is CA)

Location: Query, Data Type: string

street (optional)

Street

Location: Query, Data Type: string

type (optional)

Goods type on which price is calculated (one from the /types endpoint)

Location: Query, Data Type: string

use_client_ip (optional)

Set to 1 or true to get tax rates according to your IP address location

Location: Query, Data Type: boolean

zip (optional)

Zip Code (Required if country is US)

Location: Query, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Tax rates list by country

Parameters

per_page (optional)

Items per page (If present, items will be paginated by this number)

Location: Query, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Retrieve tax rates

Parameters

city (optional)

City

Location: Query, Data Type: string

country (optional)

ISO country code (Required if ip_address and use_client_ip are not present)

Location: Query, Data Type: string

ip_address (optional)

Get tax rates according to IP address location

Location: Query, Data Type: string

state (optional)

Two letter state ISO code (Required if country is CA)

Location: Query, Data Type: string

street (optional)

Street

Location: Query, Data Type: string

use_client_ip (optional)

Set to 1 or true to get tax rates according to your IP address location

Location: Query, Data Type: string

zip (optional)

Zip Code (Required if country is US)

Location: Query, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Types of goods for tax calculation

Parameters
No parameters.
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

US tax rates by zip code

Parameters

state (required)

State abbreviation (2 letters)

Location: Query, Data Type: string

per_page (optional)

Items per page (If present, items will be paginated by this number)

Location: Query, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Validate VAT numbers

Parameters

country_code (required)

ISO country code (2 letters)

Location: Query, Data Type: string

vat_number (required)

VAT number to look for

Location: Query, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Rate Limiting

Each subscription has its own rate limit. When you become a member, you start by choosing a rate limit that suits your usage needs. Do not worry; You can upgrade or downgrade your plan at any time. For this reason, instead of starting with a larger plan that you do not need, we can offer you to upgrade your plan after you start with "free" or "gold plan" options and start using the API.

When you reach a rate limit (both daily and monthly), the service will stop responding and returning the HTTP 429 response status code (Too many requests) for each request with the following JSON string body text.

{
"message":"You have exceeded your daily\/monthly API rate limit. Please review and upgrade your subscription plan at https:\/\/apilayer.com\/subscriptions to continue."
}

A reminder email will be sent to you when your API usage reaches both 80% and 90%, so that you can take immediate actions such as upgrading your plan in order to prevent your application using the API from being interrupted.

You can also programmatically check your rate limit yourself. As a result of each request made to the APILayer, the following 4 fields provide you with all the necessary information within the HTTP Headers.

x-ratelimit-limit-month: Request limit per month
x-ratelimit-remaining-month: Request limit remaining this month
x-ratelimit-limit-day: Request limit per day
x-ratelimit-remaining-day: Request limit remaining today

You can contact our support unit if you need any assistance with your application regarding to handle the returned result by looking at the header information.

Error Codes

APILayer uses standard HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate a clientside error, which means that failed given the information provided (e.g., a missing parameter, unauthorized access etc.). Codes in the 5xx range indicate an error with APILayer's servers (normally this should'nt happen at all).

If the response code is not 200, it means the operation failed somehow and you may need to take an action accordingly. You can check the response (which will be in JSON format) for a field called 'message' that briefly explains the error reported.

Status Code Explanation
400 - Bad Request The request was unacceptable, often due to missing a required parameter.
401 - Unauthorized No valid API key provided.
404 - Not Found The requested resource doesn't exist.
429 - Too many requests API request limit exceeded. See section Rate Limiting for more info.
5xx - Server Error We have failed to process your request. (You can contact us anytime)

You can always contact for support and ask for more assistance. We'll be glad to assist you with building your product.