Two origins, commodities or gateways side by side
comparePut two subjects on the same axis over the same months and compute the difference: two origin countries, two commodity chapters (or HS6 codes), or two US gateways, measured on trade weight, value, unit value, tariff burden or duty paid. Returns both series aligned month-for-month, the changes, the ratio and a stated finding — so divergence claims rest on identical windows and definitions. Use for "is trade shifting from China to Vietnam", "do Indian goods pay more than Mexican goods", "is Houston growing faster than Savannah". For two ORIGINS on a specific commodity it ALSO returns landed_cost — the duty-inclusive $/kg for each origin AND the FOB price premium the lower-duty origin can carry at the factory and still match landed customs cost. That headroom % is the exact number to put in front of a buyer ("we can be N% pricier than China and you pay the same landed"); it also reports which origin actually lands cheaper today, so the duty gap is never oversold. Both subjects must be the same kind; to compare more than two, call twice. burden_pct/duty_usd come from nationwide receipts and are not available for kind "gateway". No API key required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| detail | No | standard | |
| months | No | ||
| origin | No | Optional filter when kind is commodity/gateway: one origin country. | |
| measure | Yes | ||
| commodity | No | Optional filter when kind is origin/gateway: one HS2 chapter or 6-digit code. | |
| subject_a | Yes | ||
| subject_b | Yes |