DDPCalc JSON API
Part of Pro. Create keys under Account › API keys.
One endpoint runs the same engine as the calculator: duty from the rate you send plus the Chapter 99 rule for the origin, marketplace fees on the tariff-inclusive price, carrier fees, then the price that hits your target.
Request
curl https://ddpcalc.com/api/v1/calculate \
-H "Authorization: Bearer ddp_live_…" -H "Content-Type: application/json" \
-d '{"sellerCountry":"United Kingdom","originCountry":"United Kingdom","marketplace":"etsy",
"generalRate":9.6,"cost":12,"postage":9,"shipCharge":9,"carrier":"royalmail",
"target":{"type":"amount","value":10},"rounding":"99",
"variants":[{"name":"Large","cost":16}]}'
| Field | Meaning |
|---|---|
sellerCountry | Bank country of the shop (sets currency and Etsy processing fees). One of the calculator’s seller countries. |
originCountry | Where the goods were made (sets the Chapter 99 rule). |
marketplace | etsy, ebay, shopify or none. Override fees with fees. |
generalRate or dutyRate | The HTS General rate in % (we add the origin rule), or the total rate you want used. |
usmca, extraRate | USMCA claim for Canada/Mexico; extra % (e.g. 9903.88 lists). |
cost, postage, shipCharge | In the seller’s currency. fx overrides the USD rate. |
carrier | royalmail, postal-other, ups, fedex, dhl, custom; carrierFees overrides. |
target | {"type":"amount"|"margin","value":n}; amount in seller currency, margin in %. |
rounding | 99, 95, 00 or none. |
variants | Up to 100 rows overriding cost, postage or shipCharge. |
Response
{ ok, currency, fx, dutyRatePct, dutyParts, priceUsd, priceLocal, exactPriceUsd, shippingUsd, buyerPaysUsd, dutyUsd, marketplaceFeesUsd, carrierFeesUsd, profitUsd, marginPct, variants:[…], ratesDate }
Limits and errors
- 60 requests per minute and 5,000 per day per account; over that you get
429withRetry-After. 401missing or revoked key ·402the account is no longer on Pro ·400invalid input, with a message.- Up to 5 active keys. We store only a hash: copy a key when you create it.
Estimates, not customs rulings. HTS Revision 22 (2026), synced 2026-11-03.