[Integrations](https://spiral.ai/integrations) › [Gemini](https://spiral.ai/integrations/gemini) › [Instagram post shortcode to media ID](https://spiral.ai/integrations/gemini/instagram-post-shortcode-to-media-id)

# How to Use Instagram post shortcode to media ID in Gemini

Convert an Instagram post shortcode into its numeric media ID. Use it to match saved post links with records indexed by media ID.

|  |  |
| --- | --- |
| Model | Instagram post 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 post shortcode to media ID in Gemini

- Use Instagram post shortcode to media ID to convert DeJ28eTxo4s and show the original shortcode beside the returned numeric ID.
- Use Instagram post shortcode to media ID for DeJ28eTxo4s and DeTUk4sDSp-. Give me a two-row reference table for an internal content inventory.
- Use Instagram post shortcode to media ID for DeJ28eTxo4s, DeTUk4sDSp-, and DeJ28eTxo4s. Return one row per distinct post and count its appearances in my list.
- Use Instagram post shortcode to media ID for the post reference in https://www.instagram.com/p/DeJ28eTxo4s/. Show the link, shortcode, and returned numeric ID together.
- Use Instagram post shortcode to media ID for DeJ28eTxo4s and DeTUk4sDSp-. Format the returned mappings as a short handoff note for our internal reporting team.

## How to set up Instagram post shortcode to media ID in Gemini

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

### Use the Gemini connector

1. **Open Connected Apps**: On your computer, go to gemini.google.com. At the bottom, click Settings › Connected Apps. If you don't see Connected Apps, click Personal Intelligence first, then Connected Apps.

2. **Add Spiral as a custom app**: Under Custom apps, click Add a custom app and paste this MCP server URL:

```text
https://api.spiral.ai/mcp
```

3. **Sign in to Spiral and approve**: Follow the on-screen instructions. Spiral opens: sign in, pick the organization and click Authorize. No API key.

### Use the Spiral skill

1. **Send Gemini 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 post 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-v3-shortcode-to-media-id",
    "input": {
      "shortcode": "CrgVBtHrFHm"
    }
  }'
```

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

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

## Instagram post shortcode to media ID tools and prices

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

## What can you do with Instagram post shortcode to media ID in Gemini?

Turn Instagram post references into a table of numeric media IDs for an internal report. Compare the converted references to identify repeated posts or reconcile two lists.

### Match campaign links to reporting records

Convert the shortcodes in a brand's saved Instagram campaign links, then match the returned media IDs against an existing internal reporting export.

### Fill missing IDs in a content inventory

Add numeric media IDs to internal content records that currently contain only Instagram post links.

### Find duplicate post references

Convert collected post shortcodes and compare the resulting IDs to find repeated references in an internal campaign register.

### Reconcile agency and brand reports

Create a shortcode-to-ID table so an internal review can compare an agency's link-based delivery list with a brand's ID-based records.

### Prepare a content database migration

Convert saved Instagram post references before moving an internal content inventory into a database that uses numeric media IDs.

### Resolve a mismatched post reference

Convert the shortcode from a disputed campaign link and compare its media ID with the ID stored in the internal report.

## Overview

- [TikHub](https://spiral.ai/providers/tikhub)
- [All Gemini guides](https://spiral.ai/integrations/gemini)

## Instagram post shortcode to media ID in other agents

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

## More Gemini guides

- [Instagram post shortcode](https://spiral.ai/integrations/gemini/instagram-post-shortcode)
- [Instagram posts using audio](https://spiral.ai/integrations/gemini/instagram-posts-using-audio)
- [Instagram post media ID](https://spiral.ai/integrations/gemini/instagram-post-media-id)
- [Instagram posts using music](https://spiral.ai/integrations/gemini/instagram-posts-using-music)
- [Instagram post likes](https://spiral.ai/integrations/gemini/instagram-post-likes)
- [Instagram profile](https://spiral.ai/integrations/gemini/instagram-profile)

## Questions about Instagram post shortcode to media ID in Gemini

**Can Gemini use Instagram post shortcode to media ID?**

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

**How much does Instagram post shortcode to media ID cost in Gemini?**

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

**Do I need a TikHub account to use Instagram post shortcode to media ID in Gemini?**

No. Spiral runs Instagram post 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 post shortcode to media ID in Gemini?**

About two minutes: open Connected Apps, then add Spiral as a custom app, then sign in to Spiral and approve.

**Does Gemini wait while Instagram post shortcode to media ID runs?**

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

**What does Instagram shortcode conversion return?**

TikHub documents the result as a numeric media ID derived from an Instagram post shortcode. Its documented purpose is identifier conversion.

**How does a shortcode relate to an Instagram post link?**

TikHub documents the post URL pattern instagram.com/p/{shortcode}/. The shortcode is the post reference between /p/ and the final slash.

**Does TikHub's coverage include private Instagram content?**

TikHub states that it accesses and processes only publicly available data. Its stated coverage does not include private content.

**Does TikHub update results after delivering them?**

TikHub's terms say it has no obligation to verify, update, or correct data after delivery. A delivered result does not include a commitment to maintain that data afterward.

**What business use does TikHub's service license permit?**

TikHub limits its service license to lawful internal business purposes. That is the stated use boundary for the service.

