[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [OpenStreetMap element details](https://spiral.ai/integrations/opencode/openstreetmap-element-details)

# How to Use OpenStreetMap element details in opencode

Returns one map object's tags and geographic structure, with referenced geometry available for ways and relations. Use it to inspect a known road, building, or boundary in detail.

|  |  |
| --- | --- |
| Model | OpenStreetMap element details |
| 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 OpenStreetMap element details in opencode

- Use OpenStreetMap element details to inspect the Berlin administrative boundary referenced in this project's map data. Show its tags and referenced geographic structure.
- Use OpenStreetMap element details to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from OpenStreetMap element details and tell me what changed since last week.
- Check OpenStreetMap element details and summarize what you find in three bullet points.
- Pull the newest data from OpenStreetMap element details and give me the result as a table.

## How to set up OpenStreetMap element details 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 OpenStreetMap element details**: 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": "openstreetmap-org/places/get_element",
    "input": {
      "id": 1,
      "type": "node"
    }
  }'
```

Then paste one of the prompts above: opencode finds OpenStreetMap element details on Spiral, shows the price and runs it.

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

## OpenStreetMap element details tools and prices

- [OpenStreetMap · Get element](https://spiral.ai/tools/alexandria/openstreetmap-org/places/get_element) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| full |  | — | Also return the nodes of a way, or the nodes and ways of a relation. Not allowed for nodes. |

## What can you do with OpenStreetMap element details in opencode?

Build a reviewable map-data audit for a public district in your project. Use OpenStreetMap locations, feature records, or editing evidence to explain what the returned data supports.

### Build a neighborhood base map

Locate Covent Garden, inspect a small surrounding block, label public landmarks from coordinates, and refresh the saved map objects.

### Maintain a public amenity directory

Find mapped libraries or drinking fountains in a named district, inspect their tags, and refresh known records for a civic directory.

### Investigate an unexpected map change

Compare a changed public feature with its earlier versions, surrounding map data, nearby edit sessions, and reported map problems.

### Review accessibility mapping

Inspect available accessibility tags on public amenities, compare saved records, trace relevant edits, and collect map reports for human review.

### Check an administrative boundary

Locate a municipality, inspect its mapped boundary and nearby features, then review object history and edit sessions when the boundary changes.

### Investigate a station map discrepancy

Compare saved station-area records with current objects, inspect the surrounding block, and use history, edit sessions, and issue reports to explain discrepancies.

## Overview

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

## OpenStreetMap element details in other agents

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

## More opencode guides

- [OpenStreetMap coordinate lookup](https://spiral.ai/integrations/opencode/openstreetmap-coordinate-lookup)
- [OpenStreetMap element history](https://spiral.ai/integrations/opencode/openstreetmap-element-history)
- [OpenStreetMap batch element lookup](https://spiral.ai/integrations/opencode/openstreetmap-batch-element-lookup)
- [OpenStreetMap feature search](https://spiral.ai/integrations/opencode/openstreetmap-feature-search)
- [Nissan vehicle details](https://spiral.ai/integrations/opencode/nissan-vehicle-details)
- [OpenStreetMap local map data](https://spiral.ai/integrations/opencode/openstreetmap-local-map-data)

## Questions about OpenStreetMap element details in opencode

**Can opencode use OpenStreetMap element details?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run OpenStreetMap element details like any built-in tool.

**How much does OpenStreetMap element details 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 OpenStreetMap element details in opencode?**

No. Spiral runs OpenStreetMap element details on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up OpenStreetMap element details in opencode?**

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

**Does opencode wait while OpenStreetMap element details runs?**

OpenStreetMap element details runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**Which parts of the world does OpenStreetMap cover?**

OpenStreetMap has worldwide scope, including roads, trails, cafés, and railway stations. Its records come from a community of contributors.

**Does worldwide coverage mean every local feature is mapped?**

No. OpenStreetMap's accuracy documentation says basic map coverage is still being built in many areas, so a local result set cannot establish that every feature is present.

**How frequently are OpenStreetMap changes distributed?**

OpenStreetMap publishes minute, hourly, and daily change files. Those replication intervals do not establish one refresh schedule for every service that uses the data.

**Are these map images or underlying geographic records?**

OpenStreetMap's editing API exposes raw geographic data. Nodes, ways, and relations describe the underlying features rather than a rendered map image.

**Is an OpenStreetMap number enough to identify a feature?**

No. Nodes, ways, and relations have separate ID spaces, so retain the object type alongside the number.

