[Integrations](https://spiral.ai/integrations) › [Instinct](https://spiral.ai/integrations/instinct) › [UN Comtrade national tariff-line trade](https://spiral.ai/integrations/instinct/un-comtrade-national-tariff-line-trade)

# How to Use UN Comtrade national tariff-line trade in Instinct

Retrieve trade values, quantities, and weights at countries' detailed national commodity codes, which can exceed six digits. Use these records to examine product detail below standard HS categories.

|  |  |
| --- | --- |
| Model | UN Comtrade national tariff-line trade |
| Available through | Alexandria |
| Category | Finance |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, with a Spiral API key |

## Prompts to try with UN Comtrade national tariff-line trade in Instinct

- Every Monday at 9am: use UN Comtrade national tariff-line trade to look this up and give me the result as a table.
- Pull the latest numbers from UN Comtrade national tariff-line trade and tell me what changed since last week.
- Check UN Comtrade national tariff-line trade and summarize what you find in three bullet points.
- Pull the newest data from UN Comtrade national tariff-line trade and give me the result as a table.
- Check UN Comtrade national tariff-line trade every morning and tell me only when something changed.

## How to set up UN Comtrade national tariff-line trade in Instinct

Pick the way that suits you. Each takes about two minutes.

### Use the Spiral skill

1. **Send Instinct this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use Spiral's MCP server

1. **Create an API key**: In the console, open API keys and create a key for Instinct. Copy it.

2. **Send Instinct this message**: Instinct reads Spiral's skill and asks for your API key.

```text
set up https://spiral.ai/SKILL.md
```

3. **Give Instinct the key**: When Instinct asks for the key, add it where Instinct keeps secrets, never in the chat itself.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run UN Comtrade national tariff-line trade**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "comtradeplus-un-org/trade-statistics/tariffline_data",
    "input": {
      "period": "<period>",
      "reporter_code": "<reporter_code>"
    }
  }'
```

Then paste one of the prompts above: Instinct finds UN Comtrade national tariff-line trade on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/instinct

## UN Comtrade national tariff-line trade tools and prices

- [UN Comtrade (comtradeplus.un.org) · Tariffline data](https://spiral.ai/tools/alexandria/comtradeplus-un-org/trade-statistics/tariffline_data) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| cmd_code |  | — | Commodity code(s), comma-separated: HS6 codes select every national line beneath them; national 8-10 digit codes are accepted as the reporter publishes them. Pattern: ^[A-Za-z0-9]{1,12}(,[A-Za-z0-9]{1,12})*$. |
| mot_code |  | — | Mode of transport code(s), comma-separated (0 total). Pattern: ^\d{1,4}(,\d{1,4})*$. |
| flow_code |  | — | Trade flow code(s), comma-separated: M import, X export, RM re-import, RX re-export, MIP/XIP/MOP/XOP/MIF/XIF/DX/FM sub-flows. Omit for every flow. Pattern: ^[A-Za-z]{1,3}(,[A-Za-z]{1,3})*$. |
| freq_code | A, M | A | Frequency: A annual (period YYYY), M monthly (period YYYYMM). |
| type_code | C, S | C | Type of trade: C commodities (goods), S services. |
| customs_code |  | — | Customs procedure code(s), comma-separated (C00 total). Pattern: ^[A-Za-z0-9]{1,4}(,[A-Za-z0-9]{1,4})*$. |

## What can you do with UN Comtrade national tariff-line trade in Instinct?

Keep an internal trade monitor current by identifying new publications and revisions for selected countries. Scheduled agents can check UN Comtrade release information and refresh affected observations, accounting for its seven-day recent-release window and latest-version policy.

### Prepare an internal country trade briefing

Build a Germany briefing with historical trade totals, world trade share, and machinery exports. Check available periods and publication notes, resolve product codes, examine national product detail, and identify recent revisions before presenting the figures.

### Compare potential export markets

Compare coffee imports into Germany, Japan, and the United States using a common reported year. Resolve coffee categories, check coverage and compilation notes, compare partner totals, and inspect national product detail; add each market's overall trade totals and world share for context.

### Maintain a monthly trade monitor

Watch Japan's new and revised releases, then refresh affected periods in an internal monitor. Combine headline totals, world share, and selected product flows with national tariff-line detail, keeping publication notes alongside the updated figures.

### Investigate bilateral reporting differences

Compare US imports from China with China's exports to the United States for the same product and year. Verify classifications and coverage, inspect valuation and partner-attribution notes, and examine national commodity detail before interpreting the difference.

### Examine national product detail

Investigate the national commodity lines beneath a US static-converter import category. Compare those records with the standardized product total, check the reported classification and compilation notes, and revisit the analysis when a revised dataset appears.

### Refresh a research dataset after revisions

Maintain an internal dataset on Kenya's trade, including headline totals, coffee exports, national commodity detail, and world share. Use new release notices to select affected periods, reference tables to label observations, and publication notes to explain revisions.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Instinct guides](https://spiral.ai/integrations/instinct)

## UN Comtrade national tariff-line trade in other agents

- [Amp](https://spiral.ai/integrations/amp/un-comtrade-national-tariff-line-trade)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/un-comtrade-national-tariff-line-trade)
- [Claude](https://spiral.ai/integrations/claude-desktop/un-comtrade-national-tariff-line-trade)
- [Claude Code](https://spiral.ai/integrations/claude-code/un-comtrade-national-tariff-line-trade)
- [Cline](https://spiral.ai/integrations/cline/un-comtrade-national-tariff-line-trade)
- [Codex](https://spiral.ai/integrations/codex/un-comtrade-national-tariff-line-trade)
- [Cursor](https://spiral.ai/integrations/cursor/un-comtrade-national-tariff-line-trade)
- [Devin](https://spiral.ai/integrations/devin/un-comtrade-national-tariff-line-trade)
- [dots](https://spiral.ai/integrations/dots/un-comtrade-national-tariff-line-trade)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/un-comtrade-national-tariff-line-trade)
- [Gemini](https://spiral.ai/integrations/gemini/un-comtrade-national-tariff-line-trade)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/un-comtrade-national-tariff-line-trade)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/un-comtrade-national-tariff-line-trade)
- [goose](https://spiral.ai/integrations/goose/un-comtrade-national-tariff-line-trade)
- [Grok](https://spiral.ai/integrations/grok/un-comtrade-national-tariff-line-trade)
- [Grok Build](https://spiral.ai/integrations/grok-build/un-comtrade-national-tariff-line-trade)
- [Hermes](https://spiral.ai/integrations/hermes/un-comtrade-national-tariff-line-trade)
- [Manus](https://spiral.ai/integrations/manus/un-comtrade-national-tariff-line-trade)
- [Muse](https://spiral.ai/integrations/muse/un-comtrade-national-tariff-line-trade)
- [Muse Code](https://spiral.ai/integrations/muse-code/un-comtrade-national-tariff-line-trade)
- [n8n](https://spiral.ai/integrations/n8n/un-comtrade-national-tariff-line-trade)
- [Notion](https://spiral.ai/integrations/notion/un-comtrade-national-tariff-line-trade)
- [OpenClaw](https://spiral.ai/integrations/openclaw/un-comtrade-national-tariff-line-trade)
- [opencode](https://spiral.ai/integrations/opencode/un-comtrade-national-tariff-line-trade)
- [Perplexity](https://spiral.ai/integrations/perplexity/un-comtrade-national-tariff-line-trade)
- [Raycast](https://spiral.ai/integrations/raycast/un-comtrade-national-tariff-line-trade)
- [VS Code](https://spiral.ai/integrations/vscode/un-comtrade-national-tariff-line-trade)
- [Windsurf](https://spiral.ai/integrations/windsurf/un-comtrade-national-tariff-line-trade)
- [Zapier](https://spiral.ai/integrations/zapier/un-comtrade-national-tariff-line-trade)

## More Instinct guides

- [UN Comtrade imports and exports](https://spiral.ai/integrations/instinct/un-comtrade-imports-and-exports)
- [UN Comtrade recent releases](https://spiral.ai/integrations/instinct/un-comtrade-recent-releases)
- [UN Comtrade historical trade totals](https://spiral.ai/integrations/instinct/un-comtrade-historical-trade-totals)
- [UN Comtrade reference codes](https://spiral.ai/integrations/instinct/un-comtrade-reference-codes)
- [UN Comtrade dataset metadata](https://spiral.ai/integrations/instinct/un-comtrade-dataset-metadata)
- [UN Comtrade world trade share](https://spiral.ai/integrations/instinct/un-comtrade-world-trade-share)

## Questions about UN Comtrade national tariff-line trade in Instinct

**Can Instinct use UN Comtrade national tariff-line trade?**

Yes. Add Spiral to Instinct as an MCP server, and Instinct can find and run UN Comtrade national tariff-line trade like any built-in tool.

**How much does UN Comtrade national tariff-line trade cost in Instinct?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Instinct plan is separate.

**Do I need an Alexandria account to use UN Comtrade national tariff-line trade in Instinct?**

You need no Alexandria account. Instinct uses one Spiral API key for every tool, and Spiral runs UN Comtrade national tariff-line trade on its own Alexandria account.

**How long does it take to set up UN Comtrade national tariff-line trade in Instinct?**

About two minutes: create an API key, then send Instinct this message, then give Instinct the key.

**Does Instinct wait while UN Comtrade national tariff-line trade runs?**

UN Comtrade national tariff-line trade runs in the background. Instinct starts the run, checks on it and gives you the json when it's ready.

**Which countries and historical periods does UN Comtrade cover?**

UN Comtrade contains goods and services statistics from nearly 200 countries and areas, with coverage extending back to 1962. Its standardized trade data leaves gaps where a country has not reported.

**How often does UN Comtrade update country data?**

There is no fixed country release date or refresh schedule. UN Comtrade processes submissions as they arrive, and the recent releases list covers first publications and revisions from the last seven days.

**Can I recover an earlier version of a revised dataset?**

UN Comtrade keeps only the latest version of each dataset and has no permanent archive of earlier versions. A published figure can therefore change after its initial release.

**Does UN Comtrade identify individual buyers or suppliers?**

No. It excludes exporter and importer names and contact details, shipment dates, and origin or destination port details; its statistics describe country trade rather than individual transactions.

**Why can two countries report different values for the same trade?**

UN Comtrade identifies three main causes of merchandise trade asymmetry: different partner attribution, CIF versus FOB valuation, and different trade systems. Publication notes help establish which practices each reporter uses.

