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.008 每次调用JSON
Instagram$0.008 每次调用JSON
Instagram$0.008 每次调用JSON
Instagram$0.008 每次调用JSON
Instagram$0.002 每次调用JSON
Instagram$0.008 每次调用JSON

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

问题

常见问题

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

向 https://api.sandbase.ai/v1/api/instagram/v3/search-hashtags 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 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 key 吗?

不需要。Instagram Hashtag Search (V3) 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 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,也不要仅凭这一条响应推断所有可用结果。