
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
node-tax-api
Advanced tools
This is a wrapper for the free (but rate-limited) TaxAPI.io API that allows users to get up-to-date U.S. sales tax and EU country VAT tax rates. Typings for TypeScript are included and exported.
If you have ES6 module support, you can do the following:
import TaxAPIClient, { TaxAPIClientOptions } from 'node-tax-api';
const taxClientOptions: TaxAPIClientOptions = {
cacheEnabled: true, // This is the default value, as TaxAPI.io best practices indicate results should be cached for one day.
};
// Set up client
const taxClient = new TaxAPIClient(taxClientOptions);
// Get sales tax by U.S. postal code
taxClient.getSalesTaxByZipCode('80521').then(response => console.log(response));
// Get VAT for all EU countries
taxClient.getVATRates().then(response => console.log(response));
// Get VAT for a single EU country
taxClient.getVATRatesByCountryCode('ES').then(response => console.log(response));
// Validate VAT number for a given company
taxClient.validateVATNumber('GB943684002').then(response => console.log(response));
Otherwise, you will want to do this:
const TaxApiClient = require('node-tax-api');
const taxClient = new TaxApiClient.default({ cacheEnabled: true });
// From here, the method usage will look the same.
By default, results from these API calls are cached in-memory for one day. This is at the request of TaxAPI.io, due to the API being free. It is currently rate-limited at one request per second. If you would like to handle caching on your own, or just throw caution to the wind and not cache the results, pass cacheEnabled: false in the options you pass to the TaxAPIClient constructor.
Shameless plug regarding caching: I authored another library, Type-Cacheable, which is the mechanism this library is using under the hood to cache the responses from TaxAPI.io. If you would like more fine-grained control over caching (using Redis rather than an in-memory cache, which would work better for a distributed system, for example), please consider using Type-Cacheable directly. To see how you can accomplish this, refer to the source code of this library.
Special thanks to Abs Farah for creating this free API for tax information. Note that I am not the creator or maintainer of the API, just this convenience wrapper to access it with. I will try to keep this repository up to date with the API as I can. If you would like to contribute new features, bug fixes, or improvements, please open a pull request or issue. Please direct questions, comments, or concerns regarding the API itself to the API maintainer.
FAQs
TypeScript-based library for accessing the free TaxAPI.io API
The npm package node-tax-api receives a total of 12 weekly downloads. As such, node-tax-api popularity was classified as not popular.
We found that node-tax-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.