跳转到主要内容
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.

Header Parameters

Query Parameters

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

查询单个曲目