[Integrations](https://spiral.ai/integrations) › [Claude Code](https://spiral.ai/integrations/claude-code) › [Wikipedia language codes](https://spiral.ai/integrations/claude-code/wikipedia-language-codes)

# How to Use Wikipedia language codes in Claude Code

Returns Wikimedia language codes, English and local language names, and writing direction. Use it to label a language selector or resolve language names before choosing a Wikimedia project.

|  |  |
| --- | --- |
| Model | Wikipedia language codes |
| Available through | Alexandria |
| Category | Web |
| Price | $0.013 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Wikipedia language codes in Claude Code

- Use Wikipedia language codes to fetch the directory, select Arabic, Hebrew, and English, and update our language selector with their returned names and writing directions.
- Use Wikipedia language codes to resolve French, German, and Japanese, then check our locale mapping file for mismatched Wikimedia codes.
- Use Wikipedia language codes to fetch English and local names for Spanish, Portuguese, and Japanese, then replace the hardcoded labels in our language menu.
- Use Wikipedia language codes to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from Wikipedia language codes and tell me what changed since last week.

## How to set up Wikipedia language codes in Claude Code

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

### Use Spiral's MCP server

1. **Add the hosted server**: This adds Spiral to the current project. Add `--scope user` to use it in every project.

```bash
claude mcp add --transport http spiral https://api.spiral.ai/mcp
```

2. **Sign in**: Start `claude`, type `/mcp`, choose spiral and Authenticate. Sign in to Spiral in the browser and click Authorize. No API key.

### Use the Spiral skill

1. **Send Claude Code 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 Wikipedia language codes**: 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": "wikipedia/reference/languages",
    "input": {}
  }'
```

Then paste one of the prompts above: Claude Code finds Wikipedia language codes on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/claude-code

## Wikipedia language codes tools and prices

- [Wikipedia · Languages](https://spiral.ai/tools/alexandria/wikipedia/reference/languages) (Alexandria): $0.013 per call.

## What can you do with Wikipedia language codes in Claude Code?

Build a language selector or validate wiki destinations against Wikimedia's reference records. A coding agent can compare the returned names, codes, directions, and project URLs with the project's configuration.

### Build a language selector

Populate a Wikipedia language selector with returned codes, English names, local names, and writing direction.

### Validate a multilingual research plan

Resolve French, German, and Japanese to Wikimedia language codes, then confirm the available project destinations before planning content lookups.

### Audit localization settings

Compare an application's configured languages and wiki destinations with the returned directories. Flag unmatched codes and project identifiers for review.

### Map educational sources by language

Prepare a source directory for an educational assistant by matching language labels to available Wikipedia, Wikibooks, and Wikiversity projects.

### Review directory changes

Compare occasional directory refreshes with an earlier copy and report added or removed language codes, changed names, and changed project destinations.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Claude Code guides](https://spiral.ai/integrations/claude-code)

## Wikipedia language codes in other agents

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

## More Claude Code guides

- [Wikipedia article text](https://spiral.ai/integrations/claude-code/wikipedia-article-text)
- [Wikipedia structured article](https://spiral.ai/integrations/claude-code/wikipedia-structured-article)
- [Wikimedia project directory](https://spiral.ai/integrations/claude-code/wikimedia-project-directory)
- [Alexandria](https://spiral.ai/integrations/claude-code/alexandria)
- [Wikidata property details](https://spiral.ai/integrations/claude-code/wikidata-property-details)
- [Exa](https://spiral.ai/integrations/claude-code/exa)

## Questions about Wikipedia language codes in Claude Code

**Can Claude Code use Wikipedia language codes?**

Yes. Add Spiral to Claude Code as an MCP server, and Claude Code can find and run Wikipedia language codes like any built-in tool.

**How much does Wikipedia language codes cost in Claude Code?**

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

**Do I need an Alexandria account to use Wikipedia language codes in Claude Code?**

No. Spiral runs Wikipedia language codes on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Wikipedia language codes in Claude Code?**

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

**Does Claude Code wait while Wikipedia language codes runs?**

Wikipedia language codes runs in the background. Claude Code starts the run, checks on it and gives you the json when it's ready.

**Does this reference data cover only Wikipedia?**

It supports Wikimedia's textual projects, including Wikipedia, Wiktionary, Wikibooks, Wikisource, Wikiquote, Wikiversity, and Wikivoyage. Language metadata identifies languages; project metadata identifies the individual wikis.

**How often does the directory change?**

Wikimedia describes reference metadata as changing rarely and recommends caching it instead of fetching it on every run. This is directory data, so article edit frequency does not describe its freshness.

**Are language records and project records interchangeable?**

No. Language records include English and localized language names, while project records identify a particular wiki with its identifier, URL, project type, and language.

**Does the article result cap also restrict these directories?**

Wikimedia documents its result-limit setting as applying only to On-demand endpoints. The language and project directories are metadata endpoints, so that article cap does not describe their directory coverage.

**Can I reuse the returned reference data?**

Wikimedia Enterprise's terms say returned content remains subject to the applicable Free Culture and Open Source licenses. Reuse must follow the license that applies to the content.

