跳轉到主要內容
GET
搜尋 Instagram 音訊
以關鍵字搜尋 Instagram 的音訊目錄。將回傳的 audioId 搭配 instagramOptions.audioConfiguration 使用,即可在發布 Reel 時附加該曲目。
Requires Instagram linked through Facebook Login. Instagram's Audio API is only available to accounts connected via Facebook Login, which needs a Facebook Page connected to the Instagram account. Accounts connected with Instagram Login (the Ayrshare default) cannot search, look up, or attach audio, and every audio request returns code: 514.

This is a Meta restriction, not an Ayrshare one. Meta's documentation states the Audio API "is only available on the Instagram API with Facebook Login. It is not supported on the Instagram API with Instagram Login." No permission or plan upgrade changes it.

Three things are required:
1. An Instagram Business or Creator account
2. A Facebook Page connected to that Instagram account
3. Instagram linked to Ayrshare with Instagram Login disabled, so the Facebook Login flow is used

See the step-by-step setup guide.

標頭參數

查詢參數

string
必填
要搜尋的關鍵字,例如藝人或曲目名稱。空值或僅含空白字元的值會回傳 code: 101。
string
預設值:"music"
要搜尋的目錄。music 代表授權的商業曲目,original_sound 代表取自 其他創作者 Reels 的音訊。其他任何值會回傳 code: 101。
integer
要回傳的曲目數量上限,介於 1 到 100 之間。非整數或超出範圍的值會回傳 code: 101。省略時,套用 Instagram 自身的預設值。

回應欄位

Instagram 不會為每首曲目回傳所有欄位,因此除 audioId 以外的所有曲目欄位都應視為選填。
string
搜尋完成時為 success。即使目錄中沒有符合項目,仍屬於成功。
string
所搜尋的關鍵字,原樣回傳。
array
符合的曲目。空陣列代表搜尋已執行但沒有任何符合項目。

錯誤

錯誤碼 514 到 518 的說明請參閱 Instagram Reels 音訊錯誤;其餘錯誤碼請參閱 Ayrshare 錯誤參考。

後續步驟

將曲目附加到 Reel

查詢單一曲目