[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [UN Tourism country statistics](https://spiral.ai/integrations/opencode/un-tourism-country-statistics)

# How to Use UN Tourism country statistics in opencode

Returns country-year tourism observations with values, units, source references, editions, and provisional flags. Use it to compare reported arrivals, spending, accommodation, employment, or tourism GDP across countries and years.

|  |  |
| --- | --- |
| Model | UN Tourism country statistics |
| Available through | Alexandria |
| Category | Maps & Reviews |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with UN Tourism country statistics in opencode

- Use UN Tourism country statistics to compare overnight international arrivals for Spain, France, and Italy from 2019 through 2024. Add a chart to this project using the returned units and provisional flags.
- Use UN Tourism country statistics to retrieve France's domestic overnight and same-day trips from 2019 through 2024. Create a comparison table in the project for the observations available.
- Use UN Tourism country statistics to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from UN Tourism country statistics and tell me what changed since last week.
- Check UN Tourism country statistics and summarize what you find in three bullet points.

## How to set up UN Tourism country statistics in opencode

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

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode 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 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 Tourism country statistics**: 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": "untourism-int/statistics/data",
    "input": {
      "indicator_codes": [
        "<indicator_codes>"
      ]
    }
  }'
```

Then paste one of the prompts above: opencode finds UN Tourism country statistics on Spiral, shows the price and runs it.

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

## UN Tourism country statistics tools and prices

- [UN Tourism · Data](https://spiral.ai/tools/alexandria/untourism-int/statistics/data) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| cursor |  | — | next_cursor from the previous page of the same query. |
| partner |  | — | Arrivals-by-region only: "total" (default: World / no partner dimension), "all" for every region of origin, or a UN Tourism region code (10000 Africa, 20000 Americas, 30000 East Asia and the Pacific, 40000 Europe, 50000 Middle East, 60000 South Asia, 70000 Other not classified). |
| year_to | 1995 to 2100 | — | year_to |
| countries |  | — | ISO 3166-1 alpha-3 codes. Omit or empty for every reporter (countries, territories and, in the SDG files, regional aggregates). |
| page_size | 1 to 500 | 100 | page_size |
| year_from | 1995 to 2100 | — | year_from |

## What can you do with UN Tourism country statistics in opencode?

Build a country comparison table that separates overnight arrivals, day visits, and tourism spending. A coding agent can connect the project's tourism measures to UN Tourism indicators, source files, and annual observations.

### Compare destination recovery

Identify the overnight-arrivals measure, locate its source workbook, and compare Spain, France, and Italy from 2019 through the latest available common year.

### Study regional visitor demand

Find the arrivals-by-origin measure and supporting file, then compare the reported origin-region mix for Japan and Thailand.

### Separate overnight tourism from day visits

Find the overnight and same-day arrival measures, identify their published files, and examine how the two series differ for Spain and Portugal.

### Compare domestic travel patterns

Locate domestic-trip measures and workbooks, then compare overnight and same-day trips in France, Germany, and Italy for years with reported observations.

### Examine inbound and outbound spending

Identify expenditure measures and source workbooks, then compare Spain's inbound and outbound travel components without mixing them with passenger transport.

### Build a source-backed tourism research table

Match indicator definitions to published files and country-year observations for Greece, Croatia, and Portugal. Present comparable arrivals and spending measures with their reported units.

## Overview

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

## UN Tourism country statistics in other agents

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

## More opencode guides

- [U-Haul truck rental search](https://spiral.ai/integrations/opencode/u-haul-truck-rental-search)
- [UN Tourism indicator search](https://spiral.ai/integrations/opencode/un-tourism-indicator-search)
- [U-Haul place suggestions](https://spiral.ai/integrations/opencode/u-haul-place-suggestions)
- [UN Tourism statistical files](https://spiral.ai/integrations/opencode/un-tourism-statistical-files)
- [U-Haul location search](https://spiral.ai/integrations/opencode/u-haul-location-search)
- [USCG PSIX register status](https://spiral.ai/integrations/opencode/uscg-psix-register-status)

## Questions about UN Tourism country statistics in opencode

**Can opencode use UN Tourism country statistics?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run UN Tourism country statistics like any built-in tool.

**How much does UN Tourism country statistics cost in opencode?**

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

**Do I need an Alexandria account to use UN Tourism country statistics in opencode?**

No. Spiral runs UN Tourism country statistics on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up UN Tourism country statistics in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while UN Tourism country statistics runs?**

UN Tourism country statistics runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**Where do UN Tourism statistics come from?**

UN Tourism collects country submissions through a questionnaire aligned with IRTS 2008. The documented observations are organized by reporting country and year.

**How current are the statistics?**

The statistics database page lists July 21, 2026, as its latest update. That date describes the database update and does not establish the latest observation year for every measure.

**Do international arrivals include day visitors?**

UN Tourism separates overnight arrivals from same-day arrivals, with a cruise-passenger breakdown. Select the overnight measure when your question concerns tourists staying at least one night.

**How detailed are the origin regions?**

The inbound arrivals page names six origin regions: Africa, Americas, East Asia and the Pacific, Europe, Middle East, and South Asia. An origin-region breakdown answers a different question from a ranking of individual origin countries.

**Are domestic trips combined with international arrivals?**

UN Tourism publishes domestic trips separately from international arrivals. Domestic trips have their own overnight and same-day breakdown.

