Accept a Listenbrainz Scrobble (Standard)
POST
/1/submit-listens
const url = 'https://example.com/1/submit-listens';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"listen_type":"single","payload":[{"listened_at":1,"track_metadata":{"artist_name":"example","track_name":"example","release_name":"example","additional_info":{"artist_mbids":["example"],"release_mbid":"example","release_group_mbid":"example","recording_mbid":"example","submission_client":"example","submission_client_version":"example","spotify_id":"example","isrc":"example","media_player":"example","media_player_version":"example","music_service":"example","music_service_name":"example","origin_url":"example","tags":["example"],"duration":1,"duration_ms":1,"duration_played":1,"track_mbid":"example","work_mbids":["example"],"release_artist_name":"example","release_artist_names":["example"],"spotify_album_id":"example","spotify_album_artist_ids":["example"],"spotify_artist_ids":["example"],"artist_names":["example"],"albumartist":"example","tracknumber":1,"position_ms":1},"mbid_mapping":{"recording_name":"example","artist_mbids":["example"],"artists":[{"artist_credit_name":"example","artist_mbid":"example","join_phrase":"example"}],"caa_id":1,"caa_release_mbid":"example","recording_mbid":"example","release_mbid":"example"}}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/1/submit-listens \ --header 'Content-Type: application/json' \ --data '{ "listen_type": "single", "payload": [ { "listened_at": 1, "track_metadata": { "artist_name": "example", "track_name": "example", "release_name": "example", "additional_info": { "artist_mbids": [ "example" ], "release_mbid": "example", "release_group_mbid": "example", "recording_mbid": "example", "submission_client": "example", "submission_client_version": "example", "spotify_id": "example", "isrc": "example", "media_player": "example", "media_player_version": "example", "music_service": "example", "music_service_name": "example", "origin_url": "example", "tags": [ "example" ], "duration": 1, "duration_ms": 1, "duration_played": 1, "track_mbid": "example", "work_mbids": [ "example" ], "release_artist_name": "example", "release_artist_names": [ "example" ], "spotify_album_id": "example", "spotify_album_artist_ids": [ "example" ], "spotify_artist_ids": [ "example" ], "artist_names": [ "example" ], "albumartist": "example", "tracknumber": 1, "position_ms": 1 }, "mbid_mapping": { "recording_name": "example", "artist_mbids": [ "example" ], "artists": [ { "artist_credit_name": "example", "artist_mbid": "example", "join_phrase": "example" } ], "caa_id": 1, "caa_release_mbid": "example", "recording_mbid": "example", "release_mbid": "example" } } } ] }'Accepts the standard Listenbrainz submit-listens payload at this endpoint.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
listen_type
required
string
payload
required
Array<object>
object
listened_at
number
track_metadata
required
object
artist_name
required
string
track_name
required
string
release_name
string
additional_info
object
artist_mbids
Array<string>
release_mbid
string
release_group_mbid
string
recording_mbid
string
submission_client
string
submission_client_version
string
spotify_id
string
isrc
string
media_player
string
media_player_version
string
music_service
string
music_service_name
string
origin_url
string
tags
Array<string>
duration
number
duration_ms
number
duration_played
number
track_mbid
string
work_mbids
Array<string>
release_artist_name
string
release_artist_names
Array<string>
spotify_album_id
string
spotify_album_artist_ids
Array<string>
spotify_artist_ids
Array<string>
artist_names
Array<string>
albumartist
string
tracknumber
number
position_ms
The millisecond position of the Player reporting Now Playing information.
(Currently) custom field not officially supported by LZ. Name is subject to change if/when standardized.
number
mbid_mapping
object
recording_name
string
artist_mbids
Array<string>
artists
Array<object>
object
artist_credit_name
required
string
artist_mbid
required
string
join_phrase
required
string
caa_id
number
caa_release_mbid
string
recording_mbid
string
release_mbid
string
Responses
Section titled “Responses”Success