Retrieve a list of supported Genres, Moods and Vocals
December 2, 2024
Table of contents
https://api.useapi.net/v1/mureka/music/moods-and-genres/?…
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
API tokenis required, see Setup useapi.net for details.
Query Parameters
accountis optional when only one account configured. However, if you have multiple accounts configured, this parameter becomes required.
Responses
-
{ "genres": [ { "tag": "pop", "cover": "cos-prod/res/image/[email protected]" }, { "tag": "<genre 2>", "cover": "<cover image 1>" }, { "tag": "<genre NN>", "cover": "<cover image NN>" } ], "moods": [ { "tag": "relaxed" }, { "tag": "<mood 2>" }, { "tag": "<mood NN>" } ], "vocals": [ { "tag": "female vocal" }, { "tag": "male vocal" } ] } -
{ "error": "<Error message>", "code": 400 } -
{ "error": "Unauthorized", "code": 401 }
Model
{ // TypeScript, all fields are optional
genres: { tag: string, cover?: string }[]
moods: { tag: string }[]
vocals: { tag: string }[]
}
Examples
-
curl "https://api.useapi.net/v1/mureka/music/moods-and-genres/?account=account" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" -
const token = "API token"; const account = "Previously configured account"; const apiUrl = `https://api.useapi.net/v1/mureka/music/moods-and-genres/?account=${account}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); -
import requests token = "API token" account = "Previously configured account" apiUrl = f"https://api.useapi.net/v1/mureka/music/moods-and-genres/?account={account}" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json())