[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [IEA energy dataset catalog](https://spiral.ai/integrations/opencode/iea-energy-dataset-catalog)

# How to Use IEA energy dataset catalog in opencode

Lists IEA energy datasets with descriptions, reporting frequencies, units, and license information. Use it to find the right source for an energy question before checking its detailed coverage or reading observations.

|  |  |
| --- | --- |
| Model | IEA energy dataset catalog |
| Available through | Alexandria |
| Category | Public Records |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with IEA energy dataset catalog in opencode

- Use IEA energy dataset catalog to find electricity datasets and create a comparison of their descriptions, frequencies, units, and licenses in the project documentation.
- Use IEA energy dataset catalog to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from IEA energy dataset catalog and tell me what changed since last week.
- Check IEA energy dataset catalog and summarize what you find in three bullet points.
- Pull the newest data from IEA energy dataset catalog and give me the result as a table.

## How to set up IEA energy dataset catalog 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 IEA energy dataset catalog**: 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": "iea-org/energy/datasets",
    "input": {
      "query": "<query>"
    }
  }'
```

Then paste one of the prompts above: opencode finds IEA energy dataset catalog on Spiral, shows the price and runs it.

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

## IEA energy dataset catalog tools and prices

- [IEA · Datasets](https://spiral.ai/tools/alexandria/iea-org/energy/datasets) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| query |  | — | Case-insensitive substring over dataset_id, title and description. |
| cursor |  | — | next_cursor from the previous page; null or omitted for the first page. |
| license | cc_by, paid, any | any | cc_by: retrievable CC BY 4.0 datasets; paid: commercial and non-CC account-gated products (refused by `data`); any: both. |
| page_size | 1 to 1000 | 20 | page_size |

## What can you do with IEA energy dataset catalog in opencode?

Build country energy comparisons into a dashboard using IEA observations and their reported units. Check dataset coverage and available years before joining the results to country records in your project.

### Compare national electricity mixes

Find an electricity dataset, check its available years, resolve France and Germany, and compare generation by source over a shared reporting window.

### Build an energy consumption benchmark

Identify the relevant energy balance series, verify country coverage and history, and compare total final consumption for Japan, Germany, and France using the returned units.

### Prepare a monthly electricity briefing

Resolve the countries in a European market watchlist, confirm the latest available period, and summarize changes in wind, solar, hydro, and nuclear generation.

### Compare fuel combustion emissions

Find the emissions dataset and its reporting window, match France and Germany to IEA country codes, and compare reported emissions by sector.

### Scope an energy research project

Find datasets relevant to electricity and consumption, then compare their frequencies, available years, units, and country coverage before choosing the analysis period.

## Overview

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

## IEA energy dataset catalog in other agents

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

## More opencode guides

- [IEA country codes](https://spiral.ai/integrations/opencode/iea-country-codes)
- [IEA energy dataset details](https://spiral.ai/integrations/opencode/iea-energy-dataset-details)
- [Grants.gov opportunity filter counts](https://spiral.ai/integrations/opencode/grants-gov-opportunity-filter-counts)
- [IEA energy statistics](https://spiral.ai/integrations/opencode/iea-energy-statistics)
- [Grants.gov opportunity details](https://spiral.ai/integrations/opencode/grants-gov-opportunity-details)
- [India eCourts case details by CNR](https://spiral.ai/integrations/opencode/india-ecourts-case-details-by-cnr)

## Questions about IEA energy dataset catalog in opencode

**Can opencode use IEA energy dataset catalog?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run IEA energy dataset catalog like any built-in tool.

**How much does IEA energy dataset catalog 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 IEA energy dataset catalog in opencode?**

No. Spiral runs IEA energy dataset catalog on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up IEA energy dataset catalog in opencode?**

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

**Does opencode wait while IEA energy dataset catalog runs?**

IEA energy dataset catalog runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**Does every IEA dataset cover the same countries?**

No. The Energy Statistics Data Browser covers over 170 countries and regions, while Monthly Electricity Statistics advertises 47 countries. Check coverage for the dataset you intend to use.

**How often does IEA monthly electricity data change?**

Monthly Electricity Statistics is updated monthly. Use the dataset details lookup to check current availability, since the catalog's update date is not populated.

**How far back does monthly electricity history go?**

Coverage generally starts in January 2010 for OECD countries and January 2015 for non-OECD countries. Confirm the available years for the specific dataset before choosing a comparison period.

**Can I retrieve a large historical table in one extraction?**

Observation pagination stops at an offset of 200,000. Divide broad requests into smaller country or year ranges before reaching that boundary.

