npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fetch-vat-rates

v1.0.1

Published

Fetch EU VAT rates from the official EU web service in a usable form

Readme

fetch-vat-rates

A minimal library/script to fetch and parse VAT rates from the official Taxes in Europe Database.

Because having to apply for a third-party API key or hope for someone else to manually update a JSON file is, frankly, ridiculous.

The package exports an async function fetchVatRates() that resolves with an object containing:

  • allRates: an array of all active VAT rates in all EU members, with category codes and decriptions.
  • standardRates: a simple mapping of country code to VAT rate in percent, which is probably what you want.
import { fetchVatRates } from 'fetch-vat-rates';
const { allRates, standardRates } = await fetchVatRates();
console.log(standardRates.LV); // 21

The functions it calls in sequence are exported as well:

export async function fetchVatRates() {
    const xml = await fetchVatRateXml();
    const allRates = parseVatRateXml(xml);
    const standardRates = extractStandardRates(allRates);
    return { allRates, standardRates };
}

Command line usage

If you just need the file or want to use this outside of Node.js, you can install the package globally

npm install -g fetch-vat-rates

And run the included "binary" (it's not)

fetch-vat-rates > rates.json

It outputs the full JSON to stdout. There is no interface to speak of.

Important!

  • This package does not include the actual data and will not be updated regularly unless something breaks.
  • The WSDL call takes a few seconds, probably should cache this and/or put it in a cron job.
  • Greece is EL in the data returned from the service. It's copied as GR in standardRates, but allRates are returned as is.

License

Public Domain or CC0