API Hop logo API Hop

Guides

Instagram Story & Reels API: Endpoints & Code

Fetch Instagram Stories, Highlights, Reels, and convert shortcodes without Meta App Review. REST endpoints from $0.001/req with Python code.

Reviewed:

Meta’s official Instagram Graph API restricts Stories and Reels access to your own or explicitly authorized Business accounts, and requires a linked Facebook Page plus App Review. With the API Hop Instagram Data API, developers can call synchronous GET endpoints to fetch public user Stories (V2 at $0.002/req), Highlights (V2 at $0.002/req), Reels feeds and keyword search (V1 at $0.001/req, V2 at $0.002/req), and convert between shortcodes and 19-digit media_id strings for $0.001–$0.002/req.

Key Takeaways

  • Pick V2 over V3 for Stories and Highlights: V1 has no Stories endpoints. For active 24-hour Stories and profile Highlights, V2 ($0.002/req) accepts either username or user_id and costs one-fourth as much as V3 ($0.008/req).
  • Split Reels endpoints by input and discovery needs: Use V1 ($0.001/req) when you already hold a user_id for a creator’s Reels list. Switch to V2 ($0.002/req) when starting from a username or running keyword searches, and reserve V3 ($0.008/req) for cursor-based after/before pagination or recommended feeds.
  • V3 shortcode converters cost $0.002, not $0.008: Standard V3 endpoints bill $0.008/req, whereas the three shortcode utilities (/v3/media-ids, /v3/shortcodes, and /v3/shortcodes/from-url) bill $0.002/req, and the V1 converters cost $0.001/req.
  • 60-second sync responses with credit release on failure: Every route accepts GET query parameters only, forbids request bodies, and runs without auto-retry or auto-pagination. Failed upstream calls release your credit hold, while successful empty Story responses bill one request.
  • $10 minimum top-up with zero monthly fee: A non-expiring $10 prepaid deposit on the API Hop Pricing page covers 5,000 V2 Stories calls or 10,000 V1 Reels calls, with global payment support including USDT/USDC and local wallets.

Three Ways to Extract Instagram Stories, Reels, and Shortcodes in 2026

Compare onboarding rules, billing models, and 10,000-call costs before writing your integration (verified 2026-11-30):

Access RouteAccount & Review BarrierBilling ModelEst. Cost for 10,000 CallsOperational Boundary
Official Instagram Graph APIBusiness/Creator account linked to Facebook Page; App Review required$0/call (capped at 4,800 × impressions calls per 24h)$0 (own/client accounts only)Cannot read arbitrary public Stories or competitor Reels; low-impression accounts hit rate limits quickly
Apify Reels / Story ScrapersNo Meta review requiredPer-result actor fee (~$0.49–$2.00+/1K items) + platform plan (Starter $19/mo) + proxy/compute~$4.90–$20.00+ (plus plan & compute)Async actor containers add cold-start latency; proxy costs scale with concurrency
API Hop Instagram Data APISelf-serve Bearer key, no Meta reviewPay-per-call prepaid: $0.001 (V1), $0.002 (V2 & V3 shortcode tools), $0.008 (V3 main)$10.00 (V1 Reels) or $20.00 (V2 Stories)Public read-only data; client code manages pagination tokens and string ID parsing

If you want a map of all 93 endpoints across profiles, posts, and comments, start with the Instagram API 93-endpoint guide or our Apify Instagram Scraper vs API Hop cost breakdown. This tutorial focuses on production Python code for Stories, Highlights, Reels, and Shortcode Conversion.

Prerequisites

Set up three items before making your first request:

  1. API Hop Key: Register on the API Hop Pricing page and generate a Bearer key. Prepaid balances start at $10 (never expire) with no US credit card or business KYC needed, and accept USDT/USDC crypto, Brazil PIX, and Indonesia QRIS/GoPay/DANA.
  2. Local Runtime: Python 3.9+ with requests, or standard curl.
  3. Contract Bookmarks: Keep the Instagram API Overview and Instagram Endpoint Reference open for exact parameter rules.
pip install -U requests
export APIHOP_API_KEY="sk-your-apihop-key"

Quickstart: Fetch User Stories and Extract a Shortcode in 2 Minutes

All Instagram routes use GET query strings with Authorization: Bearer headers. Pull active 24-hour Stories by username using V2 ($0.002/req):

curl --get "https://api.apihop.ai/v1/instagram/v2/users/stories" \
  -H "Authorization: Bearer $APIHOP_API_KEY" \
  --data-urlencode "username=instagram"

When you only have a shared Reel or post URL, extract its shortcode via the V3 URL utility ($0.002/req) in Python:

import os
import requests

resp = requests.get(
    "https://api.apihop.ai/v1/instagram/v3/shortcodes/from-url",
    headers={"Authorization": f"Bearer {os.environ['APIHOP_API_KEY']}"},
    params={"url": "https://www.instagram.com/reel/DUlObENDmJD/"},
    timeout=60,
)
resp.raise_for_status()
print("code:", resp.json().get("code"), "data:", resp.json().get("data"))

Expected output: code: 200 data: {'shortcode': 'DUlObENDmJD'} (the API preserves the upstream code/data envelope).

Step-by-Step Guide: Selecting Stories, Highlights, Reels, and Shortcode Endpoints

Here are the 16 endpoints covered in this workflow (prices and parameter rules verified 2026-11-30):

ModuleEndpoint PathPrice / SuccessRequired / anyOf FieldsPagination & Optional Params
User StoriesGET /v1/instagram/v2/users/stories$0.002username or user_id (at least one)None (returns active 24h tray)
User Stories (V3)GET /v1/instagram/v3/users/stories$0.008usernameNone
Highlights ListGET /v1/instagram/v2/users/highlights$0.002username or user_id (at least one)None
Highlight StoriesGET /v1/instagram/v2/highlights/stories$0.002highlight_id (e.g. 17895069621772257)None
Highlight Stories (V3)GET /v1/instagram/v3/highlights/stories$0.008highlight_id (e.g. highlight:18064916456320419)reel_ids, first, last
User Reels (Low-Cost)GET /v1/instagram/v1/users/reels$0.001user_idcount (1–50), max_id
User Reels (Username)GET /v1/instagram/v2/users/reels$0.002username or user_id (at least one)pagination_token
Search ReelsGET /v1/instagram/v2/search/reels$0.002keywordpagination_token
Recommended ReelsGET /v1/instagram/v3/reels/recommended$0.008Nonefirst (1–50), after
URL to ShortcodeGET /v1/instagram/v3/shortcodes/from-url$0.002urlNone
Shortcode to Media IDGET /v1/instagram/v1/media-ids (V2/V3 $0.002)$0.001shortcodeNone
Media ID to ShortcodeGET /v1/instagram/v1/shortcodes (V2/V3 $0.002)$0.001media_id (string)None

Step 1: Pull Active Stories and Archived Highlights via V2 ($0.002/req)

Stories vanish after 24 hours, whereas pinned Story collections remain accessible in Highlights. Query users/highlights first to discover highlight_id values, then pull the items inside each Highlight:

import os
import requests

headers = {"Authorization": f"Bearer {os.environ['APIHOP_API_KEY']}"}
base = "https://api.apihop.ai"

# 1. Fetch active 24h Stories ($0.002)
stories_resp = requests.get(
    f"{base}/v1/instagram/v2/users/stories",
    headers=headers,
    params={"username": "instagram"},
    timeout=60,
)
stories_resp.raise_for_status()
stories_json = stories_resp.json()
assert stories_json.get("code") == 200 and stories_json.get("data") is not None

# 2. Fetch profile Highlights directory ($0.002)
hl_resp = requests.get(
    f"{base}/v1/instagram/v2/users/highlights",
    headers=headers,
    params={"username": "instagram"},
    timeout=60,
)
hl_resp.raise_for_status()
hl_json = hl_resp.json()
print("Stories ok, highlights keys:", list((hl_json.get("data") or {}).keys()))

Expected output: Stories ok, highlights keys: [...]. Pass any returned Highlight ID into GET /v1/instagram/v2/highlights/stories?highlight_id=.... V2 expects a plain numeric string (17895069621772257), while V3 often uses the highlight: prefix, so avoid mixing formats across versions.

Step 2: Fetch Creator Reels and Search Reels by Keyword

When you already have a user_id, V1 GET /v1/instagram/v1/users/reels returns up to count=50 Reels for $0.001. To discover trending clips by topic, call V2 GET /v1/instagram/v2/search/reels ($0.002/req):

import os
import requests

headers = {"Authorization": f"Bearer {os.environ['APIHOP_API_KEY']}"}
resp = requests.get(
    "https://api.apihop.ai/v1/instagram/v2/search/reels",
    headers=headers,
    params={"keyword": "ai tools"},
    timeout=60,
)
resp.raise_for_status()
body = resp.json()
assert body.get("code") == 200 and body.get("data") is not None, f"Upstream error: {body}"
print("Reels search keys:", list(body["data"].keys()), "req:", resp.headers.get("X-Request-Id"))

Expected output: Reels search keys: [...] req: .... Pass the response’s pagination_token to the next V2 page, or max_id if you are paginating V1 /v1/instagram/v1/users/reels.

Step 3: Convert Between URLs, Shortcodes, and 19-Digit Media IDs

Downstream endpoints often accept only a shortcode or a 19-digit media_id rather than a full share URL. Extract the shortcode via /v3/shortcodes/from-url ($0.002), then resolve its numeric string ID via V1 /v1/media-ids ($0.001):

import os
import requests

headers = {"Authorization": f"Bearer {os.environ['APIHOP_API_KEY']}"}
sc = "DRhvwVLAHAG"

mid_resp = requests.get(
    "https://api.apihop.ai/v1/instagram/v1/media-ids",
    headers=headers,
    params={"shortcode": sc},
    timeout=60,
)
mid_resp.raise_for_status()
mid_data = mid_resp.json().get("data") or {}
media_id = str(mid_data.get("media_id") or mid_data.get("id") or "")
print("shortcode -> media_id:", media_id)

Expected output: shortcode -> media_id: 3774507992167247878 (always keep as a string to avoid precision loss). To convert back, call GET /v1/instagram/v1/shortcodes with the string media_id for $0.001.

Complete Working Example: Stories, Highlights, and Paginated Reels Collector

This script resolves a creator’s user_id, pulls active 24-hour Stories, fetches the first Highlight album, paginates two pages of Reels via V1 max_id, handles 429/5xx retries and HTTP 200 business-code checks, and prints the total estimated cost:

import json
import os
import time
import requests

API_KEY = os.environ["APIHOP_API_KEY"]
BASE_URL = "https://api.apihop.ai"


def ig_get(path: str, params: dict, max_retries: int = 3):
    for attempt in range(max_retries):
        resp = requests.get(
            f"{BASE_URL}{path}",
            headers={"Authorization": f"Bearer {API_KEY}"},
            params=params,
            timeout=60,
        )
        req_id = resp.headers.get("X-Request-Id")
        if resp.status_code == 200:
            payload = resp.json()
            if payload.get("code") == 200 and payload.get("data") is not None:
                return payload["data"], req_id
            raise RuntimeError(f"Business error {path}: code={payload.get('code')} req={req_id}")
        if resp.status_code in (429, 500, 502, 503, 504) and attempt < max_retries - 1:
            wait = 2 ** (attempt + 1)
            print(f"[Retry {attempt + 1}] HTTP {resp.status_code}, sleep {wait}s (req={req_id})")
            time.sleep(wait)
            continue
        resp.raise_for_status()
    raise RuntimeError("Max retries exceeded")


def collect_creator_video_assets(username: str, reels_pages: int = 2, out_path: str = "ig_story_reels.json"):
    cost = 0.0
    result = {"username": username, "stories": [], "highlight_stories": [], "reels": []}

    # 1. Resolve user_id (V1: $0.001)
    prof, _ = ig_get("/v1/instagram/v1/users/profile/by-username", {"username": username})
    cost += 0.001
    user_obj = prof.get("user") or prof
    user_id = str(user_obj.get("id") or user_obj.get("pk") or "")
    if not user_id:
        raise ValueError(f"Missing user_id for @{username}")

    # 2. Fetch active 24h Stories (V2: $0.002)
    stories_data, _ = ig_get("/v1/instagram/v2/users/stories", {"user_id": user_id})
    cost += 0.002
    result["stories"] = stories_data.get("items") or stories_data.get("tray") or []

    # 3. Fetch Highlights list and first Highlight album (V2: $0.002 + $0.002)
    hl_list, _ = ig_get("/v1/instagram/v2/users/highlights", {"user_id": user_id})
    cost += 0.002
    tray = hl_list.get("tray") or hl_list.get("items") or []
    if tray:
        first_hl_id = str(tray[0].get("id") or "").replace("highlight:", "")
        if first_hl_id:
            hl_detail, _ = ig_get("/v1/instagram/v2/highlights/stories", {"highlight_id": first_hl_id})
            cost += 0.002
            result["highlight_stories"] = hl_detail.get("items") or []

    # 4. Paginate Reels via V1 (V1: $0.001 / page)
    cursor = None
    for _ in range(reels_pages):
        query = {"user_id": user_id, "count": 12}
        if cursor:
            query["max_id"] = str(cursor)
        reels_data, _ = ig_get("/v1/instagram/v1/users/reels", query)
        cost += 0.001
        items = reels_data.get("items") or []
        if not items:
            break
        result["reels"].extend(items)
        cursor = reels_data.get("next_max_id") or reels_data.get("max_id")
        if not cursor or reels_data.get("more_available") is False:
            break
        time.sleep(0.5)

    with open(out_path, "w", encoding="utf-8") as f:
        json.dump(result, f, ensure_ascii=False, indent=2)
    print(
        f"Done @{username}: stories={len(result['stories'])}, "
        f"highlights={len(result['highlight_stories'])}, reels={len(result['reels'])}, "
        f"est_cost=${cost:.4f}"
    )


if __name__ == "__main__":
    collect_creator_video_assets("instagram", reels_pages=2)

Expected output: Done @instagram: stories=..., highlights=..., reels=..., est_cost=$0.0090 (one V1 profile lookup, three V2 Story/Highlight calls, and two V1 Reels pages for under one cent).

Error Handling and Troubleshooting

Every response includes an X-Request-Id header for support diagnostics:

Status / SymptomPlatform Code & Common CauseRecommended Action
40010000 / 10001: Unknown field, duplicate param, or missing username/user_idSend only fields listed in the Instagram Endpoint Reference
40120000: Missing or invalid Authorization: Bearer headerVerify APIHOP_API_KEY has no trailing spaces or revocation
40240000: Insufficient prepaid credit balanceTop up on the API Hop Pricing page
40320001: Gateway disabled or API key lacks permissionCheck key scopes in your console
42940001 / 40002: Rate limit or concurrency ceiling reachedSpace requests by 0.5s+ and apply 2s / 4s backoff
5xx / 60s timeout50000–50003: Upstream error or timeout (credit hold released)Retry up to 2 times and log X-Request-Id
HTTP 200 with code != 200Upstream business error (private account, expired Story, invalid shortcode)Assert payload.get("code") == 200 before parsing

Common Issues and Gotchas

  1. Precision loss when parsing media_id as a JavaScript Number: A 19-digit Instagram media_id such as 3850699893338385742 exceeds Number.MAX_SAFE_INTEGER (9007199254740991). Standard JSON.parse() rounds trailing digits and breaks /shortcodes lookups. Keep all IDs and cursors as strings.
  2. Assuming all V3 endpoints cost $0.008: V3 main endpoints bill $0.008/req, but the three shortcode converters (/v3/media-ids, /v3/shortcodes, and /v3/shortcodes/from-url) bill $0.002/req. For raw shortcode or media_id swaps, V1 drops that further to $0.001/req.
  3. Mixing V2 and V3 highlight_id formats: V2 /v2/highlights/stories expects numeric IDs like 17895069621772257, while V3 /v3/highlights/stories commonly uses highlight:18064916456320419. Strip or prepend the prefix when switching versions.
  4. Sending pagination_token to V1 or V3: V1 Reels uses max_id, V2 uses pagination_token, and V3 uses after/before. Passing the wrong cursor name triggers a 400 validation error.
  5. Polling accounts with zero active Stories: When a creator has no active 24-hour Stories, an empty valid response still bills one request. Schedule Story polling around posting cadences rather than tight loops.

Cost Estimation and Workload Math

Using default API Hop pricing ($0.001 V1, $0.002 V2 and V3 shortcode tools, $0.008 V3 main):

$$\text{Total Cost} = (N_{V1} \times $0.001) + (N_{V2 + V3\text{ Shortcode}} \times $0.002) + (N_{V3\text{ Main}} \times $0.008)$$

Workload ScenarioRequest Mix & VolumeAPI Hop CostApify Comparison (~$0.49–$2.00+/1K + $19/mo)
Complete tutorial script run3 V1 calls + 3 V2 calls$0.009 (< 1 cent)Requires platform plan & actor cold-start wait
Daily 24h Stories check on 100 creators (monthly)100 × 30 = 3,000 V2 Stories calls$6.00 / moStarter plan starts at $19/mo before result fees
500 creators × 50 Reels (25,000 videos)500 V1 profile IDs + 500 V1 Reels pages$1.00~$12.25–$50.00 for 25K items plus monthly plan
10,000 share URLs to Shortcode & Media ID10,000 V3 from-url ($0.002) + 10,000 V1 media-ids ($0.001)$30.00General scrapers rarely offer lightweight ID-swap endpoints

A $10 minimum top-up on the API Hop Pricing page never expires and requires zero monthly commitment. The same API key also unlocks YouTube, Threads, and TikTok endpoints in the API Hop Data API catalog, alongside Claude, GPT, and DeepSeek models to summarize Reels transcripts automatically.

What to Watch Next

  • Account-specific pricing overrides: Account-level pricing overrides catalog defaults, so high-volume teams should verify effective credit deductions in the console.
  • Upstream media-array shape shifts: V2 and V3 Story objects occasionally update nested video rendition keys inside tray and items. Use defensive .get() lookups when extracting CDN media URLs.

FAQ

Is the Instagram Story API free?

Meta’s official Instagram Graph API is free for approved Business or Creator accounts, but requires a linked Facebook Page, Meta App Review, and restricts reads to your own or authorized client accounts. It cannot pull arbitrary public Stories or competitor Reels. API Hop does not offer a permanent free tier, but carries zero monthly subscription fee: a $10 minimum deposit on the API Hop Pricing page runs 5,000 V2 Stories requests, and this tutorial’s full run costs $0.009.

How is the Instagram Reels API priced across V1, V2, and V3?

API Hop bills per successful request regardless of item count per page: V1 GET /v1/instagram/v1/users/reels costs $0.001 (up to 50 items/page), V2 /v2/users/reels and /v2/search/reels cost $0.002, and V3 /v3/users/reels and /v3/reels/recommended cost $0.008. Resolving user_id once and paging with V1 cuts per-page spend by 87.5%.

What does the Shortcode Converter do and how much does V3 cost?

Instagram links carry alphanumeric shortcodes like DRhvwVLAHAG, whereas V1 media endpoints expect 19-digit media_id strings. You can extract shortcodes from full URLs via /v3/shortcodes/from-url and convert bidirectionally with /v1/media-ids and /v1/shortcodes. Despite the V3 prefix, those three utilities bill $0.002/req, while V1 converters bill $0.001/req.

Why does V1 users/reels return 400 when I pass username?

V1 /v1/instagram/v1/users/reels accepts only numeric-string user_id values and rejects username. Switch to V2 GET /v1/instagram/v2/users/reels ($0.002/req) if you want to query directly by username or user_id.

Which payment methods work without a US credit card?

API Hop supports global self-serve prepaid top-ups without a US credit card or business entity verification. Visit the API Hop Pricing page to pay via USDT/USDC crypto, Brazil PIX, or Indonesia QRIS / GoPay / DANA, with balances that never expire.

Verification note: All 16 Instagram Stories, Highlights, Reels, and Shortcode Converter endpoint paths, parameter rules, and V1/V2/V3 rates were verified on 2026-11-30 against live API Hop reference docs and public documentation (console account rates take precedence).