リファレンス
接続方法、対象国とツール、数値の出典、APIキー、情報源。
Monthly customs trade statistics (imports and exports) of Japan, the United States, the United Kingdom and the European Union, by HS product code and partner country, for AI agents and developers. Operated by Washu Trading LLC.
Connect
- MCP (Streamable HTTP, stateless):
https://tradestats.dev/mcp
- Web API:
https://tradestats.dev/api/v1/{tool}, description at https://tradestats.dev/openapi.json
- Guide for agents: https://tradestats.dev/llms.txt
Countries and tools
Every data tool takes reporter, the country whose customs statistics are read: JP (Japan), US (United States), GB (United Kingdom), EU (European Union (27 member states)). EU is HS6 only (no national-level codes) and its values are in EUR. The latest month of each country and flow is in get_catalog (latest_month, published_through); check it before relying on recent months. Use compare_countries to put one product side by side across the countries, and get_mirror_trade to check one country's exports to another against that country's imports, and get_mirror_estimate to estimate the trade of a country without data here (for example China) from the records of the reporters that trade with it. Start with get_catalog.
Where the figures come from
- Each figure is the official agency's own published figure, named in the answer's attribution; calculated fields are labelled as derived.
- Before every monthly release the data is checked against a contract, compared with an independently rebuilt copy and checked again after loading; a failure stops the release.
- Dated comparisons with the agencies' own figures, including differences not yet explained, are on Data verification. The figures are not guaranteed (see Terms).
Pages
Read the data as web pages, without the API: Japan's monthly export and import statistics by statistical code (HS4, chapter and section), with unit prices, year-on-year changes and partner shares. English: /en/ · 日本語: /ja/. Each page links to the API and MCP call for the same product.
Example
curl "https://tradestats.dev/api/v1/get_catalog"
curl "https://tradestats.dev/api/v1/get_item_summary?reporter=GB&flow=import&code=850760"
API keys
An API key is optional. Without one you get the full history, with top-20 rankings; a free key raises ranking sizes and daily limits. Keyless access is also limited per IP address and per network, so callers on a shared network can reach their limits sooner.
- Get one instantly, no email:
curl -X POST https://tradestats.dev/api/v1/keys (at most 3 per day per network). The key is shown once; only a hash is kept.
- Send it as
Authorization: Bearer <key> or X-API-Key: <key>, over MCP or the Web API.
- A free key today: 20,000 calls per day, 20 per second, rankings up to 100 rows; the daily figure is planned to come down to 5,000 when paid plans start (see Pricing). Keyless use: a shared pool of 50,000 calls per day, 5 per second, rankings up to 20. Each answer reports what is left in
_meta.usage.
Sources
- Japan: Ministry of Finance Trade Statistics (obtained through e-Stat, the Portal Site of Official Statistics of Japan), Japan Customs, and the Bank of Japan (exchange rates). This service uses the API of e-Stat, but the content of the service is not guaranteed by the Government of Japan.
- United States: U.S. Census Bureau, Foreign Trade Division. This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.
- United Kingdom: HM Revenue and Customs (HMRC) overseas trade statistics. Contains public sector information licensed under the Open Government Licence v3.0 (https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).
- European Union: Eurostat (Comext, DS-045409). Data aggregated, converted and restated by Washu Trading LLC; Eurostat is not responsible for the processed data. Licence: CC BY 4.0 (https://ec.europa.eu/eurostat/help/copyright-notice).
How the figures are checked: Data verification. Machine-readable description of the dataset: /dataset.
Home · llms.txt · Pricing · Terms · Privacy · Refunds · Verification