How to get/search cover image of track?


I want to get the cover image of track. How can i do that? Can anybody give an example?


Can you give us the MusicBrainz-URL for your track, like

Let me describe what i want to achieve…

-> user can search track cover image by name and it should return list of images from which user can select correct track image .

I did’t get what do you mean by ‘MusicBrainz-URL’?

First thing to note is that MusicBrainz does not store images per track, but per release. Is that what you want?

Also it is not clear what exactly you are doing. Are you developing some software, and in that software the user can search for a track name and get the corresponding album artwork?

If that’s the use case you can use the MusicBrainz API and Cover Art Archive API for this.

The basic idea would be that you search for a recording with the entered name and include all releases with the result, like this for “Paint it Black”:"Paint%20It%20Black"%20AND%20status:official%20AND%20primarytype:album&inc=releases

There might be more than one recording, so you will have to look at several for the best match for your use case. A recording will also be often on multiple releases, so you have to filter the releases as well. Maybe you want to focus on primarytype “album” and secondarytype not set at all. If there is not primarytype “album”, fall back to “single” or “ep”. Maybe sort by release date, so you get the earliest available one. You can also display the user multiple results.

Once you have a release ID you can query the Cover Art Service:

Not every release will have cover art of course.


@outsidecontext i need help here please with how to get a dexcription of the artist from wikidata by mapping MBID and Wikipedia-identifier throught MusicBrainz API

If you have the MBID of an artist you can query the artist’s URL relationships by including the url-rels inc parameter, e.g.:

This will include the wikidata identifier in the relations list with target-type set to “url” and type set to “wikidata”, in this case

    "source-credit": "",
    "ended": false,
    "attributes": [],
    "end": null,
    "begin": null,
    "attribute-values": {},
    "target-credit": "",
    "type": "wikidata",
    "attribute-ids": {},
    "url": {
        "id": "1781c847-6f5e-4731-a61a-fa3b4f84a0de",
        "resource": ""
    "type-id": "689870a4-a1e4-4912-b17f-7b2664215698",
    "target-type": "url",
    "direction": "forward"

You can use the Wikidata identifier (Q750593) to query details about the artist from Wikidata API. I don’t know the Wikidata API very well, but would give you links to the Wikipedia entry.

1 Like

Thanks, in my case i use js as front end and Node js as backend,
i want when the user make a get request to /api/${queryByArtistMBID} from client to server, then the server makes fetch API to this base_url by doing following: , once data is being fetched then how to fetch and query the artist’s details from wikidata, DO i need to make another fetch api request to this wikidata url by passing Wikidata identifier ( Q750593 ) ? has every artist it’s own wikidata identifier or just same for all artist when making fetching details from wikidata for specifik artist ?

here is what i see in some task but i don’t understand how this is configured to get details of the specifik artist that a user requsted

In my case i just need to get two thing when the user make a request to this api by passing MBID:
1- A detailsof the artist downloaded from Wikipedia.
2- A list of all albums released by that artist and links to images for each album, The list of albums is in MusicBrainz but the pictures are on the Cover Art Archive

this docs is what i got so far but not yet understood really .

your help is very appreciated

You will need to make as many fetch calls as you need to get the information you want.
You need to look at what information you have and what information you can request.

So if you start from a recording id in musicbrainz what could you get?

  • Lookup the recording id in musicbrainz, what is it’s name, who are the artists, what releases contain this recording?
  • Look at each artist on the artist, what albums do they have? do they have a wikidata page? Is this an artist or a group and do we know the members of the group?
  • Look up the wikidata page, does it link to an English Wikipedia page? Can I get the first paragraph of that page? is there an image on wikimedia commons?

You will most likely need to make a whole bunch of queries to get each piece of information with each query adding just a little more information to the whole.
Each query might return 0 or many results so you need to work out what you want to do at each stage.
Not every artist has a wikidata / wikipedia page for example and there can be many artists that sing on the one song so do you look at just the first one listed or everyone?

This can be something you can design using a pen and paper to describe what you want and what steps you need to piece together to collect that.
Query this service, get a list of results, Look for results that meet this criteria call next service using this id etc.


@dns_server @outsidecontext thanks guys, just to understand little bit what is going on here, i share my firtst fetch api call server code using Node js and i’m fetching artist ,this is what i get back from the server
i can’t see any artist property inside this data, so how to make another fetch call to wikidata to get the details of that artist by passing Q750593 ) along with the artist id ?

@outsidecontext Thank you, let’s say we have the artist MBID and we call this api by passing that artist MBID, THis gives a data included that wikidata identifier to make another call to wikidata by using Wikidata identifier ( Q750593 ) to query details about the artist from Wikidata API,
Is this Wikidata identifier ( Q750593 ) same all time regardless artist when making request ?

should i not pass along with that specifik artist’s id when making another request to wikidata, see here without artist’s id how would i get the details of that artist though ?

No. The Wikidata identifier is different for each artist.

I don’t know the Wikidata API very well, you’ll need to consult their documentation for details.

The link I posted above ( gives as far as I can tell all the data for the artist with the Wiki data ID Q750593. As you are interested in the biographie from Wikipedia, Wikidata will not directly give you that. But Wikidata will give you the links to Wikipedia for various languages. You’ll need to query Wikipedia separately for the text content. I personally don’t know how to do this, though.


@rdswift so i don’t see any type of wikidata identifier like this ( Q750593 ) attached to the tha data i get back from the url call , here is the relations list. can you point the wikidata identifier from this block

“source-credit”: “”,
“ended”: false,
“attributes”: [],
“end”: null,
“begin”: null,
“attribute-values”: {},
“target-credit”: “”,
“type”: “wikidata”,
“attribute-ids”: {},
“url”: {
“id”: “1781c847-6f5e-4731-a61a-fa3b4f84a0de”,
“resource”: “
“type-id”: “689870a4-a1e4-4912-b17f-7b2664215698”,
“target-type”: “url”,
“direction”: “forward”

As I wrote in a post above you need to add the inc=url-rels parameter to your API call. See my earlier post for details.

I don’t know how to pass Inc parameters when using the node library, but their documentation should help.

1 Like

The last part of the resource string is the Wikidata identifier.

1 Like

thanks, if i need to acces image of an album throught what query to pass into this url ? i tried this and it works fine and gives back image of the album

but if i change the mbid to another exist album with id e.g that doesn’t give me any image

The reason is that your second request is passing the MBID for the release group rather than the release.

I think the correct url endpoint is
and the mbid is coming after release-group/
that works for me but i don’t if it’s the correct way to do it

I believe that’s the correct way to do it if you’re looking up by release group rather than by release.

@rdswift thank you so much, yeah i think so too, in other words ‘release-group’ means all the albums for a single artist right ?
I need to display all the albums that was released by a specific artist with with specific mbid,