Spiral gives your agent every tool with one account. Browse the tools →

Instinct · Finance

How to Use UN Comtrade reference codes in Instinct

Look up official codes and descriptions for countries, products, trade flows, and quantity units. Use these tables to identify the right geography or product classification for an analysis.

Prompts to try with UN Comtrade reference codes in Instinct

Copy an example into Instinct, or ask in your own words.

Every Monday at 9am: use UN Comtrade reference codes to look this up and give me the result as a table.

UN Comtrade reference codesInstinct
Try asking
  • Pull the latest numbers from UN Comtrade reference codes and tell me what changed since last week.

  • Check UN Comtrade reference codes and summarize what you find in three bullet points.

  • Pull the newest data from UN Comtrade reference codes and give me the result as a table.

  • Check UN Comtrade reference codes every morning and tell me only when something changed.

How to set up UN Comtrade reference codes 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.

    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.

    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 reference codes

    One request; the result comes back by polling or a webhook.

    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/reference_codes",
        "input": {
          "table": "<table>"
        }
      }'

Then paste one of the prompts above: Instinct finds UN Comtrade reference codes on Spiral, shows the price and runs it.

UN Comtrade reference codes providers and prices

Spiral runs UN Comtrade reference codes through Alexandria. Open a card for today's price, with every fee included.

AlexandriaFinance
UN Comtrade (comtradeplus.un.org) · Reference codes
comtradeplus-un-org/trade-statistics/reference_codes

Settings you can ask for

Ask Instinct for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Limit1 to 2000200

Maximum rows returned after filtering (HS has 8262 rows).

Every API field of UN Comtrade (comtradeplus.un.org) · Reference codes is on its tool page: open its card above.

What can you do with UN Comtrade reference codes 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.

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.

Build a historical trade study

Study Brazil's trade totals over available decades and add product-level comparisons for periods with suitable coverage. Use reference classifications and publication notes to document changes, then compare world trade share over the overlapping available years.

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.

Questions about UN Comtrade reference codes in Instinct

Can Instinct use UN Comtrade reference codes?

Yes. Add Spiral to Instinct as an MCP server, and Instinct can find and run UN Comtrade reference codes like any built-in tool.

How much does UN Comtrade reference codes 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 reference codes in Instinct?

You need no Alexandria account. Instinct uses one Spiral API key for every tool, and Spiral runs UN Comtrade reference codes on its own Alexandria account.

How long does it take to set up UN Comtrade reference codes 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 reference codes runs?

UN Comtrade reference codes 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.

Get started

Start using UN Comtrade reference codes in Instinct

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into Instinct:

Set up Instinct

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options