Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Instagram Hashtag Search (V3)

API 文件
https://api.sandbase.ai/v1/api/instagram/v3/search-hashtags

Searches Instagram hashtags by keyword and returns matching hashtag names, IDs, and media counts. Supports pagination via rank tokens.

價格
$0.008美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 1 個選填

Playground

輸入
Search keyword
Rank token from previous search response for pagination
輸出範例
回應outputs · 1.2 KB · 51 行
[
  {
    "data": {
      "_rid": "3a5106a482aa8",
      "count": 20,
      "hashtags": [
        {
          "id": "17841553213093056",
          "media_count": 2319697,
          "name": "openai",
          "profile_pic_url": null
        },
        {
          "id": "17841563491091320",
          "media_count": 2530825,
          "name": "openair",
          "profile_pic_url": null
        },
        {
          "id": "17987906725321754",
          "media_count": 35506,
          "name": "openaidalle",
          "profile_pic_url": null
        },
        "… 17 more items in the full response"
      ],
      "items": [
        {
          "id": "17841553213093056",
          "media_count": 2319697,
          "name": "openai",
          "profile_pic_url": null
        },
        {
          "id": "17841563491091320",
          "media_count": 2530825,
          "name": "openair",
          "profile_pic_url": null
        },
        {
          "id": "17987906725321754",
          "media_count": 35506,
          "name": "openaidalle",
          "profile_pic_url": null
        },
        "… 17 more items in the full response"
      ],
      "rank_token": null
    }
  }
]

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

Instagram Hashtag Search (V3) API

Searches Instagram hashtags by keyword and returns matching hashtag names, IDs, and media counts. It needs one input: a search keyword in query.

Use cases

  • Compare reported media_count values as one descriptive input; they do not measure campaign performance or recent demand.
  • Find spin-off or misspelled variants of a brand or topic keyword, such as openair next to openai.
  • Collect hashtag IDs and names for a list of keywords to feed a hashtag monitoring job.
  • Inspect whether the selected search returns a matching hashtag; absence is not proof of name availability or ownership.

Request

curl -X POST "https://api.sandbase.ai/v1/api/instagram/v3/search-hashtags" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "openai"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
querystringYesSearch keyword
rank_tokenstringNoRank token from previous search response for pagination

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "_rid": "3f439430dc5ce",
  "count": 20,
  "hashtags": [
    {
      "id": "17841553213093056",
      "media_count": 2360486,
      "name": "openai",
      "profile_pic_url": null
    }
  ],
  "items": [
    {
      "id": "17841553213093056",
      "media_count": 2360486,
      "name": "openai",
      "profile_pic_url": null
    }
  ],
  "rank_token": null
}

Response fields

FieldMeaning
hashtags[].nameHashtag text without the # sign.
hashtags[].idInstagram ID of the hashtag, returned as a string.
hashtags[].media_countNumber of posts that use the hashtag.
hashtags[].profile_pic_urlImage URL for the hashtag. It is null in the sample response.
items[].name / items[].id / items[].media_countThe same hashtag entries as in hashtags, repeated under items.
countNumber of hashtags returned in this response.
rank_tokenToken for requesting the next page of results. It is null in the sample response.

Notes

  • Pass the rank_token from a response into the next request along with the same query to get more results. When rank_token is null, the response gave no token for another page.
  • hashtags and items hold the same entries, so you can read either one.
  • To list posts under a hashtag, call Instagram Hashtag Posts (V3).
  • To search across users, hashtags, and places in one call, use Instagram General Search (V3).

Pricing

$0.008 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Discover hashtag names with one keyword

Send query, such as openai. This route finds hashtag candidates; it does not retrieve posts and does not take the other route's tag or max_id fields. Omit rank_token on the first request. Review the exact returned name and string hashtag id before selecting a candidate; similar spellings are not proof of the same topic or brand.

The full saved reference dated October 7, 2026 contains 20 entries, duplicated under hashtags and items, with rank_token null. Read one array, not both concatenated. The selected search payload has no documented status or code success field: require the expected array and record shape, reject explicit errors, and do not borrow status ok from Hashtag Posts. Distinguish a valid empty list from an absent or malformed field. A returned count is a response field, not a promised page size.

Keep media_count under its source name and keep missing counts unknown. It is a reported volume measure, not recent growth, audience demand, unique authors or campaign performance. profile_pic_url is null in the saved reference; do not substitute an unrelated image. A search result's presence or absence is not a trademark, ownership or availability check.

The contract accepts a returned rank_token with the same query, but the selected saved response provides none. Do not manufacture a token, use a hashtag ID as a cursor, or claim a tested continuation. Each separately chosen continuation needs its own budget; this first request does not automatically collect all pages or call post details.

After reviewing a candidate, Hashtag Posts can be chosen as a separate request using its exact tag name without #. Keep discovery evidence separate from any later post sample.

Give your agent one hashtag task

Choose keyword-to-tag discovery or a first page for a tag you already selected. Share the setup Skill, Markdown quickstart, selected endpoint and desired result. Keep SANDBASE_API_KEY locally; use POST /v1/api/ with Bearer authentication. Validate completed SandBase status and an object at outputs[0].data before applying the selected route's business checks.

Pricing checked on November 8, 2026 lists $0.008 per call for each selected route, with 100 daily calls shared across eligible data APIs in the organization, resetting at 00:00 UTC. Eligibility does not reveal remaining allowance. Start with one request and inspect it before choosing another. No new business request, next-page roundtrip or paid media retrieval was made for this revision. The Instagram hashtag Python guide separates historical examples, current references and offline validation.

探索更多

相關 APIs

所有 APIs
API價格回應
Instagram每次呼叫 $0.008JSON
Instagram每次呼叫 $0.008JSON
Instagram每次呼叫 $0.008JSON
Instagram每次呼叫 $0.008JSON
Instagram每次呼叫 $0.002JSON
Instagram每次呼叫 $0.008JSON

指南:Instagram API cost: official limits and per-call pricesBest Instagram API in 2026: Pricing Compared

問題

常見問題

我要如何使用 Instagram Hashtag Search (V3) API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/instagram/v3/search-hashtags。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Instagram Hashtag Search (V3) API 的費用是多少?

每次 $0.008,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Instagram Hashtag Search (V3) API 接受哪些參數?

必要:query (string)。 選填:rank_token (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Instagram Hashtag Search (V3) API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Instagram 開發者帳號或 API 金鑰嗎?

不需要。Instagram Hashtag Search (V3) 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Instagram API 存取權。

search-hashtags 和 hashtag-posts 的輸入一樣嗎?

不一樣。Hashtag Search 需要 query,並可選 rank_token。Hashtag Posts 需要不含 # 的 tag,並可選 max_id。Search 回傳的是候選項目,不是貼文;要為另一個路由選定候選項目,則是另一個請求。

我應該把 hashtags 和 items 合併,或假設 status 為 ok 嗎?

不應該。所選的 search 參考文件在 hashtags 和 items 中重複相同條目,且沒有提供 status 標記。請讀取一個陣列、驗證其記錄,並區分缺失資料與有效的空清單。不要沿用 post 路由的 status ok 檢查,也不要把重複陣列重複計數。

media_count 或已儲存的 rank_token 能證明趨勢或更多頁數嗎?

不能。media_count 是回報的數量,不是成長、唯一作者或活動成果。10 月 7 日儲存的搜尋中 rank_token 為 null。未測試續接;不要憑空捏造 token,也不要從這個單一回應推斷所有可用結果。