UN Comtrade website screenshot

UN Comtrade

United Nations international trade statistics database with a REST API for accessing import/export data, commodity trade flows, and bilateral trade statistics. Covers over 200 reporting countries and territories with data spanning goods and services trade classified by HS, SITC, and other commodity codes.

UN Comtrade publishes 1 API on the APIs.io network: Data API. Tagged areas include Trade, International Trade, Import, Export, and Statistics.

The UN Comtrade catalog on APIs.io includes 1 Spectral governance ruleset.

24.2/100 emerging ▬ flat Agent 25/100 agent aware Full breakdown ↓
scored 2026-08-20 · rubric v0.12.0
1 APIs
TradeInternational TradeImportExportStatisticsUnited NationsEconomicsCommoditiesBilateral TradeHS CodesSITC

Kin Score

Kin Score Kin Score How this is scored →
scored 2026-08-20 · rubric v0.12.0
Composite quality — 24.2/100 · emerging
Contract Quality 8.8 / 25
Developer Ergonomics 0.0 / 20
Access Clarity 7.9 / 20
Operational Transparency 0.0 / 13
Contract Governance 1.2 / 12
Discoverability 6.3 / 10
Agent readiness — 25/100 · agent aware
Machine-Readable Contract 18 / 18
Agentic Access Contract 10 / 10
Documented Reversibility 6 / 6
MCP Server 0 / 12
Machine-Readable Auth 0 / 10
Idempotency 9 / 9
Stable Error Semantics 0 / 8
Request/Response Examples 0 / 7
Rate-Limit Signaling 7 / 7
Typed Event Surface 0 / 6
Agent Skills 0 / 5
Well-Known Catalog 0 / 4
Consent & Bot Identity 0 / 3
A2A Agent Card 0 / 8
Dry-Run / Simulate Mode 4 / 4
Improve this rating by publishing the missing artifacts — every area above can be raised, and the full rubric is at apis.io/rating/. This rating is computed from github.com/api-evangelist/un-comtrade: open an issue to ask a question, or submit a pull request to add artifacts. Want it done for you? Prioritized profiling — $2,500 →

APIs 1

Individual APIs this provider publishes, each with its own machine-readable definition.

UN Comtrade Data API

REST API for extracting international merchandise and services trade statistics. Provides access to final trade data, tariffline data, data availability, metadata, live updates,...

Open Collections 6

Open, tool-agnostic API collections (OpenAPI-derived and Bruno).

API Collection

OPEN COLLECTION

Pricing Plans 1

Published pricing tiers and plan structures.

Plans

6 plans

PLANS

Rate Limits 1

Documented rate limits and quota policies.

Rate Limits

0 limits

RATE LIMITS

FinOps 1

Cost, billing, and metering signals for API financial operations.

Finops

FINOPS

Spectral Rules 1

Spectral governance rulesets for linting and validating these APIs.

UN Comtrade API Rules

5 rules · 3 warnings 2 info

SPECTRAL

JSON Schema 2

Standalone JSON Schema definitions for this provider's data models.

UN Comtrade API Response Envelope

6 properties

JSON SCHEMA

UN Comtrade Trade Record

47 properties

JSON SCHEMA

Examples 3

Example request and response payloads for these APIs.

Check Data Availability

4 fields

EXAMPLE

Get Bilateral Trade

4 fields

EXAMPLE

Preview Goods Exports

4 fields

EXAMPLE

Security Posture 2

Authentication, domain security, vulnerability disclosure, and trust-center signals.

Un Comtrade Authentication

apiKey · 1 scheme

SECURITY

Un Comtrade Domain Security

TLSv1.3 · DMARC

SECURITY

Agentic Access 1

Recommended x-agentic-access execution contracts for AI agents.

Un Comtrade Agentic Access

13 operations

13 operations · 0 acting

AGENTIC

Resources

Agent Surfaces 1

MCP servers, agent skills, and machine-readable catalogs

Source (apis.yml)

apis.yml Raw ↑
name: UN Comtrade
description: United Nations international trade statistics database with a REST API for accessing import/export data, commodity
  trade flows, and bilateral trade statistics. Covers over 200 reporting countries and territories with data spanning goods
  and services trade classified by HS, SITC, and other commodity codes.
image: https://comtradeplus.un.org/favicon.ico
tags:
- Trade
- International Trade
- Import
- Export
- Statistics
- United Nations
- Economics
- Commodities
- Bilateral Trade
- HS Codes
- SITC
url: https://raw.githubusercontent.com/api-evangelist/un-comtrade/refs/heads/main/apis.yml
created: '2026-06-13'
modified: '2026-06-13'
specificationVersion: '0.23'
apis:
- name: UN Comtrade Data API
  description: REST API for extracting international merchandise and services trade statistics. Provides access to final trade
    data, tariffline data, data availability, metadata, live updates, and bulk file downloads. Requires a free B2C account
    and API subscription key for full access.
  humanURL: https://comtradedeveloper.un.org/
  baseURL: https://comtradeapi.un.org
  tags:
  - Trade
  - Import
  - Export
  - Commodities
  - Bilateral Trade
  - Statistics
  properties:
  - type: Documentation
    url: https://uncomtrade.org/docs/un-comtrade-api/
  - type: DeveloperPortal
    url: https://comtradedeveloper.un.org/
  - type: OpenAPI
    url: https://comtradedeveloper.un.org/
  - type: Authentication
    url: https://uncomtrade.org/docs/api-subscription-keys/
  - type: Plans
    url: https://raw.githubusercontent.com/api-evangelist/un-comtrade/refs/heads/main/plans/plans.yml
  - type: RateLimits
    url: https://raw.githubusercontent.com/api-evangelist/un-comtrade/refs/heads/main/rate-limits/rate-limits.yml
  - type: FinOps
    url: https://raw.githubusercontent.com/api-evangelist/un-comtrade/refs/heads/main/finops/finops.yml
  - type: Signup
    url: https://comtradeplus.un.org/
  - type: Pricing
    url: https://shop.un.org/databases
  - type: Python SDK
    url: https://github.com/uncomtrade/comtradeapicall
  - type: R Package
    url: https://docs.ropensci.org/comtradr/
  contact:
  - FN: UN Comtrade Support
    email: comtrade@un.org
  - FN: UN Comtrade Subscriptions
    email: subscriptions@un.org
  endpoints:
  - name: Preview Final Trade Data
    description: Preview up to 500 records of final trade data without authentication. Returns merchandise or services trade
      flows by reporter, partner, commodity, and period.
    method: GET
    path: /public/v1/preview/{typeCode}/{freqCode}/{clCode}
    parameters:
    - name: typeCode
      in: path
      required: true
      description: 'Trade type: C for Goods, S for Services'
    - name: freqCode
      in: path
      required: true
      description: 'Frequency: A for Annual, M for Monthly'
    - name: clCode
      in: path
      required: true
      description: 'Classification: HS, H5, H4, H3, S3, S2, S1'
    - name: reporterCode
      in: query
      required: false
      description: UN country numeric code for the reporting country
    - name: period
      in: query
      required: false
      description: Year (YYYY) or month (YYYYMM). Multiple values comma-separated.
    - name: cmdCode
      in: query
      required: false
      description: Commodity code(s) comma-separated
    - name: partnerCode
      in: query
      required: false
      description: Partner country UN numeric code
    - name: flowCode
      in: query
      required: false
      description: 'Trade flow: M=Import, X=Export, MIP=Import (in-transit), XIP=Export (in-transit)'
    - name: maxRecords
      in: query
      required: false
      description: Maximum records to return (max 500 for preview)
    - name: format
      in: query
      required: false
      description: 'Response format: json (default), csv, txt'
  - name: Get Final Trade Data
    description: Extract up to 250,000 records of final trade data per call. Requires valid API subscription key.
    method: GET
    path: /data/v1/get/{typeCode}/{freqCode}/{clCode}
    authentication:
      type: apiKey
      in: header
      name: Ocp-Apim-Subscription-Key
    parameters:
    - name: typeCode
      in: path
      required: true
      description: 'Trade type: C for Goods, S for Services'
    - name: freqCode
      in: path
      required: true
      description: 'Frequency: A for Annual, M for Monthly'
    - name: clCode
      in: path
      required: true
      description: 'Classification: HS, H5, H4, H3, S3, S2, S1'
    - name: reporterCode
      in: query
      required: false
      description: UN country numeric code for the reporting country
    - name: period
      in: query
      required: false
      description: Year (YYYY) or month (YYYYMM). Comma-separated, max 12 values.
    - name: cmdCode
      in: query
      required: false
      description: Commodity code(s) comma-separated
    - name: partnerCode
      in: query
      required: false
      description: Partner country UN numeric code
    - name: flowCode
      in: query
      required: false
      description: 'Trade flow: M=Import, X=Export'
    - name: maxRecords
      in: query
      required: false
      description: Maximum records to return
    - name: format
      in: query
      required: false
      description: 'Response format: json (default), csv, txt'
  - name: Get Tariffline Trade Data
    description: Extract tariffline-level trade data with full 6-digit or national commodity code detail. Requires valid API
      subscription key.
    method: GET
    path: /data/v1/getTariffline/{typeCode}/{freqCode}/{clCode}
    authentication:
      type: apiKey
      in: header
      name: Ocp-Apim-Subscription-Key
  - name: Get Data Availability
    description: Retrieve information about which reporting countries have submitted trade data for given periods and classifications.
    method: GET
    path: /data/v1/getDa/{typeCode}/{freqCode}/{clCode}
    authentication:
      type: apiKey
      in: header
      name: Ocp-Apim-Subscription-Key
  - name: Get Data Availability for Tariffline
    description: Retrieve data availability information specific to tariffline datasets.
    method: GET
    path: /data/v1/getDaTariffline/{typeCode}/{freqCode}/{clCode}
    authentication:
      type: apiKey
      in: header
      name: Ocp-Apim-Subscription-Key
  - name: Get Live Updates
    description: Retrieve information about recent data publications and updates to the UN Comtrade database.
    method: GET
    path: /data/v1/getLiveUpdate
    authentication:
      type: apiKey
      in: header
      name: Ocp-Apim-Subscription-Key
  - name: Get Metadata
    description: Retrieve metadata including reporter lists, partner lists, commodity codes, and classification reference
      data.
    method: GET
    path: /data/v1/getMetadata
    authentication:
      type: apiKey
      in: header
      name: Ocp-Apim-Subscription-Key
  - name: Bulk Download Trade Data
    description: Retrieve links to bulk files containing large trade datasets. Supports downloads up to 2.5M records via async
      processing. Requires premium subscription.
    method: GET
    path: /bulk/v1/get/{typeCode}/{freqCode}/{clCode}
    authentication:
      type: apiKey
      in: header
      name: Ocp-Apim-Subscription-Key
  - name: Bulk Download Tariffline Data
    description: Retrieve bulk file links for tariffline-level trade data. Requires premium subscription.
    method: GET
    path: /bulk/v1/getTariffline/{typeCode}/{freqCode}/{clCode}
    authentication:
      type: apiKey
      in: header
      name: Ocp-Apim-Subscription-Key
  - name: Bulk Download Classic Format
    description: Retrieve bulk files in classic UN Comtrade format for backward compatibility with legacy integrations. Requires
      premium subscription.
    method: GET
    path: /bulk/v1/getClassic/{typeCode}/{freqCode}/{clCode}
    authentication:
      type: apiKey
      in: header
      name: Ocp-Apim-Subscription-Key
  - name: Get Reference Data - Country Groups
    description: Retrieve reference data for country groups used in trade reporting and partner aggregation.
    method: GET
    path: /files/v1/app/reference/country_groups.json
    authentication:
      type: none
common:
- type: AgenticAccess
  url: agentic-access/un-comtrade-agentic-access.yml
contact:
- FN: UN Comtrade Support
  email: comtrade@un.org
- FN: UN Comtrade Subscriptions
  email: subscriptions@un.org
links:
- rel: self
  href: https://comtradeplus.un.org/
- rel: developer-portal
  href: https://comtradedeveloper.un.org/
- rel: documentation
  href: https://uncomtrade.org/docs/
- rel: pricing
  href: https://shop.un.org/databases
- rel: sign-up
  href: https://comtradeplus.un.org/
- rel: python-sdk
  href: https://github.com/uncomtrade/comtradeapicall
- rel: r-package
  href: https://docs.ropensci.org/comtradr/