# Instagram Post Lookup by URL, Shortcode, or Media ID

> Instagram Post Lookup by URL, Shortcode, or Media ID is a paid API for AI agents from x402.apidirect.io, paid per call via x402, $0.007/call, status unknown (last checked 2026-10-30).

Fetches metadata and content for a single Instagram post, reel, or IGTV video given its URL, shortcode, or numeric media ID, with optional AI sentiment analysis.

## Facts

- Endpoint: GET https://x402.apidirect.io/v1/instagram/post?utm_source=zero.xyz
- Price: $0.007/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/instagram-post-lookup-by-url-shortcode-or-media-id-30d6f2b8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kc5W4lwa6zM7JYMgtFbx8

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability instagram-post-lookup-by-url-shortcode-or-media-id-30d6f2b8
```

Example prompt: Can you pull up the details for this Instagram post — https://www.instagram.com/p/CxYQJO8xuC6/ — and also run sentiment analysis on it so I can see the dominant emotion and emotional intensity?

## When to prefer this

Use this endpoint when you need structured data from a specific, known Instagram post, reel, or IGTV video identified by URL, shortcode, or media ID — especially when you also want AI-powered emotion and sentiment analysis. Prefer this over search-based endpoints when you already have the post's identifier and need its full content details.

## Known failure modes

- Invalid or non-Instagram URL returns an error indicating the URL is not supported
- Post not found or private/deleted returns a 404-equivalent error
- Missing both url and code parameters returns a validation error requiring one of them
- Non-Instagram URL (e.g. Twitter or TikTok link) rejected with URL format validation error
- Rate limits or Instagram-side blocking may cause temporary unavailability

## How this service works

Look up a single Instagram post, reel, or IGTV video by URL, shortcode, or numeric media ID.

## Output

Returns structured data about the Instagram post including caption, media type (post/reel/IGTV), engagement metrics (likes, comments count), author info, timestamp, and media URLs. If sentiment is requested, also returns an emotions object with scores (joy, trust, fear, surprise, sadness, disgust, anger, anticipation each 0-100), a dominant_emotion, emotional_intensity (0-10), and polarity (positive, negative, or neutral).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "url": {
       "type": "string",
       "maxLength": 500,
       "description": "Instagram post, reel, IGTV, or story URL, e.g. https://www.instagram.com/p/CxYQJO8xuC6/ (max 500 characters). Must be an instagram.com URL containing /p/, /reel, /tv/, or /stories/. Provide either url or code."
      },
      "code": {
       "type": "string",
       "maxLength": 50,
       "description": "The post's shortcode, e.g. CxYQJO8xuC6, or numeric media ID (max 50 characters, letters/digits/-/_ only). Provide either url or code."
      },
      "get_sentiment": {
       "type": "boolean",
       "default": false,
       "description": "Set to true to add AI emotion analysis to the post. Adds a `sentiment` object containing `emotions` (joy, trust, fear, surprise, sadness, disgust, anger and anticipation, each scored 0-100), `dominant_emotion`, `emotional_intensity` (0-10), and `polarity` (positive, negative or neutral). If the post"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/instagram-post-lookup-by-url-shortcode-or-media-id-30d6f2b8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.apidirect.io](https://www.zero.xyz/host/x402.apidirect.io/llms.txt)
