Spec:
https://invoicetariff.com/openapi.json(OpenAPI 3.1) · RSS:https://invoicetariff.com/radar/feed.xml· LLM index:https://invoicetariff.com/llms.txt
If you sell internationally, two questions decide your margin: what is the duty rate for my product, and did it just change. The US tariff landscape in 2025–2026 is a moving target — Section 301 lists, Section 232 sector tariffs, IEEPA layers, Federal Register notices every week. InvoiceTariff (https://invoicetariff.com) is a free web tool that answers both questions, and its public API lets you wire the same data into your own systems. No sign-up, no API key, no charge.
This document describes the public read-only endpoints, with real request/response examples. An interactive calculator is at /en/tariff-calculator, and all 5,689 HTS 8-digit codes are browsable at /en/hts.
Quick facts
| Base URL | https://invoicetariff.com |
| Auth | None |
| Methods | GET only (read-only) |
| Rate limit | 30 requests/min/IP on /api/hts/search (HTTP 429 + retry-after) |
| Caching | Search & radar responses are CDN-cached for 5 minutes (cache-control: public, max-age=300) |
| Formats | JSON, RSS 2.0, plain text |
| Machine-readable spec | `/openapi.json — OpenAPI 3.1` |
| Data sources | USITC HTS (US government, public domain); Federal Register notices |
Endpoints
1. Search HTS codes — GET /api/hts/search
Full-text search over the complete US HTS 8-digit table (5,689 lines, synced from USITC). Match by code prefix (dots optional) or description keyword. Returns up to 12 results, code-prefix hits ranked first.
`bash
by code prefix
curl "https://invoicetariff.com/api/hts/search?q=8471"
by keyword
curl "https://invoicetariff.com/api/hts/search?q=lithium"
`
Response (real example, keyword lithium):
`json
{
"ok": true,
"results": [
{
"hts8": "28369100",
"description": "Carbonates; peroxocarbonates (percarbonates); commercial ammonium carbonate containing ammonium carbamate: — Other: — Lithium carbonates",
"general": "3.7%"
},
{
"hts8": "85065000",
"description": "Primary cells and primary batteries; parts thereof: — Lithium",
"general": "2.7%"
}
]
}
`
-
hts8— 8-digit code, digits only (insert a dot after the first six for display:2836.91.00). -
general— Column 1 general duty rate exactly as printed in the HTS (Free,2.7%, compound expressions like6.5% + 37.5¢/kg). - Exceed 30 requests/min and you get
429with{"ok": false, "error": "rate_limited"}and aretry-afterheader.
2. Tariff radar updates — GET /api/radar/updates
A pipeline scans the US Federal Register every 12 hours and digests tariff-relevant notices into structured entries: effective dates, affected HTS scope, old → new values where applicable, and links to the official document. Add an RSS reader and you never miss a change; consume the JSON and you can route them into Slack, ERP, or an AI agent.
`bash
curl "https://invoicetariff.com/api/radar/updates" # all entries, newest first
curl "https://invoicetariff.com/api/radar/updates?id=2026-09-15-2026-18834" # single entry
`
Response shape (real example, truncated):
`json
{
"ok": true,
"entries": [
{
"id": "2026-09-15-2026-18834",
"date": "2026-09-15",
"layer": "mfn",
"status": "published",
"title": "Accreditation and Approval of Bennett Testing Service, Inc. (Rahway, NJ), as a Commercial Gauger and Laboratory",
"titleEn": "…same…",
"summaryEn": "Notice is hereby given, pursuant to CBP regulations, that Bennett Testing Service, Inc. …",
"affectedHtsEn": "See document",
"affectedCount": null,
"changes": [],
"sources": [
{ "title": "Federal Register 2026-18834 — …", "url": "https://www.federalregister.gov/documents/2026/09/15/2026-18834/…" }
]
}
]
}
`
Field notes:
-
layer— which tariff layer is affected:mfn,china301,global301,section232,section338,fees,ieepa. -
status—published(effective),upcoming(announced, future date),historical. -
changes— array of{label, oldValue, newValue}(+*Envariants) when the notice changes numeric values. -
sources— official Federal Register / agency links. Always cite the source, not just the digest.
Prefer RSS? Same data at https://invoicetariff.com/radar/feed.xml (RSS 2.0).
3. Visitor country — GET /api/geo
Returns the caller's ISO-3166 alpha-2 country as detected at the CDN edge (null when unavailable). Handy as a lightweight geo fallback.
`bash
curl "https://invoicetariff.com/api/geo"
{"country":"US"}
`
4. LLM-friendly indexes — GET /llms.txt, GET /llms-full.txt
Following the llms.txt convention, the site publishes a markdown index of its pages and data endpoints for AI agents. Point your agent at https://invoicetariff.com/llms.txt and it can discover the calculator, the HTS browser, and the API without a human.
Minimal client examples
Python (3.8+):
`python
import requests
BASE = "https://invoicetariff.com"
def find_hts(keyword: str):
r = requests.get(f"{BASE}/api/hts/search", params={"q": keyword}, timeout=10)
r.raise_for_status()
return r.json()["results"]
def tariff_watch():
r = requests.get(f"{BASE}/api/radar/updates", timeout=10)
r.raise_for_status()
for e in r.json()["entries"]:
if e["layer"] in ("china301", "global301") and e["status"] == "upcoming":
print(e["date"], e["titleEn"], e["sources"][0]["url"])
if name == "main":
for hit in find_hts("lithium"):
print(hit["hts8"], hit["general"], hit["description"][:60])
`
JavaScript / TypeScript:
`ts
const BASE = "https://invoicetariff.com";
export async function findHts(q: string) {
const res = await fetch(${BASE}/api/hts/search?q=${encodeURIComponent(q)});
if (res.status === 429) throw new Error(rate limited, retry after ${res.headers.get("retry-after")}s);
const { results } = await res.json();
return results;
}
`
What this API is (and isn't)
-
Read-only reference data. It exposes HTS lookup and tariff-change monitoring. It does not compute your full landed cost — that logic (MFN + 301 + 232 + IEEPA stacking, MPF/HMF fees, multi-destination VAT) runs client-side in the
free calculatoror batch mode. -
A full programmatic calculation API is planned. If you need
goods value + HTS + destination → landed costas an endpoint, join the waitlist atinvoicetariff.com/api-waitlist— it shapes the roadmap. - Rates are official but not legal advice. Data comes from USITC and the Federal Register; always confirm against the official sources linked in each radar entry before clearing customs.
Links
- OpenAPI 3.1 spec:
https://invoicetariff.com/openapi.json - Site (free, bilingual EN/中文):
https://invoicetariff.com - HTS browser:
https://invoicetariff.com/en/hts - Tariff radar page + RSS:
https://invoicetariff.com/en/radar·https://invoicetariff.com/radar/feed.xml - LLM index:
https://invoicetariff.com/llms.txt
Top comments (0)