Instagram · Guide

How to run a Instagram hashtag search

TL;DR
To run a Instagram hashtag search, sign up for a free Captapi key, then send one GET request to /v1/instagram/hashtag-search with your input. You get clean JSON back in seconds for 2 credits per call — no OAuth, scraping or platform SDKs. Hashtag Explore: native then Apify listing actor. Max 50. Stale 200 on wall. Flat 2 credits.

How to run a Instagram hashtag search (step by step)

  1. 1

    Get a free API key

    Create a free Captapi account (100 credits, no card) and generate an API key from the dashboard.

  2. 2

    Call the Instagram Hashtag Search API

    Send an authenticated GET request to /v1/instagram/hashtag-search with your input. No OAuth, no scraping setup.

  3. 3

    Read the JSON response

    Parse the clean JSON response. Pass cache=true for a free 24h cache hit; default is always fresh.

Code example

curl "https://api.captapi.com/v1/instagram/hashtag-search?q=skincare" \
  -H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."

What the response looks like

{
  "success": true,
  "data": {
    "total": 2,
    "results": [
      {
        "title": "Top result",
        "url": "https://example.com/1",
        "author": "@creator",
        "views": 530120
      },
      {
        "title": "Second result",
        "url": "https://example.com/2",
        "author": "@maker",
        "views": 210430
      }
    ]
  }
}

Billing metadata (credits charged, cache hit/miss) is returned in the X-Captapi-Credits and X-Captapi-Cache response headers.

Request parameters

NameTypeRequiredDescription
qstring YesHashtag without the # (min 2 characters).
limitintegerNoMax items to return (default 20, max 50). Flat 2 credits per call.
mediaTypestringNoall (default) or reels — return only Reels/clips when set to reels.
cachebooleanNoSet true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.

Frequently asked questions

What does the Instagram Hashtag Search API do?

The Instagram Hashtag Search API lets you search and return matching results from a public Instagram query using one GET request to /v1/instagram/hashtag-search. It returns clean JSON — no OAuth or infrastructure setup required.

How many credits does the Instagram Hashtag Search API cost?

Each successful call costs 2 credits. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Failed or empty results are never charged.

Do I need a Instagram API key or OAuth?

No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle proxies, rate limits, retries, and authentication for you.

Why is this 502 when Reels Search returns rows for a tag?

Same Instagram hashtag grid; this endpoint now falls through to the hashtag actor on native miss (max 50). A wall with a last-good grid is 200 stale at 0 credits. Permalink Apify stays blocked. Read error.code on a true miss.

Why was my retry as slow as the first 502?

It should not be. A login_wall is remembered service-wide for 60s (5 minutes after three fresh misses) — cacheScope=service, not per-tag. travel after skincare is a replay even if you never asked for travel. Replays keep the original scrape ms and add replayedFromMs. When a last-good grid exists the replay is a labelled stale 200 (0 credits) instead of 502. The 90s deadline turns a hung fetch into a timeout instead of a dead Cloudflare socket.

When does persistent become true?

After 3 fresh service-wide misses. Replays do not increment consecutiveFailures. persistentAfter=3 is on every 502 so you do not have to guess.

Is the Instagram Hashtag Search API suitable for production use?

Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Use it for analytics, monitoring, and content automation.

Ready to run a Instagram hashtag search?

Start free with 100 credits — no credit card required.

Get your free API key