instagram/v3/general-search
Instagram general search API (with pagination) Support pagination via next_max_id to fetch more search results Returns blended results of users, hashtags, places, etc.
Input
Idle
Example output — click Run to generate your own
API README
General search (with pagination)
Purpose:
- Instagram general search API (with pagination)
- Support pagination via next_max_id to fetch more search results
- Returns blended results of users, hashtags, places, etc. Parameters:
- query: Search keyword
- next_max_id: Pagination ID, omit for first request, get from previous response
data.next_max_id - rank_token: Rank token, omit for first request, get from previous response
data.rank_token - enable_metadata: Enable metadata Return:
data.num_results: Number of resultsdata.users: User search resultsdata.places: Place search resultsdata.hashtags: Hashtag search resultsdata.next_max_id: Next page pagination ID (use as next_max_id in next request)data.rank_token: Rank token (use as rank_token in next request)data.has_more: Whether has more results Notes:- ⚠️ Known Issue: General search results may contain duplicate data, this is a known behavior of Instagram API
- When searching for hashtags,
querymust include the#prefix, e.g., use#fashionto search for the fashion hashtag - The
#character must be URL-encoded as%23in the URL, e.g.,?query=%23fashion - If using an HTTP client library (e.g., requests/httpx), just pass
#fashiondirectly and the library will handle encoding automatically Pagination usage:
- First request: Only pass
queryparameter - Get
next_max_idandrank_tokenfrom response - Next request: Pass
query,next_max_idandrank_token - Repeat steps 2-3 until
has_moreis false Price:
- 0.008 USD/request
query = "justin"
Imported from a validated TikHub OpenAPI document. Pricing must be reviewed before enabling.

