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 (Harmonised System 'HS', Standard International Trade Classification 'SITC', Broad Economic Categories 'BEC'). Covers 200+ reporter countries, 60+ years of goods trade data (1962-present), and services trade via Extended Balance of Payments Services ('EBOPS'). Works without registration for basic queries. A free Application Programming Interface ('API') key from <https://comtradedeveloper.un.org/> unlocks full access.

Version: 0.1.1
Depends: R (≥ 4.1.0)
Imports: cli (≥ 3.6.0), httr2 (≥ 1.0.0), stats, tools, utils
Suggests: testthat (≥ 3.0.0)
Published: 2026-09-09
DOI: 10.32614/CRAN.package.comtrade
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://charlescoverdale.github.io/comtrade/, 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.1.tar.gz
Windows binaries: r-devel: comtrade_0.1.0.zip, r-release: comtrade_0.1.0.zip, r-oldrel: comtrade_0.1.0.zip
macOS binaries: r-release (arm64): comtrade_0.1.0.tgz, r-oldrel (arm64): comtrade_0.1.0.tgz, r-release (x86_64): comtrade_0.1.0.tgz, r-oldrel (x86_64): comtrade_0.1.0.tgz
Old sources: comtrade archive

Linking:

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