English
English
Appearance
English
English
Appearance
https://api.repliz.com/public/addon/instagram/audioSearches the music and original sounds that can go on a scheduled Instagram Reel. The account needs Music & Research turned on with Authorize Instagram Music & Research and Connect Instagram Music & Research. Put the id you pick in additionalInfo.music of Create Schedule, see Music Object.
Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Replizaddon:read (or addon:write)| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | ID of an Instagram account with Music & Research turned on, the _id from Get Account. |
type | string | No | music for licensed tracks, or original_sound for sounds made by Instagram accounts. Default music. Any other value is 400. |
search | string | No | Title or artist to search for, up to 100 characters. Left out or empty, Instagram returns trending audio. |
nextToken | string | No | The nextToken of the previous response, for the next page. |
curl -X GET "https://api.repliz.com/public/addon/instagram/audio?accountId=680affa5ce12f2f72916f67e&type=music&search=tulus" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"import axios from 'axios';
const response = await axios.get('https://api.repliz.com/public/addon/instagram/audio', {
params: {
accountId: '680affa5ce12f2f72916f67e',
type: 'music',
search: 'tulus',
},
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
});
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const response = await fetch(
'https://api.repliz.com/public/addon/instagram/audio?accountId=680affa5ce12f2f72916f67e&type=music&search=tulus',
{
headers: {
Authorization: `Basic ${credentials}`,
},
},
);
const data = await response.json();
console.log(data);{
"docs": [
{
"id": "1234567890123456",
"type": "music",
"artist": "Tulus",
"name": "Hati-Hati di Jalan",
"thumbnail": "https://scontent.cdninstagram.com/v/t39.30808-6/cover.jpg",
"duration": 30,
"url": "https://scontent.cdninstagram.com/v/t39.12345-6/audio.m4a",
"link": "https://www.instagram.com/reels/audio/1234567890123456/"
}
],
"nextToken": ""
}{
"code": 400,
"message": "turn on music and research for this instagram account first"
}{
"code": 404,
"message": "account not found"
}{
"code": 401,
"message": "unauthorized"
}| Field | Description |
|---|---|
docs[]. | Instagram audio ID. Send it as additionalInfo.music.id. |
docs[]. | music or original_sound, the type you asked for. |
docs[]. | Artist of a track, or the username of the account that made an original sound. |
docs[]. | Title of the audio. |
docs[]. | Cover image URL, or the profile picture of the account for an original sound. Empty when there's none. |
docs[]. | Length in seconds. |
docs[]. | File to preview the audio. Empty when Instagram doesn't send one. |
docs[]. | The audio page on Instagram. Empty when Instagram doesn't send one. |
nextToken | Cursor for the next page. Only trending audio has more pages, so a search always returns "". |
Instagram only returns audio licensed for third-party apps, so the list is shorter than the one in the Instagram app. 400 with turn on music and research for this instagram account first means the account doesn't have Music & Research yet, and invalid account type means accountId isn't an Instagram account. An error from Instagram, for example after the user removed Repliz from their business portfolio, comes back with the status and message from Instagram. Connect Music & Research again to fix it.