comtrade: Access and Analyse UN Comtrade International Trade Data

Download and analyse international merchandise and services trade data from the United Nations Comtrade database <https://comtradeplus.un.org/>. Retrieve bilateral trade flows, compute trade analytics (revealed comparative advantage, trade concentration, trade balance), and convert between commodity classifications (HS, SITC, BEC). Covers 200+ reporter countries, 60+ years of goods trade data (1962-present), and services trade via EBOPS. Works without registration for basic queries. A free API key from <https://comtradedeveloper.un.org/> unlocks full access.

Version: 0.1.0
Depends: R (≥ 4.1.0)
Imports: cli (≥ 3.6.0), httr2 (≥ 1.0.0), stats, tools, utils
Suggests: testthat (≥ 3.0.0)
Published: 2026-04-13
DOI: 10.32614/CRAN.package.comtrade (may not be active yet)
Author: Charles Coverdale [aut, cre]
Maintainer: Charles Coverdale <charlesfcoverdale at gmail.com>
BugReports: https://github.com/charlescoverdale/comtrade/issues
License: MIT + file LICENSE
URL: https://github.com/charlescoverdale/comtrade
NeedsCompilation: no
Language: en-GB
Materials: README, NEWS
CRAN checks: comtrade results

Documentation:

Reference manual: comtrade.html , comtrade.pdf

Downloads:

Package source: comtrade_0.1.0.tar.gz
Windows binaries: r-devel: not available, r-release: comtrade_0.1.0.zip, r-oldrel: not available
macOS binaries: r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): comtrade_0.1.0.tgz, r-oldrel (x86_64): comtrade_0.1.0.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=comtrade to link to this page.