Tariff data via
REST API
Look up any HTS or TARIC code, calculate total duty with trade actions included, classify products, and get notified when rates change. Eight endpoints, JSON responses, bearer token auth.
A terminal showing a curl request to the DutyDesk API for tariff code 7323.93.0085 with origin CN, and the JSON response with rate details, trade actions, and special programs.
Lookups, calculations, classification, and change feeds
Eight endpoints covering every tariff operation. USITC and TARIC data, one consistent interface.
Bearer token authentication
Generate API keys from your dashboard. Production (dd_live_) and sandbox (dd_test_) keys. Revoke or rotate at any time.
dd_live_sk_...Rate limit headers on every response
X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. Pro: 500 requests/mo. Business: 2,500 requests/mo.
500 – 2,500 req/moTariff change notifications
Register a webhook endpoint to receive rate changes, trade action updates, and code modifications. HMAC-SHA256 signed payloads.
Business planClean JSON responses
Consistent error format with codes and messages. Standard HTTP status codes. Every response includes a data field.
Eight endpoints, one base URL
Lookups, calculations, classification, rulings, and change feeds.
/tariffs/{market}/{code}Look up any US HTS or EU TARIC code. Returns description, rates, trade actions, and special programs.
/searchSearch by keyword or code prefix. Filter by market (us, eu). Returns matched codes with descriptions and rates.
/calculateCalculate total import duty. Send code, origin, and value. Returns line-item breakdown of every duty and fee.
/calculate/bulkCalculate duty for up to 50 items at once. Same fields as /calculate per item. One API call for the whole batch.
/compareCompare duty across origin countries. One code, multiple origins. Returns side-by-side breakdown sorted by total duty.
/classifyAI tariff classification. Send a product description, get HTS or TARIC code suggestions with confidence scores.
/changesTariff change feed for tracked codes. Filter by date, market, and change type. Powers the alerts feature.
/rulingsSearch CBP CROSS and EU BTI rulings by keyword, code, or ruling number. Returns matched rulings with metadata.
How it works
Create an account
Sign up and choose a Pro or Business plan with API access.
Generate an API key
Go to Settings > API Keys in your dashboard. Copy the dd_live_ key.
Make your first request
Send a GET to /tariffs/us/7323.93.0085?origin=CN. Get the full duty breakdown in JSON.
API access on Pro (500 requests/mo, $19/mo) and Business (2,500 requests/mo + webhooks, $59/mo). All eight endpoints included.
Compare plans →Questions
What endpoints are available?
Eight endpoints: GET /tariffs/{market}/{code} for lookups, GET /search for keyword/code search, POST /calculate for duty calculations, POST /calculate/bulk for batch calculations (up to 50 items), POST /compare for side-by-side origin comparison, POST /classify for AI tariff classification, GET /changes for tariff change feeds, and GET /rulings for CBP CROSS and EU BTI rulings search.
How is the API authenticated?
Bearer token authentication. Generate API keys from your dashboard. Keys are prefixed with dd_live_ for production and dd_test_ for sandbox. Include the key in the Authorization header.
What are the rate limits?
Pro plan: 500 requests per month. Business plan: 2,500 requests per month. Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response.
Does the API support webhooks?
Yes. Business plans can register a webhook endpoint to receive tariff change notifications. Payloads are signed with HMAC-SHA256 for authenticity verification. Webhook events include rate changes, trade action updates, and code modifications.
What response format does the API use?
All responses are JSON. Successful responses include a data field. Errors include an error field with a code and message. HTTP status codes follow REST conventions: 200 for success, 400 for bad requests, 401 for unauthorized, 429 for rate limiting.
Is there a sandbox environment?
Yes. Use dd_test_ prefixed API keys for sandbox access. Sandbox returns real data but doesn't count against your rate limits. Ideal for development and testing.
Still have questions?
Get in touch →