Using the Open US Tariff Datasets in Excel, Python and Google Sheets

Invoice × Tariff editorial

Who this is forAnalysts, developers and researchers who want the raw tariff rates — in Excel, pandas, Google Sheets or their own pipeline.

Download the per-code CSV from the tariff data page (or clone the GitHub datasets), open it in Excel, load it with pandas read_csv, or pull it straight into Google Sheets with IMPORTDATA. Every file carries its ruleset_version, is published under CC BY 4.0 (cite InvoiceTariff.com with the version and data-as-of date), and stays in sync with the site's calculators.

Which dataset for which job

All of the open data comes from the same versioned ruleset snapshot that powers the calculators, so numbers agree across every surface. Pick the shape that fits:

Dataset Best for Where
Per-code rates CSV One row per high-frequency HTS 8-digit code: description, MFN general rate, China 301 list/rate, Section 232 chapter hits, ruleset_version Download from the tariff data page
Economy tiers CSV The 2026 global Section 301 program: tier per origin economy, Chapter 99 reference, effective dates Download from the tariff data page
Section 232 layers CSV Every sector measure with HTS chapter scope, rate, effective date, source URL Download from the tariff data page
us-tariff-rates-2026 The stacked layers as one single-file dataset you can clone or vendor GitHub
hs-codes-database The full HTS 8-digit table (5,689 codes) — not just the high-frequency set GitHub
rulesetSeed in the npm package The same data as typed JSON, for code that computes rather than joins npm install us-tariff-lookup

Excel / Google Sheets

CSVs open directly in Excel (Data → From Text/CSV if your locale mangles the encoding). In Google Sheets, skip the download entirely:

=IMPORTDATA("https://invoicetariff.com/data/us-tariff-ruleset-hts-codes.csv")

Filter the China 301 column to see exactly which of your codes carry the surcharge, or pivot MFN rates by chapter to compare product categories. The ruleset_version column travels with every row, so a screenshot of your sheet always proves which snapshot produced it.

Python (pandas)

import pandas as pd

codes = pd.read_csv("https://invoicetariff.com/data/us-tariff-ruleset-hts-codes.csv")

# Which high-frequency codes from my catalog carry China 301?
my_codes = ["61091000", "84713001", "73181500"]
hits = codes[codes["hts8"].astype(str).str.zfill(8).isin(my_codes)]

# Add the China 301 surcharge on top of MFN (both are % of customs value)
# — for the full stack incl. 232 scope, fees and landed cost, use the engine instead.

For joins and dashboards the CSVs are enough; for stacked, date-aware calculations (entry dates, transport modes, fees, postal tiers) use the us-tariff-lookup engine rather than reimplementing the stacking order — the rules have non-obvious details like mutually exclusive 232 groups and fee caps.

License and how to cite

The data is published under CC BY 4.0: commercial use, modification and redistribution are all fine, attribution is the only condition. A correct citation names the publisher, the dataset version and the as-of date:

InvoiceTariff.com, U.S. Tariff Ruleset v, data as of , CC BY 4.0.

Both values are stamped in every CSV and in npx us-tariff meta. If you publish derived data, keep the version stamp with it — rates change monthly, and an unversioned tariff table ages badly.

Keep current

Rate changes land continuously — that is the point of the Tariff Radar, a sourced changelog with old → new values and an RSS feed. The GitHub repos update in lockstep with the site's snapshot; watch the rates repo to get notified, and re-download (or re-pin the npm version) when the version moves.

Read the quality flags honestly

Rows not yet verified against the Federal Register text carry sample / unverified flags — plenty good for planning, pricing scenarios and demos, not certified for production customs declarations. Every verified row links its official source (USITC / Federal Register / CBP), so your downstream users can check too.

Other ways in: the npm package tutorial covers the engine API, and the web calculator walkthrough shows the same numbers computed interactively.

Frequently asked questions

Can I use the tariff datasets commercially?
Yes. The data is CC BY 4.0 — commercial use, modification and redistribution are permitted with attribution: InvoiceTariff.com, the ruleset version and the data-as-of date. The code (engine, site, apps) is MIT licensed separately.
How often are the datasets updated?
The ruleset snapshot is rebuilt as tariff actions take effect — at least monthly — and the CSVs, GitHub repos and npm package are rebuilt in lockstep with the site. Watch the rates repo or the Tariff Radar RSS feed to catch version bumps.
What is the difference between the two GitHub repos?
us-tariff-rates-2026 is the single-file dataset of the stacked layers (MFN, China 301, global 301, 232) that mirrors the engine's ruleset; hs-codes-database is the full 5,689-code HTS 8-digit table for coverage beyond the high-frequency set. Use the first to compute, the second to look up.
Why do some rows say sample or unverified?
Those rows have not yet been verified against the Federal Register text line by line. They are usable for planning and demos but are clearly flagged so you do not mistake them for certified entry data — verified rows link their official source instead.
Can I redistribute a filtered version of the CSV in my own project?
Yes, under CC BY 4.0 attribution. Keep the ruleset_version and as-of stamp with the data (ideally in a column or README line) so downstream users know which snapshot the numbers came from.
Browse and download the datasets

Per-code rates, economy tiers and Section 232 layers as CSV, CC BY 4.0, versioned with the site's ruleset snapshot.