Instagram modelsapi generation api

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 results
  • data.users: User search results
  • data.places: Place search results
  • data.hashtags: Hashtag search results
  • data.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, query must include the # prefix, e.g., use #fashion to search for the fashion hashtag
  • The # character must be URL-encoded as %23 in the URL, e.g., ?query=%23fashion
  • If using an HTTP client library (e.g., requests/httpx), just pass #fashion directly and the library will handle encoding automatically Pagination usage:
  1. First request: Only pass query parameter
  2. Get next_max_id and rank_token from response
  3. Next request: Pass query, next_max_id and rank_token
  4. Repeat steps 2-3 until has_more is false Price:
  • 0.008 USD/request
query = "justin"

Imported from a validated TikHub OpenAPI document. Pricing must be reviewed before enabling.

Related Models