The tradestatistics package retrieves data on international trade from the Open Trade Statistics project.
Open Trade Statistics (OTS) started as a visualization project back in 2017 as a Shiny interface to visualize data provided by the UN Comtrade Database.
Please read this blog post on rOpenSci from 2019 to learn more about the implementation details of the API.
You may also be interested in the 2020 Shiny Contest Submission.
The package is available on CRAN.
Vargas M (2023). tradestatistics: Open Trade Statistics API Wrapper and Utility Program. R package version 4.5.0, https://docs.ropensci.org/tradestatistics/.