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

Instagram General Search (V2)

API 文件
https://api.sandbase.ai/v1/api/instagram/v2/general-search

Returns Instagram search results matching a specified keyword, including media items, user profiles, and engagement statistics.

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

Playground

輸入
Search keyword
Pagination token from previous response
輸出範例
回應outputs · 15.9 KB · 364 行
[
  {
    "data": {
      "data": {
        "count": 8,
        "items": [
          {
            "ai_interactive_embodiment_attachment_style_info": null,
            "ai_label_info": null,
            "are_remixes_crosspostable": true,
            "attribution": null,
            "audience": null,
            "audio": null,
            "autodub_status": null,
            "basel_encoding_timeout": null,
            "boost_unavailable_identifier": null,
            "boost_unavailable_reason": null,
            "boosted_by_sponsor": null,
            "boosted_post_id": null,
            "boosted_status": null,
            "branded_content_ads_boost_post_tokens": null,
            "byoa_langs": null,
            "can_modify_carousel": null,
            "can_reply": null,
            "can_reshare": true,
            "can_save": true,
            "caption": {
              "content_type": "comment",
              "created_at": 1764077059,
              "created_at_utc": 1764077059,
              "did_report_as_spam": false,
              "fb_mentioned_users": null,
              "hashtags": [
                "#catsoftheday",
                "#cat",
                "… 2 more items in the full response"
              ],
              "id": "3773673916037486064",
              "is_covered": false,
              "is_ranked_comment": false,
              "mentions": [],
              "private_reply_status": 0,
              "share_enabled": false,
              "status": "Active",
              "text": "#catsoftheday #cat #cutecats #catlovers❤️",
              "text_translation": null,
              "type": 1,
              "user": {
                "fbid_v2": "17841447606552454",
                "follower_count": 240938,
                "full_name": "𝐂𝐀𝐓𝐘 𝐂𝐑𝐔𝐒𝐇",
                "has_onboarded_to_text_post_app": null,
                "id": "47539634885",
                "is_active": null,
                "is_private": false,
                "is_verified": false,
                "profile_pic_id": "3737640702256854188",
                "profile_pic_url": "https://scontent-iad3-1.cdninstagram.com/v/t51.82787-19/562433378_18068299718586886_5033416524834714439_n.jpg?stp=dst-jpg_e0_s150x150_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0&_nc_ht=scontent-iad3-1.cdninstagram.com&_nc_cat=110&_nc_oc=Q6cZ2gEu9_I__YWMu5pKJmxnWjE5zle3Q4EUtZ0…",
                "social_context": null,
                "type": "XDTUserDict",
                "username": "catycrushdaily"
              }
            },
            "caption_is_edited": false,
            "carousel_last_edited_at": null,
            "carousel_media": null,
            "carousel_media_count": null,
            "carousel_media_pending_post_count": null,
            "clips_attribution_info": null,
            "clips_captions": null,
            "clips_captions_translations_urls": null,
            "clips_metadata": {
              "achievements_info": {
                "num_earned_achievements": null,
                "show_achievements": false
              },
              "additional_audio_info": {
                "additional_audio_username": null,
                "audio_reattribution_info": {
                  "should_allow_restore": false
                }
              },
              "audio_canonical_id": "18438577903101394",
              "audio_ranking_info": {
                "best_audio_cluster_id": "759395327171495"
              },
              "audio_type": "original_sounds",
              "branded_content_tag_info": {
                "can_add_tag": false
              },
              "clips_creation_entry_point": "clips",
              "content_appreciation_info": {
                "enabled": false,
                "entry_point_container": null
              },
              "contextual_highlight_info": null,
              "disable_use_in_clips_client_cache": false,
              "is_fan_club_promo_video": false,
              "is_public_chat_welcome_video": false,
              "is_shared_to_fb": false,
              "mashup_info": {
                "can_toggle_mashups_allowed": false,
                "has_been_mashed_up": true,
                "has_nonmimicable_additional_audio": false,
                "is_creator_requesting_mashup": false,
                "is_light_weight_check": true,
                "is_pivot_page_available": true,
                "mashup_type": null,
                "mashups_allowed": true,
                "non_privacy_filtered_mashups_media_count": 28,
                "original_media": null
              },
              "merchandising_pill_info": null,
              "music_info": null,
              "original_sound_info": {
                "allow_creator_to_rename": true,
                "audio_filter_infos": null,
                "audio_id": "25096617513312696",
                "audio_parts": [
                  "…"
                ],
                "audio_parts_by_filter": [
                  "…"
                ],
                "can_remix_be_shared_to_fb": true,
                "consumption_info": {
                  "is_bookmarked": false,
                  "is_trending_in_clips": false,
                  "should_mute_audio_reason": ""
                },
                "duration_in_ms": 10197,
                "hide_remixing": false,
                "ig_artist": {
                  "full_name": "𝐂𝐀𝐓𝐘 𝐂𝐑𝐔𝐒𝐇",
                  "has_onboarded_to_text_post_app": null,
                  "id": "47539634885",
                  "is_private": false,
                  "is_verified": false,
                  "profile_pic_id": "3737640702256854188",
                  "profile_pic_url": "https://scontent-iad3-1.cdninstagram.com/v/t51.82787-19/562433378_18068299718586886_5033416524834714439_n.jpg?stp=dst-jpg_e0_s150x150_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0&_nc_ht=scontent-iad3-1.cdninstagram.com&_nc_cat=110&_nc_oc=Q6cZ2gEu9_I__YWMu5pKJmxnWjE5zle3Q4EUtZ0…",
                  "type": "XDTUserDict",
                  "username": "catycrushdaily"
                },
                "is_audio_automatically_attributed": true,
                "is_explicit": false,
                "is_original_audio_download_eligible": false,
                "is_reuse_disabled": false,
                "is_xpost_from_fb": false,
                "original_audio_subtype": "contains",
                "original_audio_title": "Original audio",
                "original_media_id": "3773673916037486064",
                "progressive_download_url": "https://scontent-iad6-1.cdninstagram.com/o1/v/t2/f2/m69/AQMMqW5R4OZq6MiLT9C0klxjeexpDXkZ1gQUwS13JcpwbDfY_rz_bUxv1SY9XnwnPVHujDiTIGf0hEYPbY-ygINX.mp4?strext=1&_nc_cat=106&_nc_sid=ef5aa3&_nc_ht=scontent-iad6-1.cdninstagram.com&_nc_ohc=8DUcMRnQ-9cQ7kNvwGj7DjP&efg=eyJ2ZW5jb2RlX3RhZyI6Inhwdl9wcm9ncmVzc2l…",
                "should_mute_audio": false,
                "time_created": 1764077060,
                "trend_rank": null
              },
              "originality_info": null,
              "professional_clips_upsell_type": 0,
              "reusable_text_attribute_string": null,
              "shopping_info": null,
              "show_achievements": false,
              "show_tips": null,
              "template_info": null
            },
            "clips_tab_pinned_user_ids": [],
            "clips_text": null,
            "clips_trial": null,
            "coauthor_producer_can_see_organic_insights": false,
            "coauthor_producers": [],
            "code": "DReyG7PklXw",
            "collection_media": null,
            "comment_count": 1150,
            "comment_inform_treatment": {
              "should_have_inform_treatment": false,
              "text": ""
            },
            "comment_likes_enabled": true,
            "comments_disabled": null,
            "…": "137 more fields in the full response"
          },
          {
            "ai_interactive_embodiment_attachment_style_info": null,
            "ai_label_info": null,
            "are_remixes_crosspostable": true,
            "attribution": null,
            "audience": null,
            "audio": null,
            "autodub_status": null,
            "basel_encoding_timeout": null,
            "boost_unavailable_identifier": null,
            "boost_unavailable_reason": null,
            "boosted_by_sponsor": null,
            "boosted_post_id": null,
            "boosted_status": null,
            "branded_content_ads_boost_post_tokens": null,
            "byoa_langs": null,
            "can_modify_carousel": null,
            "can_reply": null,
            "can_reshare": true,
            "can_save": true,
            "caption": {
              "content_type": "comment",
              "created_at": 1782015472,
              "created_at_utc": 1782015472,
              "did_report_as_spam": false,
              "fb_mentioned_users": null,
              "hashtags": [
                "#cat",
                "#寵物",
                "… 3 more items in the full response"
              ],
              "id": "3924152311394648361",
              "is_covered": false,
              "is_ranked_comment": false,
              "mentions": [],
              "private_reply_status": 0,
              "share_enabled": false,
              "status": "Active",
              "text": "曼赤肯弟弟(。・ω・。)\n\n寶寶一個月大囉~\n\n#cat #寵物 #幼貓 #曼赤肯 #catlife",
              "text_translation": "曼赤肯弟弟(。・ω・。) \n\nBaby is one month old ~\n\n #cat #寵物 #幼貓 #曼赤肯 #catlife",
              "type": 1,
              "user": {
                "fbid_v2": "17841461137123116",
                "follower_count": 124012,
                "full_name": "豆花貓舍",
                "has_onboarded_to_text_post_app": null,
                "id": "60984933904",
                "is_active": null,
                "is_private": false,
                "is_verified": true,
                "profile_pic_id": "3149703093822609138",
                "profile_pic_url": "https://scontent-iad3-1.cdninstagram.com/v/t51.2885-19/361111301_659108669117614_9036149317455377233_n.jpg?stp=dst-jpg_e0_s150x150_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0&_nc_ht=scontent-iad3-1.cdninstagram.com&_nc_cat=110&_nc_oc=Q6cZ2gEu9_I__YWMu5pKJmxnWjE5zle3Q4EUtZ0por…",
                "social_context": null,
                "type": "XDTUserDict",
                "username": "douhua._cat"
              }
            },
            "caption_is_edited": false,
            "carousel_last_edited_at": null,
            "carousel_media": null,
            "carousel_media_count": null,
            "carousel_media_pending_post_count": null,
            "clips_attribution_info": null,
            "clips_captions": null,
            "clips_captions_translations_urls": null,
            "clips_metadata": {
              "achievements_info": {
                "num_earned_achievements": null,
                "show_achievements": false
              },
              "additional_audio_info": {
                "additional_audio_username": null,
                "audio_reattribution_info": {
                  "should_allow_restore": false
                }
              },
              "audio_canonical_id": "18597911386059389",
              "audio_ranking_info": {
                "best_audio_cluster_id": "881431958342121"
              },
              "audio_type": "original_sounds",
              "branded_content_tag_info": {
                "can_add_tag": false
              },
              "clips_creation_entry_point": "clips",
              "content_appreciation_info": {
                "enabled": true,
                "entry_point_container": {
                  "comment": "…",
                  "pill": "…"
                }
              },
              "contextual_highlight_info": null,
              "disable_use_in_clips_client_cache": false,
              "is_fan_club_promo_video": false,
              "is_public_chat_welcome_video": false,
              "is_shared_to_fb": false,
              "mashup_info": {
                "can_toggle_mashups_allowed": false,
                "has_been_mashed_up": true,
                "has_nonmimicable_additional_audio": false,
                "is_creator_requesting_mashup": false,
                "is_light_weight_check": true,
                "is_pivot_page_available": true,
                "mashup_type": null,
                "mashups_allowed": true,
                "non_privacy_filtered_mashups_media_count": 27,
                "original_media": null
              },
              "merchandising_pill_info": null,
              "music_info": null,
              "original_sound_info": {
                "allow_creator_to_rename": true,
                "audio_filter_infos": null,
                "audio_id": "36399572316354999",
                "audio_parts": [
                  "…"
                ],
                "audio_parts_by_filter": [
                  "…"

範例

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

API README

Instagram General Search (V2) API

Returns Instagram posts and reels that match a search keyword. Each item includes the caption, hashtags, comment count and audio details. Send a keyword and optionally a pagination_token to get the next page.

Use cases

  • Find reels and posts that use a topic keyword such as cat.
  • Collect the hashtags that creators attach to posts about a topic.
  • Rank posts for a keyword by comment_count to spot those with the most discussion.
  • Group results by clips_metadata.audio_type to see how many posts use original sounds.

Request

curl -X POST "https://api.sandbase.ai/v1/api/instagram/v2/general-search" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword": "cat"}'

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

Parameters

NameTypeRequiredDescription
keywordstringYesSearch keyword
pagination_tokenstringNoPagination token from previous response

Example response

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

{
  "data": {
    "count": 8,
    "items": [
      {
        "ai_interactive_embodiment_attachment_style_info": null,
        "ai_label_info": null,
        "are_remixes_crosspostable": true,
        "attribution": null,
        "audience": null,
        "audio": null,
        "autodub_status": null,
        "basel_encoding_timeout": null,
        "boost_unavailable_identifier": null,
        "boost_unavailable_reason": null,
        "boosted_by_sponsor": null,
        "boosted_post_id": null
      }
    ]
  },
  "pagination_token": "GU1VCxop…"
}

Response fields

FieldMeaning
data.countNumber of items in this page of results.
data.items[].codeShort post code for the item. Use it to identify the post on Instagram.
data.items[].caption.hashtagsList of hashtags in the post caption, each with a leading #.
data.items[].caption.created_at / data.items[].caption.created_at_utcCaption creation time as a Unix timestamp in seconds.
data.items[].caption.idID of the caption object.
data.items[].comment_countNumber of comments on the post.
data.items[].clips_metadata.audio_typeType of audio on the reel, for example original_sounds.
data.items[].clips_metadata.audio_canonical_idID of the audio track used in the reel.
data.items[].ai_label_info.subtitle_textLabel text shown for posts flagged as AI content. The field is null when no AI label exists.
pagination_tokenToken to pass as pagination_token to request the next page.

Notes

  • Set keyword to any search term. Only keyword is required.
  • To get the next page, repeat the call with the same keyword and the pagination_token from the previous response.
  • Many fields on each item are null when they do not apply to the post, such as carousel_media on a reel.
  • To search only reels, use Instagram Reels Search. To search accounts, use Instagram User Search (V2).

Pricing

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

探索更多

相關 APIs

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

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

問題

常見問題

我要如何使用 Instagram General Search (V2) API?

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

Instagram General Search (V2) API 的費用是多少?

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

Instagram General Search (V2) API 接受哪些參數?

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

Instagram General Search (V2) API 會回傳什麼?

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

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

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