WITS Tariff Rates API

Import tariff rates by year from the World Bank WITS TRAINS data: the average, lowest and highest duty rate for one reporting country, trading partner and HS product code, with tariff type and number of tariff lines.

$0.50 per 1,000 records

You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.

Try it
Ready-made, maintained by usRecords, 10 fieldsv1.0

Data from wits.worldbank.org

Get this data

Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.

Try it

Reporter
Reporting country as a numeric UN code, for example 840 for the United States.
Example: 840
Partneroptional
Trading partner as a numeric UN code; 000 means the world.
Example: 000
Product
HS product code, for example 020110 (beef carcasses).
Example: 020110
Start yearoptional
First year to return.
Example: 2018
End yearoptional
Last year to return.
Example: 2020

Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key

For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
Endpoint
POSThttps://pullrow.dev/v1/apis/wits-tariff-rates/run
  • Small runs answer in the same request; longer ones answer 202 with a run to poll.
  • fields returns only the fields you name. The examples send the ones picked on this page.
  • Idempotency-Key is optional. A retry with it is never charged twice.
  • You pay for records returned. Zero records cost zero.

Every run option, explained

Calling it needs a key
10,000 free records of this API to start. No card.
curl
curl -X POST "https://pullrow.dev/v1/apis/wits-tariff-rates/run" \
  -H "Authorization: Bearer $PULLROW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"reporter":"840","product":"020110"},"max_items":50}'

Inputs

Send them as input in the request body. Leave one out to use its default.

reportertextrequired
Reporting country as a numeric UN code, for example 840 for the United States.
example: 840
partnertext
Trading partner as a numeric UN code; 000 means the world.
example: 000
producttextrequired
HS product code, for example 020110 (beef carcasses).
example: 020110
start_yearnumber
First year to return.
example: 2018
end_yearnumber
Last year to return.
example: 2020

What's in each record

10 fields.

Basics

  • Reporter

    Reporting country code.

    Example 840

  • Trading partner code

    Example 000

  • HS product code

    Example 020110

  • Tariff type

    Tariff regime, such as MFN or Preferential.

    Example MFN

  • Average rate (%)

    Simple average duty rate in percent.

    Example 26.4%

  • Minimum rate

    Lowest duty rate among the tariff lines, in percent.

    Example 26.4%

  • Maximum rate

    Highest duty rate among the tariff lines, in percent.

    Example 26.4%

  • Total lines

    Number of tariff lines in the product group.

    Example 3

  • Nomenclature

    HS edition used, such as H5.

    Example H5

Dates

  • Year

    Year of the observation.

    Example 2018

Technical detailsField names and types for developers

Field names and types

The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.

Field nameTypeShown on this page asFilled
yearnumberYear3 of 3
reportertextReporter3 of 3
partnertextTrading partner code3 of 3
producttextHS product code3 of 3
tariff_typetextTariff type3 of 3
average_rate_pctnumberAverage rate (%)3 of 3
min_ratenumberMinimum rate3 of 3
max_ratenumberMaximum rate3 of 3
total_linesnumberTotal lines3 of 3
nomenclaturetextNomenclature3 of 3

How it reads the site

Runs on a reader we built and maintain by hand for this site.

Sample records

Sample records
RecordReporterTrading partner codeHS product codeTariff typeAverage rate (%)Minimum rateMaximum rateTotal linesNomenclatureYear
1840000020110MFN26.4%26.4%26.4%3H52018
2840000020110MFN26.4%26.4%26.4%3H52019
3840000020110MFN26.4%26.4%26.4%3H52020

Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.

Reliability

Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.

Incidents and repairs

How it is kept working What a repair can't do

A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.

  • You pay only for records returned. A run that returns none costs nothing.
Known limits
  • One reporting country and one product code per call; the product is an HS code (2 to 6 digits) and the country and partner are numeric UN codes (840 = United States, 124 = Canada, 000 = world).
  • Rates are the simple average of the tariff lines under the product code, as reported to the TRAINS database; years a country did not report are missing.
  • Data comes from World Bank open data: credit the World Bank WITS when you republish.
  • Years run from 1988 to the latest reported year; the source can be slow, so a call may take several seconds.

Version history

A run uses the live version unless the request names another one with version.