The data are sourced directly from countries and submitted to the United Nations Statistics Division. This information is gathered from the official national agencies designated to disseminate trade statistics, which can differ from one country to another due to a variety of national institutional arrangements. You can find the source for specific datasets on the data availability and metadata pages: https://comtradeplus.un.org/DataAvailability and https://comtradeplus.un.org/PublicationNotes.
Additionally, partnerships with various international, regional, and supranational organizations effectively obtain original country data. These include entities such as Eurostat, the World Trade Organization (WTO), the Organization for Economic Co-operation and Development (OECD), the Food and Agriculture Organization of the United Nations (FAO), the International Monetary Fund (IMF), the International Trade Centre (ITC), the Caribbean Community (CARICOM) Secretariat, the Common Market of Eastern and Southern Africa (COMESA), the Economic Community of West African States (ECOWAS), and UN regional commissions, including the Economic Commission for Latin America and the Caribbean (ECLAC) and the Economic and Social Commission for Western Asia (ESCWA).
For comprehensive data on the European Union (EU), we rely on information from the Statistical Office of the European Union (Eurostat).