Skip to main content

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​

ParameterInRequiredDescription
querypathyesQuery 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"
}
FieldTypeDescription
results[]arrayMatches sorted by relevance
results[].idintInternal hashtag id
results[].namestringTag name (no #) — use it verbatim in hashtag info / medias
results[].media_countintTotal public posts with the tag
results[].formatted_media_countstringPre-formatted count, e.g. "107M"
results[].search_result_subtitlestringDisplay subtitle, e.g. "107M posts"
has_moreboolMore results available for the query
rank_tokenstringRanking token (pass-through; do not build logic on it)

Errors​

HTTPMeaning
401 / 403 / 429see Rate limits