Instagram

Search Instagram Audio

Searches Instagram's audio catalog as the account. Without q it returns trending audio. Needs an Instagram account connected with loginMethod facebook_login.

GET
/v1/accounts/{id}/audio

Authorization

Bearer
headerAuthorizationBearer <op_>

Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.

Path Parameters

id*string
Length1 <= length

Query Parameters

q?string

Search text.

Length1 <= length <= 200
type?string

Type of audio. Defaults to music.

Value in"music""original_sound"
limit?integer

Items per page. Defaults to 20. Maximum 20.

Range1 <= value <= 20
Default20

Response Body

Audio tracks

application/json
  1. response
data*array<>
Example Request
import { Configuration, AccountsApi } from "@onepostly/sdk";const accountsApi = new AccountsApi(  new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await accountsApi.searchAccountAudio({  id: "acc_YOUR_INSTAGRAM_ACCOUNT_ID",  q: "summer",});console.log(response);
Example Response
{  "data": [    {      "id": "587784541076604",      "title": "Summer Nights",      "artist": "Lena Hart",      "coverUrl": "https://scontent.xx.fbcdn.net/v/t39.30808-6/summer-nights.jpg",      "previewUrl": "https://video.xx.fbcdn.net/v/t42.1790-2/summer-nights.m4a",      "durationSec": 168    },    {      "id": "1043529871264118",      "title": "Summer Drive",      "artist": "The Coastliners",      "coverUrl": "https://scontent.xx.fbcdn.net/v/t39.30808-6/summer-drive.jpg",      "previewUrl": "https://video.xx.fbcdn.net/v/t42.1790-2/summer-drive.m4a",      "durationSec": 201    },    {      "id": "829104563378215",      "title": "Endless Summer",      "artist": "Mira Sol",      "coverUrl": "https://scontent.xx.fbcdn.net/v/t39.30808-6/endless-summer.jpg",      "previewUrl": "https://video.xx.fbcdn.net/v/t42.1790-2/endless-summer.m4a",      "durationSec": 145    }  ]}