API DocsinstagramSearchGeneral search (with pagination)
General search (with pagination)
What this API is for
- 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
GET
/openapi/api/v1/instagram/v3/general_searchPrice:Price unavailable · Actual charges depend on free quota and account discounts
Authentication
All API requests require a Bearer project token in the Authorization header
Authorization header
Authorization: Bearer YOUR_API_TOKENRequest 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
| Name | Location / type | Required | Notes | Example |
|---|---|---|---|---|
| query | query / string | Yes |
| justin |
| next_max_id | query / string | No |
| |
| rank_token | query / string | No |
| |
| enable_metadata | query / boolean | No |
|
Request body example
query = "justin"
Request examples
curl -X GET "https://api.trmesh.com/openapi/api/v1/instagram/v3/general_search" \ -H "Authorization: Bearer sdc_your_project_token" \ -H "Accept: application/json"
Response fields
- 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
| Field | Type | Notes | Example |
|---|---|---|---|
| data.num_results | unknown |
| |
| data.users | unknown |
| |
| data.places | unknown |
| |
| data.hashtags | unknown |
| |
| data.next_max_id | unknown |
| |
| data.rank_token | unknown |
| |
| data.has_more | unknown |
|
Common response envelope
Common fields for response status, request identifiers and data
| Field | Type | Notes | Example |
|---|---|---|---|
| code | integer |
| |
| request_id | string | null |
| |
| message | string |
| |
| message_zh | string |
| |
| support | string |
| |
| time | string |
| |
| time_stamp | integer |
| |
| time_zone | string |
| |
| docs | string | null |
| |
| cache_message | string | null |
| |
| cache_message_zh | string | null |
| |
| cache_url | string | null |
| |
| router | string |
| |
| params | unknown |
| |
| data | unknown | null |
|
Errors and limits
The docs cover not only success responses, but also auth failures, rate limits, and data-service errors
| Code | Meaning | Notes |
|---|---|---|
| 200 | Success | The request completed and returned the standard response envelope. |
| 401 | Unauthorized | The token is missing, invalid, or no longer active. |
| 429 | Rate limited | The request exceeded token, user, or plan-level throughput limits. |
| 502 | Service unavailable | The gateway could not obtain a healthy result. Retry in a moment. |
Next steps
New to the API? Read the guide or explore examples