Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the UN Comtrade API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fcomtrade.un.org%2Fcomtrade-un" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fcomtrade.un.org%2Fcomtrade-un" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with UN Comtrade API.
Query detailed trade data by type, frequency, and classification code
Preview trade data without a subscription key
Check which data is available for a given classification
List the reference tables used to decode trade codes
Filter results by reporter, partner, and time period
GET STARTED
Patterns agents use UN Comtrade API for, with concrete tasks.
★ AI agent trade analysis
An AI agent analyzes a trade flow by querying the data endpoint for a commodity between two countries, then decoding the commodity and country codes with the reference tables. Through Jentic the agent finds the data and reference operations by intent and calls them with the stored subscription key, without assembling the code path itself.
Get the 2022 annual exports of commodity 8703 from Germany to the United States
Public data preview
An analyst doing quick lookups uses the public preview and reference endpoints, which need no credential, to sample trade figures before committing to a full extract. The API exposes a preview of the same dataset so exploratory queries run without a subscription key.
Preview the recent trade data for a commodity and list the reference tables that decode it
Data availability checks
Before scheduling a large extract, a pipeline checks which periods and classifications have data so it does not request combinations that return nothing. The API reports data availability so the pipeline can target only the datasets that exist.
Check whether monthly data is available for a classification before extracting it
4 endpoints — the un comtrade api provides access to united nations international trade statistics: it returns detailed import and export data by commodity, reporter, and partner, offers a public preview of the same data, reports data availability, and lists the reference tables used to decode the results.
METHOD
PATH
DESCRIPTION
/data/v1/get/{typeCode}/{freqCode}/{clCode}
Get final trade data (requires subscription key)
/public/v1/preview/{typeCode}/{freqCode}/{clCode}
Preview trade data (public)
/public/v1/getDA/{typeCode}/{freqCode}/{clCode}
Get public data availability
/files/v1/app/reference/ListofReferences.json
List reference tables (public)
/data/v1/get/{typeCode}/{freqCode}/{clCode}
Get final trade data (requires subscription key)
/public/v1/preview/{typeCode}/{freqCode}/{clCode}
Preview trade data (public)
/public/v1/getDA/{typeCode}/{freqCode}/{clCode}
Get public data availability
/files/v1/app/reference/ListofReferences.json
List reference tables (public)
What agents get from Jentic-routed access to this vendor.
Setup
Calling the UN Comtrade API by hand means assembling the type, frequency, and classification codes into the path, adding reporter and partner query parameters, and passing a subscription key for the full dataset. Through Jentic you install once, import Comtrade from the API Directory, store the key once, and your agent calls it.
Permission scoping
The type, frequency, and classification codes sit in the URL path, so a rule can pin your agent to a single dataset or to the public preview endpoints only. The public preview, data-availability, and reference endpoints need no credential, so read-only exploration runs without your subscription key.
Credential isolation
Your UN Comtrade subscription key is stored once, encrypted, by your own Jentic One instance and injected at request time. It never enters the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'get trade data for a commodity' or 'preview trade statistics', and Jentic returns the matching Comtrade operation with its input schema so the agent calls the right endpoint without reading the API docs.
Alternatives and complements available in the Jentic catalogue.
Specific to using UN Comtrade API through Jentic.
Is there a UN Comtrade MCP server?
You don't need an MCP server to connect your agent to the UN Comtrade API. Jentic connects it directly from the API Directory: import Comtrade, store your subscription key once, and your agent queries trade statistics on demand.
Can I limit what my agent is allowed to do with the UN Comtrade API?
Yes. You can allow your agent only the public preview and reference operations, which need no key, so it can explore trade data without touching your subscription. The classification codes sit in the URL path, and every call the agent makes is logged.
What authentication does the UN Comtrade API use?
The full trade dataset requires an API subscription key sent in the Ocp-Apim-Subscription-Key header, while the preview and reference endpoints need no credential. Through Jentic the key is stored once by your self-hosted instance and injected at call time, so it never reaches the agent's context.
Can I pull import and export data for a country with the UN Comtrade API?
Yes. Query the data endpoint with the trade type, frequency, and classification codes, and filter by reporter and partner country and period. Use the reference tables to decode the commodity and country codes in the response.
What are the rate limits for the UN Comtrade API?
The OpenAPI spec does not specify rate limits. UN Comtrade caps free and subscription tiers to a set number of calls and rows per request, so check your plan's limits before large extractions.
How do I connect the UN Comtrade API to my AI agent?
Search the Jentic API Directory for the Comtrade operation you need, such as querying trade data, and import it. To run it on your own infrastructure, install Jentic One from its GitHub repo, then your agent calls the API with your subscription key injected at execution time.
For Agents
Query UN Comtrade international trade statistics by type, frequency, and classification code, preview data without a key, check data availability, and list reference tables.
Use for: Get a country's exports of a commodity for last year, Preview trade data without a subscription key, Check whether monthly data is available for a classification, List the reference codes for commodities
Not supported: Does not provide company-level trade records, tariffs, or real-time shipment tracking. Use for UN Comtrade aggregate trade statistics and their reference tables only.
The UN Comtrade API provides access to United Nations international trade statistics: it returns detailed import and export data by commodity, reporter, and partner, offers a public preview of the same data, reports data availability, and lists the reference tables used to decode the results. Use it to analyze global merchandise and services trade flows.