[Integrations](https://spiral.ai/integrations) › [VS Code](https://spiral.ai/integrations/vscode) › [Instagram shortcode to media ID](https://spiral.ai/integrations/vscode/instagram-shortcode-to-media-id)

# How to Use Instagram shortcode to media ID in VS Code

Converts an Instagram post shortcode into its media ID, returning the original shortcode and conversion status. Use it to match post links with records stored by media ID or prepare identifiers for later lookups.

|  |  |
| --- | --- |
| Model | Instagram shortcode to media ID |
| Available through | TikHub |
| Category | Social Media |
| Price | $0.0026 per request. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Instagram shortcode to media ID in VS Code

- Use Instagram shortcode to media ID for DRhvwVLAHAG and save the returned identifier, original shortcode, and conversion status in a JSON fixture.
- Use Instagram shortcode to media ID for the shortcode in https://www.instagram.com/p/DRhvwVLAHAG/ and add the returned mapping to the project's campaign CSV.
- Use Instagram shortcode to media ID for DRhvwVLAHAG, then search the project's reporting files for the returned identifier and show matching records.
- Use Instagram shortcode to media ID for DRhvwVLAHAG and create a small command-line report showing the original shortcode, returned media ID, and conversion status.
- Use Instagram shortcode to media ID for https://www.instagram.com/p/DRhvwVLAHAG/ after extracting its shortcode, then compare the result with any saved mapping in this repository.

## How to set up Instagram shortcode to media ID in VS Code

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

### Use Spiral's MCP server

1. **Add the hosted server**: Use Add to VS Code on the console's Agents & MCP page, or run:

```bash
code --add-mcp '{"name":"spiral","type":"http","url":"https://api.spiral.ai/mcp"}'
```

2. **Sign in**: VS Code asks you to sign in when it first starts the server: sign in to Spiral and click Authorize. No API key. Run MCP: List Servers from the Command Palette to check that Spiral is running.

### Use the Spiral skill

1. **Send VS 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 Instagram shortcode to media ID**: 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": "tikhub",
    "model": "tikhub/instagram-v2-shortcode-to-media-id",
    "input": {
      "shortcode": "DRhvwVLAHAG"
    }
  }'
```

Then paste one of the prompts above: VS Code finds Instagram shortcode to media ID on Spiral, shows the price and runs it.

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

## Instagram shortcode to media ID tools and prices

- [Instagram V2 · Convert shortcode to media ID](https://spiral.ai/tools/tikhub/tikhub/instagram-v2-shortcode-to-media-id) (TikHub): $0.0026 per request.

## What can you do with Instagram shortcode to media ID in VS Code?

Add Instagram media IDs to a campaign CSV so post links can be joined to existing reporting records. A coding agent can extract shortcodes, collect conversion results, and write the mappings into the project's data files.

### Match campaign links to reporting records

Convert public brand post shortcodes into media IDs, then join the results to campaign records already keyed by media ID.

### Reconcile duplicate post references

Convert the shortcodes extracted from campaign links and compare their returned media IDs when consolidating repeated references.

### Migrate a public content archive

Add media IDs to an existing archive of public business post links while preserving each link and its original shortcode.

### Prepare identifiers for later lookups

Resolve public post shortcodes before passing the returned media IDs into a separate workflow that requires those identifiers.

### Organize editorial references

Attach media IDs to public organization posts cited in an editorial research list so editors can match links against existing content records.

### Investigate mismatched campaign records

Convert a campaign post's shortcode and compare the returned media ID with the identifier saved in the campaign log.

## Overview

- [TikHub](https://spiral.ai/providers/tikhub)
- [All VS Code guides](https://spiral.ai/integrations/vscode)

## Instagram shortcode to media ID in other agents

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

## More VS Code guides

- [Instagram search results](https://spiral.ai/integrations/vscode/instagram-search-results)
- [Instagram similar accounts](https://spiral.ai/integrations/vscode/instagram-similar-accounts)
- [Instagram related profiles](https://spiral.ai/integrations/vscode/instagram-related-profiles)
- [Instagram tagged posts](https://spiral.ai/integrations/vscode/instagram-tagged-posts)
- [Instagram reel and video download](https://spiral.ai/integrations/vscode/instagram-reel-and-video-download)
- [Instagram user ID lookup](https://spiral.ai/integrations/vscode/instagram-user-id-lookup)

## Questions about Instagram shortcode to media ID in VS Code

**Can VS Code use Instagram shortcode to media ID?**

Yes. Add Spiral to VS Code as an MCP server, and VS Code can find and run Instagram shortcode to media ID like any built-in tool.

**How much does Instagram shortcode to media ID cost in VS Code?**

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

**Do I need a TikHub account to use Instagram shortcode to media ID in VS Code?**

No. Spiral runs Instagram shortcode to media ID on its own TikHub account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Instagram shortcode to media ID in VS Code?**

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

**Does VS Code wait while Instagram shortcode to media ID runs?**

Instagram shortcode to media ID runs in the background. VS Code starts the run, checks on it and gives you the json when it's ready.

**What does Instagram shortcode conversion return?**

TikHub documents three outputs: conversion status, the original shortcode, and the converted media ID. The conversion identifies a post for workflows that store media IDs.

**Where is the shortcode in an Instagram post link?**

In instagram.com/p/DRhvwVLAHAG/, the shortcode is DRhvwVLAHAG. TikHub uses that exact example in its conversion documentation.

**Does conversion also return the caption or engagement counts?**

The converter's documented outputs are status, shortcode, and media ID. TikHub documents media, captions, likes, and comments under its separate post details lookup, which accepts a shortcode or full URL.

**Does having a media ID provide access to private Instagram content?**

TikHub says private accounts, direct messages, and non-public insights are outside its Instagram data coverage. Shortcode conversion does not expand that coverage.

**Is TikHub's Instagram data always current?**

TikHub warns that Instagram visitor-view data may be cached and lag live values by a few days. The converter's documented result contains identifiers and conversion status, so it should not be treated as a fresh engagement report.

