Instagram hashtag search API
GET /ig/hashtag/search/{query} · base https://api.getsocialapi.com/v1
Search hashtags by prefix — the canonical way to find the exact tag spelling
and its post count before pulling hashtag medias.
Upstream: tags/search/?q=.
Request
| Parameter | In | Required | Description |
|---|---|---|---|
query | path | yes | Query string, 1–100 chars (spaces are URL-encoded automatically) |
The route always returns the full first page of matches (~55); the page size is decided by Instagram and cannot be changed — there is no page-size parameter.
Example
curl https://api.getsocialapi.com/v1/ig/hashtag/search/gymmotivation \
-H "X-API-Key: gsa_live_..."
Response
{
"results": [
{
"id": 17843689663009439,
"name": "gymmotivation",
"media_count": 107394586,
"formatted_media_count": "107M",
"search_result_subtitle": "107M posts",
"use_default_avatar": true,
"challenge_id": 1
}
],
"has_more": false,
"rank_token": "1792166278503|61f5…",
"page_token": null,
"inform_module": null,
"status": "ok"
}
| Field | Type | Description |
|---|---|---|
results[] | array | Matches sorted by relevance |
results[].id | int | Internal hashtag id |
results[].name | string | Tag name (no #) — use it verbatim in hashtag info / medias |
results[].media_count | int | Total public posts with the tag |
results[].formatted_media_count | string | Pre-formatted count, e.g. "107M" |
results[].search_result_subtitle | string | Display subtitle, e.g. "107M posts" |
has_more | bool | More results available for the query |
rank_token | string | Ranking token (pass-through; do not build logic on it) |
Errors
| HTTP | Meaning |
|---|---|
401 / 403 / 429 | see Rate limits |