Instagram Hashtag Search API
Hashtag Explore: native grid first, fallback path only on miss. Max 50. Flat 2 credits.
GET request to /v1/instagram/hashtag-search that responds with clean JSON and costs 2 credits. Pass cache=true for a free 24h cache hit; default is always fresh. Start with 100 free credits — no credit card.What is the Instagram Hashtag Search API?
Pass a hashtag without the # and get posts from Instagram's hashtag Explore as clean JSON. Same native grid as reels-search. A query with spaces (travel blog) is 400 HASHTAG_HAS_SPACES — Instagram tags are one token; nothing is fetched. A slower fallback path runs only when native listed nothing. limit max 50. A wall miss with a last-good grid is 200 stale (0 credits, 6h) instead of 502. A tag Instagram does not have (typo) is 404 HASHTAG_NOT_FOUND at 0 credits. Hard 90s deadline. login_wall is remembered 60s per hashtag; persistent after 3 fresh misses on that tag. Optional mediaType=reels. Flat 2 credits. Pass cache=true for the shared cache.
What you get
- Hashtag Explore posts (Reels-heavy top surface; not keyword search)
- engagement.views + viewsSource on video rows; likes/comments with *IsApproximate flags
- hidden counts are omitted keys, not fabricated zeros
- isPaidPartnership / isAd / isAffiliate, musicId, location, mediaType=reels
- Native first; fallback path only on miss; last-good stale 200 on wall
Try it
Fill in the parameters below and copy a ready-to-run request, or open the live Playground to run it against your account (no API key paste).
Parameters
curl "https://api.captapi.com/v1/instagram/hashtag-search?q=skincare" \
-H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."Edit the parameters and the code updates instantly. Switch languages and hit copy.
Example response
{
"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 is returned in response headers: X-Captapi-Credits (credits charged), X-Captapi-Cache (hit or miss), and X-Captapi-Source. Failed requests (4xx/5xx) are never charged. See the full list of error codes in the error reference.
Response structure
A successful call returns success and a data object with the following fields:
Result
totalNumber of results returned.
Each result
Each item in results contains:
titleResult title.urlDirect URL to the content.authorCreator handle.viewsView count where available.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | Hashtag without the # (min 2 characters). One token — spaces are 400 HASHTAG_HAS_SPACES. |
| limit | integer | No | Max items to return (default 20, max 50). Flat 2 credits per call. |
| mediaType | string | No | all (default) or reels — return only Reels/clips when set to reels. |
| cache | boolean | No | Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. |
Authentication: send your key as Authorization: Bearer capt_live_.... A typical call costs 2 credits. Pass cache=true for a free 24h cache hit; default is always fresh.
instagram_hashtag_search via @captapi/mcp. Set it up →How it works
- 1. Sign up — get 100 free credits, no card required.
- 2. Create a key from your dashboard.
- 3. Send one request to
/v1/instagram/hashtag-searchand parse the JSON response.
Use cases
Trend Discovery
Find trending content by keyword or hashtag.
Content Sourcing
Build feeds and playlists programmatically.
Monitoring
Track topics, brands, and competitors.
Research
Sample large sets of content for analysis.
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 access, rate limits, retries, and authentication for you.
I sent "travel blog" and got 400 HASHTAG_HAS_SPACES. Is that a scrape miss?+
No — Instagram hashtags are a single token. A space means this is not a tag page, so we reject it immediately (0 credits). Nothing is fetched. Use travel or #travel.
Why is this 502 when Reels Search returns rows for a tag?+
Same Instagram hashtag grid as reels-search — native first. The fallback path only runs when native listed nothing (max 50). A wall with a last-good grid is 200 stale at 0 credits. 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 per hashtag for 60s (5 minutes after three fresh misses on that tag) — cacheScope=input. A miss on one tag never replays onto another tag. 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 connection.
When does persistent become true?+
After 3 fresh misses on the same hashtag. Replays do not increment consecutiveFailures. persistentAfter=3 is on every 502 so you do not have to guess.
I got 404 HASHTAG_NOT_FOUND. Is that a scrape miss?+
No — Instagram has neither a top grid nor a Reels grid for that tag, which almost always means a typo. It is decided before any fallback path runs, costs 0 credits, and is not remembered as an outage, so fixing the spelling works immediately.
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.
More Instagram APIs
Ready to use the Instagram Hashtag Search API?
Sign up, grab your key, and make your first call in 60 seconds.