Skip to content
On this page

Karaoke API

EndpointMethodDescription
karaoke:searchSongswebsocketKaraoke: search songs
karaoke:getSongUrlwebsocketKaraoke: get song url
karaoke:getSongByIdwebsocketKaraoke: get song by id

Karaoke: search songs

Method: websocket

Endpoint: karaoke:searchSongs

Request:

{
    "data": {
        "query": string
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "songs": [{
            "id": string  // song id in catalog
            "path": string  // song path in the bucket
            "extension": string  // song extension (-C,-D)
            "title": string
            "artist": string
            "writers": [ string ]
            "genres": [ string ]
            "decade": string
            "key": string  // tonic note (chord)
            "length": int  // length in seconds
            "barIntro": string
            "isrc": [ string ]
            "hfaSongCode": [ string ]
        }]
        "total": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Karaoke: get song url

Method: websocket

Endpoint: karaoke:getSongUrl

Request:

{
    "data": {
        "songId": string
        "mediaType": string  // one of: mp4/mp3
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "songUrl": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Karaoke: get song by id

Method: websocket

Endpoint: karaoke:getSongById

Request:

{
    "data": {
        "songId": string
        "mediaType": string  // one of: mp4/mp3
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "song": {
            "id": string  // song id in catalog
            "path": string  // song path in the bucket
            "extension": string  // song extension (-C,-D)
            "title": string
            "artist": string
            "writers": [ string ]
            "genres": [ string ]
            "decade": string
            "key": string  // tonic note (chord)
            "length": int  // length in seconds
            "barIntro": string
            "isrc": [ string ]
            "hfaSongCode": [ string ]
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}