Roon API: How to uniquely identify an album and access album metadata?

Hi folks,

I’m new to roon, so please bear with me. I’m currently tinkering with the API and there’s a few things I cannot seem to figure out. This is rather basic stuff, so I’m probably just missing something obvious.

How can I uniquely identify an album? I can use the browse API to traverse down the path, but the IDs I get along the way are all ephemeral, and the paths are not necessarily unique or stable as far as I can tell. For example, the Library/Album/Albumname path could change it’s result if the user adds another edition of the album to his library. I am building a homemade TonyBox thing where my kids can put figurines with RFID tags on a box to play music via roon, and I’d like to uniquely associate a Tag with an Album ID. Even if I have that ID, I wouldn’t know how to tell roon how to play an album by unique ID.

How do I access album metadata? From an album. I’d like to retrieve the album artist, catalogue number, publisher, original release date, etc. How do I do this via the API?

Edit: How do I tell local albums from tidal albums? I cannot figure out how to find out whether an album is in my local library or on tidal. Does that come with the metadata (see above) or do i need to do something specific?

Many thanks!

Hi Keno,

You are not missing something obvious. The Roon API is frustratingly extremely limited if you’re used to a more REST-style API like JRiver. To answer specific questions, I believe Album artist is part of the data retrieved for an album instance, but there is no way to access any of the other metadata you’re requesting, associate permanent IDs to albums, tracks, artists, etc, or tell local from streaming.

Maybe part of the new efforts under Harman ownership will include a major API overhaul, which as far as I can tell hasn’t had any attention paid since it’s initial release in 2017.

2 Likes

Oh wow, that is surprising given the thought that went into the graph based data model. I do indeed come from JRiver, and the API has been one of my favorite things about it. I’m mainly looking for something with a better app and better multiroom support. Maybe I’ll hold off a purchase for a little while longer then. Has something been said about the API in conjunction with the acquisition? From what I gather from the discussions, the support is not very responsive around here, but I’ll try to ask in the support forums. Thank you for you insight, Bob!

@ScottB has nailed the answers.

Just to say that quite a few people use my home assistant integration to play albums & playlists,

I ended up dealing with the lack of a unique id by using a path. It has stability issues you mention - although it seems like it generally works fairly well in most cases.

The only other thing I can add is to think about the quoting.

HA example here:

Thank you, Greg! The example is very helpful. I’m not a native speaker, and I don’t really follow your last sentence: What do you mean by quoting? Thanks for your time.

One thing I should add: much of the metadata you’re looking for is indeed available through Roon’s Excel export functionality. Select items in views of Albums, Tracks, etc by right clicking on them. You can select all using the drop down arrow at the top of the view. Then click on the 3 dots and pick “Export”.

Of course this doesn’t exactly cover the use cases you’re interested in, but it is a back door way to get more data out of Roon.

1 Like

Thank you, Scott, that is good to know.

In HA I use a single string to specify delimited by

So “Library/Artists/Neil Young/Harvest”

Some roon identifiers can include the “/“ character - so ideally you need to allow the user to quote them.

Eg “Library/Genres/‘Pop/Rock’”

I’m using Python and cheat using the csv library that already handles quoting.

1 Like

Hey everyone, I’m just reading about the new roon changes and wanted to add my voice to this thread.

@vova with the new changes and interest in making playlists more useful, are there any plans to expand the Roon API? Particularly around metadata and playlists?

I’ve been meaning to build two-way Spotify playlist sync using the Roon API for a long time and have experienced similar frustrations as the users in this thread.

1 Like