# WITS World Customs Tariff Lookup

> WITS World Customs Tariff Lookup is a paid API for AI agents from api.tradeenergy-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Returns yearly applied import tariff data (simple-average rate, MFN or preferential, min/max line rates, number of tariff lines) for a given importing country and HS 6-digit product code, sourced from the World Bank WITS/UNCTAD TRAINS database.

## Facts

- Endpoint: GET https://api.tradeenergy-api.workers.dev/api/energy/world-customs-tariff-wits?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/wits-world-customs-tariff-lookup-e400fb1e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZKGbRb2_S7_yQ2sDpA5dw

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability wits-world-customs-tariff-lookup-e400fb1e
```

Example prompt: What's the applied import tariff rate for HS product code 870323 (passenger cars with petrol engine 1500–3000cc) entering Turkey — pull the last 3 years from the WITS database?

## When to prefer this

Use this endpoint when you need applied import tariff rates (MFN or preferential simple averages) for a specific HS 6-digit product and importing country, sourced from the authoritative World Bank WITS/UNCTAD TRAINS database. Prefer this over customs authority websites when you need structured, machine-readable multi-year tariff history across many countries in a single API call. Note: does not cover non-tariff measures (NTMs), anti-dumping duties, or VAT.

## Known failure modes

- Invalid or unsupported HS 6-digit product code returns no tariff data or an error
- Unknown reporter country ISO code results in a 400 or empty response
- Product/country combination not covered in TRAINS database returns empty tariff array
- WITS upstream SDMX API unavailable causes a timeout or 502 error
- Requesting years beyond available data coverage returns partial or empty results

## How this service works

Applied import tariffs from the World Bank WITS / UNCTAD TRAINS database for one importing country and one HS 6-digit product: yearly simple-average rate (%), tariff type (MFN or preferential), min and max line rates and number of tariff lines, from WITS's public SDMX API. Partner defaults to the world (MFN). Non-tariff measures are not included.

## Output

A JSON object containing the reporter country and partner details, the queried HS product code, and an array of yearly tariff records each with: year, simple-average applied rate (%), min and max tariff line rates (%), number of tariff lines, tariff type (MFN or preferential), and HS nomenclature version. Also includes the underlying WITS SDMX source URL and a checkedAt timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "reporter",
      "product"
     ],
     "properties": {
      "years": {
       "type": "string",
       "description": "Most recent years to return, 1 to 15 (default 5)"
      },
      "partner": {
       "type": "string",
       "description": "Exporting partner, ISO alpha-3 or numeric (default 000 = world)"
      },
      "product": {
       "type": "string",
       "description": "HS 6-digit product code, e.g. 870323 (required)"
      },
      "reporter": {
       "type": "string",
       "description": "Importing country, ISO alpha-3 (e.g. TUR, USA) or WITS numeric code (e.g. 792) (required)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 3,
  "source": "https://wits.worldbank.org/API/V1/SDMX/V21/rest/data/DF_WITS_Tariff_TRAINS/A.792.000.870323.reported/?startperiod=2011&endperiod=2026",
  "partner": {
   "code": "000",
   "name": "World"
  },
  "product": "870323",
  "tariffs": [
   {
    "year": 2023,
    "maxRatePct": 10,
    "minRatePct": 10,
    "tariffType": "MFN",
    "tariffLines": 9,
    "nomenclature": "H6",
    "averageRatePct": 10
   },
   {
    "year": 2022,
    "maxRatePct": 10,
    "minRatePct": 10,
    "tariffType": "MFN",
    "tariffLines": 9,
    "nomenclature": "H6",
    "averageRatePct": 10
   }
  ],
  "reporter": {
   "code": "792",
   "name": "Turkey",
   "input": "TUR"
  },
  "checkedAt": "2026-10-23T09:38:28.861Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/wits-world-customs-tariff-lookup-e400fb1e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tradeenergy-api.workers.dev](https://www.zero.xyz/host/api.tradeenergy-api.workers.dev/llms.txt)
