Get all tracks
This endpoint retrieves information of all the tracks on the music library filtered by the query parameters.
Requirements
Authentication
Scope
Query parameters
These are the basic query params for filter tracks.
typeId
string
The type of music of the track, you can see the available options with the Get Tracks types endpoint
The type of music of the track, you can see the available options with the Get Tracks types endpoint
subtypeId
string
The subtype of music of the track, you can see the available options with the Get Tracks sub types endpoint
The subtype of music of the track, you can see the available options with the Get Tracks sub types endpoint
Request example
- Console
- JavaScript
- Python
- PHP - CURL
curl --request GET \
--url https://api.bunnystudio.com/tracks?typeId=mood&subtypeId=casual \
--header "x-access-token: YOUR_TOKEN" \
const queryParams = new URLSearchParams({
typeId: "mood",
subtypeId: "casual",
});
const url = 'https://api.bunnystudio.com/tracks + queryString.toString()';
const options = {
method: 'GET',
headers: {
'x-access-token': 'YOUR_TOKEN',
}
};
fetch(url, options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import requests
import json
api_url = "https://api.bunnystudio.com/tracks?typeId=mood&subtypeId=casual"
headers = {
'x-access-token': 'YOUR_TOKEN',
}
response = requests.get(api_url, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.bunnystudio.com/tracks?typeId=mood&subtypeId=casual',
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-access-token': 'YOUR_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response format
id
number
A number that identifies the track on Bunny Studio's database.
A number that identifies the track on Bunny Studio's database.
fileName
string
The name of the file
The name of the file
type
string
The type of music of the track
The type of music of the track
typeLabel
string
The name of the type of music of the track
The name of the type of music of the track
subType
string
The sub type of music of the track
The sub type of music of the track
subTypeLabel
string
The sub type of music of the track
The sub type of music of the track
url
object
The URLs of the track, always a .wav and .mp3
The URLs of the track, always a .wav and .mp3
Response example
[
{
"id": 20,
"fileName": "Casual1",
"type": "mood",
"typeLabel": "mood",
"subType": "casual",
"subTypeLabel": "casual",
"url": {
"wav": "https://.../..../Casual1.wav",
"mp3": "https://.../....//Casual1.mp3",
},
}
...
]