Taxrates.io API
Introduction
Taxrates.io is a global tax rate service that automates the management of monitoring tax rates changes in 181 countries. We monitor over 14,000 US sales tax, VAT, GST rates for you and make updates via our API so you always have the most update tax rates.
You can use Taxrates.io as a virtual sandbox where we provide you with 30 days free trial.
Countries
We currently support the following countries around the world. If you would like to request the addition of a new country, please email us at
Products codes
The Taxrates.io API’s provides product-level tax rates for a subset of product codes. These codes are to be used for products that are either exempt from tax in some jurisdictions or are taxed at reduced rates.
We will be expanding support for additional, less common categories over time. If you would like to request the addition of a new product category, please email us at
Please select a product code/s when making a request to the Taxrates.io API
Filtering
When calling the API endpoints you can use 'filter' parameters to get tax rate for the selected type. You can get the following tax types (Each tax rate will always have one of following types)
US Sales tax Rates
- CombinedRate
- StateRate
- CountyRate
- CityRate
- SpecialRate
We recommend using when discovering our API. Happy using!
Rate Limiting
We limit API requests.
If you’re exceeding this rate and encountering 429 errors, review the following:
- Only make requests in states / regions where you have enabled.
- Cache responses if the order details haven’t changed since the last calculation at checkout.
Errors
The Taxrates.io API uses the following error codes:
Verify your API token is correct and make sure you’re correctly setting the .
If you’re still not sure what’s wrong, and we’ll investigate.
Changelog
Stay on top of new developer-facing features, accuracy improvements, and bug fixes for our API. Have a request? Encounter an issue?
Contact Support: Name:
- Homepage
- https://api.apis.guru/v2/specs/taxrates.io/1.0.0.json
- Provider
- taxrates.io
- OpenAPI version
- 3.0.3
- Spec (JSON)
- https://api.apis.guru/v2/specs/taxrates.io/1.0.0/openapi.json
- Spec (YAML)
- https://api.apis.guru/v2/specs/taxrates.io/1.0.0/openapi.yaml
Tools (5)
Extracted live via the executor SDK.
-
v1Tax.taxRatesByCountryCodeGet request. This method returns all tax rates for country discovered based on country code. The country code must be 2 letters ISO 3166-1 alfa-2 country code (see for more information). You can use 'filter' parameter to narrow results to selected type of tax
For US sales tax you can filter the tax rate you want for each state or zip code with one of the following: (they are case sensitive)
- CombinedRate
- StateRate
- CountyRate
- CityRate
- SpecialRate
var taxrates_endpoint = 'tax/countrycode'; var taxrates_params = {'domain':'api.taxrates.io', 'country_code':'IE', 'product_code':'C010'}; var taxrates_url = '/api/v1/'; if ( localStorage.getItem("Taxrates_API_Client_Secret") ){ jQuery.support.cors = true; jQuery.ajax({ url: taxrates_url+taxrates_endpoint, type: 'get', method: 'get', dataType: "json", data: taxrates_params, beforeSend: function (request) { request.withCredentials = true; request.setRequestHeader("Authorization", "Apikey " + localStorage.getItem("Taxrates_API_Client_Secret")); }, headers: { "accept": "application/json" }, contentType: 'application/json; charset=utf-8', success: function (data) { //Maintain errors inside success because the API may return 200 in general, but different code inside if(data.ErrorCode=='404' || data.ErrorCode=='500'){ //Maintain errors here console.log(data.ErrorMessage); return false; }else{ var rates = []; var i=0; jQuery.each(data, function(k, v) { if(v.hasOwnProperty("taxes")){ jQuery.each(v.taxes, function(m, w) { rates[i] = []; //Only showing standard rate type if( w.Type == "standard" ){ rates[i][0] = w.Country; rates[i][1] = w.Type; rates[i][2] = w.data_value; i++; } }); } //Now you have all your rates inside rates variable. }).fail(function(xhr) { //Maintain your errors here return false; }); return true; }else{ //Not logged into taxrates.io //Maintain your errors here return false; } -
v1Tax.taxRatesByIpAddressGet request. This method returns all tax rates for country discovered on either your IP address or IP address param. The IP param is not required. When empty, the taxrates.io will try to discover your IP address and based on this will retrieve the tax rates. You can use 'filter' parameter to narrow results to selected type of tax
For US sales tax you can filter the tax rate you want for each state or zip code with one of the following: (they are case sensitive)
- CombinedRate
- StateRate
- CountyRate
- CityRate
- SpecialRate
var taxrates_endpoint = 'tax/ip'; var taxrates_params = {'domain':'api.taxrates.io', 'ip':'208.80.152.201', 'product_code':'C010'}; var taxrates_url = '/api/v1/'; if ( localStorage.getItem("Taxrates_API_Client_Secret") ){ jQuery.support.cors = true; jQuery.ajax({ url: taxrates_url+taxrates_endpoint, type: 'get', method: 'get', dataType: "json", data: taxrates_params, beforeSend: function (request) { request.withCredentials = true; request.setRequestHeader("Authorization", "Apikey " + localStorage.getItem("Taxrates_API_Client_Secret")); }, headers: { "accept": "application/json" }, contentType: 'application/json; charset=utf-8', success: function (data) { //Maintain errors inside success because the API may return 200 in general, but different code inside if(data.ErrorCode=='404' || data.ErrorCode=='500'){ //Maintain errors here console.log(data.ErrorMessage); return false; }else{ var rates = []; var i=0; jQuery.each(data, function(k, v) { if(v.hasOwnProperty("taxes")){ jQuery.each(v.taxes, function(m, w) { rates[i] = []; //Only showing standard rate type if( w.Type == "standard" ){ rates[i][0] = w.Country; rates[i][1] = w.Type; rates[i][2] = w.data_value; i++; } }); } //Now you have all your rates inside rates variable. }).fail(function(xhr) { //Maintain your errors here return false; }); return true; }else{ //Not logged into taxrates.io //Maintain your errors here return false; } -
v3Tax.allTaxRatesGet request. This method returns all tax rates configured on your account. Based on your country selection the endpoint will return all taxes for all countries. You can use the 'filter' parameter to narrow results to selected type of tax. Use 'zip' parameter when you have selected the United States.
We have development an easy to use scheduler so you can call the API to get the rates every hour or day. Please click on the following link to see the .
Please note in cases when a US state doesn't have sales tax and when a product is tax exempt for a zip code or for a state the API response will be "null"
To get a response you need to have selected a product code in your Taxrates.io dashboard, please see the Introduction section above for description of the different types of product codes.
For US sales tax you can filter the tax rate you want for each state or zip code with one of the following: (they are case sensitive)
- CombinedRate
- StateRate
- CountyRate
- CityRate
- SpecialRate
var taxrates_endpoint = 'tax/rates'; var taxrates_params = {'domain':'api.taxrates.io'}; var taxrates_url = '/api/v3/'; if ( localStorage.getItem("Taxrates_API_Client_Secret") ){ jQuery.support.cors = true; jQuery.ajax({ url: taxrates_url+taxrates_endpoint, type: 'get', method: 'get', dataType: "json", data: taxrates_params, beforeSend: function (request) { request.withCredentials = true; request.setRequestHeader("Authorization", "Apikey " + localStorage.getItem("Taxrates_API_Client_Secret")); }, headers: { "accept": "application/json" }, contentType: 'application/json; charset=utf-8', success: function (data, textStatus, jqXHR) { //Maintain errors inside success because the API may return 200 in general, but different code inside if(data.ErrorCode=='404' || data.ErrorCode=='500'){ //Maintain errors here console.log(data.ErrorMessage); return false; }else{ var rates = []; var i=0; var taxrates_range = ''; jQuery.each(data, function(k, v) { if(v.hasOwnProperty("rates")){ jQuery.each(v.rates, function(m, w) { rates[i] = []; //Only showing standard rate type if( w.Type == "standard" ){ rates[i][0] = w.Type; rates[i][1] = w.data_value; rates[i][2] = w.product_code; i++; } }); } }).fail(function(xhr) { //Maintain your errors here return false; }); var cursor = jqXHR.getResponseHeader('X-Cursor-Next'); if (cursor) { // get next page... } return true; }else{ //Not logged into taxrates.io //Maintain your errors here return false; } -
openapi.previewSpecPreview an OpenAPI document before adding it as a source
-
openapi.addSourceAdd an OpenAPI source and register its operations as tools