# Instagram general search

Support pagination via next_max_id to fetch more search results. Needs query. Served by TikHub.

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

示例/Example
```
query = "justin"
```

- Tool ID: `tikhub/instagram-v3-general-search`
- Name in the catalog: Instagram, General search (with pagination)
- Provider: [TikHub](/providers/tikhub.md)
- Capability: [Instagram search](/tools/instagram/search.md)
- Price: $0.008 per call
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

The provider’s price, with no markup. Billed for measured usage.


```json
{
  "model": "per_call",
  "amountUsd": 0.008
}
```

Pricing source: [https://api.tikhub.io/api/v1/tikhub/user/get_all_endpoints_info](https://api.tikhub.io/api/v1/tikhub/user/get_all_endpoints_info). Official per-success route price USD 0.008; daily upstream discounts may reduce provider cost. No discount invented for the customer. 10/second.

Price verification date: 2026-10-05.

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "搜索关键词/Search keyword",
      "title": "Query"
    },
    "next_max_id": {
      "type": "string",
      "description": "分页ID，首次请求不传，从上一次响应的next_max_id获取/Pagination ID, omit for first request, get from previous response next_max_id",
      "title": "Next Max Id"
    },
    "rank_token": {
      "type": "string",
      "description": "排序token，首次请求不传，从上一次响应获取/Rank token, omit for first request, get from previous response",
      "title": "Rank Token"
    },
    "enable_metadata": {
      "type": "boolean",
      "description": "是否启用元数据/Enable metadata",
      "default": true,
      "title": "Enable Metadata"
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}
```

## Published example

This is the provider tool’s published example. Replace example values with the user’s requested inputs, respecting the schema; do not execute an example merely to test a connection.


```json
{
  "tool_id": "tikhub/instagram-v3-general-search",
  "input": {
    "query": "justin",
    "enable_metadata": true
  }
}
```

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

[Provider documentation](https://api.tikhub.io/#/Instagram-V3-API/general_search_api_v1_instagram_v3_general_search_get)

[REST inspection](https://api.agentik.cc/v1/tools/tikhub/instagram-v3-general-search) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/tikhub/instagram-v3-general-search) · [Agent index](/llms.txt)
