Feedback API question


About the get-feedback endpoint ListenBrainz API — ListenBrainz 0.1.0 documentation

Do you know if it is planned to always sort by score and submission timestamp?
I am writing a loves/hates synchronizer and I would like to make sure I can assume it will be always sorted like it seems to be now (specially sort by timestamp)


1 Like


The current implementation does sort by timestamp in descending order. I am not sure if its an implementation detail or intended to be always returned in a sorted manner. I’ll ask other devs to confirm this and update documentation accordingly.

Also, the feedback api docs are currently outdated. I am not sure if that is useful to you or not but we are now able to return much richer metadata with a feedback item if available.

Thanks for you answer! Do you know how to get these richer metadata?

But actually I am quite confused.
What is the difference between:
GET /1/recommendation/feedback/user/ (user_name )
GET /1/feedback/user/ (user_name )/get-feedback

The latter one seems to work only with recording_msid? And I still don’t figure out how to get a recording_msid for a given recording_mbid?

Edit : the love/hate feature on the web interface seems to use /1/feedback/. Changes made thanks to /1/recommendation/feedback do not appear on the web interface.

Can some LB dev help me on this? @lucifer maybe?


Sorry for the delay.

GET /1/recommendation/feedback/user/(*user_name*) is used for providing feedback on recommendations LB generates. This is not the same as loving/hating a track. We have not sketched out all the details yet so it remains to be seen how this feedback will interact with normal feedback.

GET /1/feedback/user/(user_name )/get-feedback is the one that is used for loving/hating a track. Its not possible to get recording msid from a recording mbid. We don’t have an endpoint to expose that but also msid to mbid is a many to one relation. The recording msid generated for a listen by LB is included in the payload returned by `GET 1/user/(user_name)/listens. Eg:

     count: 1,
     latest_listen_ts: 1641490465,
            inserted_at: "Thu, 06 Jan 2022 20:42:36 GMT",
            listened_at: 1641490465,
            recording_msid: "987257dc-e539-46da-8942-68484cc9d444",
            track_metadata: {...},
            user_name: "amCap1712"
     user_id: "amCap1712"

We are working on adding support to give track feedback using recording mbids. There are still a few issues to be ironed out but you can track for progress updates.

Regarding the richer metdata, you can pass the metadata=true query param i.e. GET 1/feedback/user/amCap1712/get-feedback?metadata=true. And the resulting payload will include commonly useful track metadata fields.


Thanks for your answer :slight_smile:
Can’t wait for the feature to be released! Do you have an ETA on this?

Unforntunately, we don’t have an ETA on this. There are some backward compat and design concerns here but it is certainly a high priority for us because it makes it easier for people outside LB to integrate this feature in their apps.

The PR is now deployed. The frontend support to display such feedback on LB webite is currently in the works though.