# Check if cover art is available via MusicBrainz API

**URL:** https://community.metabrainz.org/t/check-if-cover-art-is-available-via-musicbrainz-api/582862
**Category:** MusicBrainz
**Tags:** cover-art, musicbrainz
**Created:** [April 28, 2022, 9:26am UTC](https://community.metabrainz.org/t/check-if-cover-art-is-available-via-musicbrainz-api/582862 "2022-04-28T09:26:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![fhe](https://community.metabrainz.org/user_avatar/community.metabrainz.org/fhe/32/12245_2.png) [@fhe](https://community.metabrainz.org/u/fhe)
#### Post date: [April 28, 2022, 9:26am UTC](https://community.metabrainz.org/t/check-if-cover-art-is-available-via-musicbrainz-api/582862/1 "2022-04-28T09:26:50Z")

</div>

Is there are way to check if cover art is available for a `release` MusicBrainz API search like

[https://musicbrainz.org/ws/2/release/?fmt=json&limit=50&query=release%3A"All+Melody"+AND+artist%3A"Nils+Frahm""](https://musicbrainz.org/ws/2/release/?fmt=json&limit=50&query=release%3A%22All+Melody%22+AND+artist%3A%22Nils+Frahm%22%22)

As far as I can see, I’d need to use the `/release/{mbid}/` endpoint of the Cover Art Archive API to determine the existence of cover art for each of the results.

* * *

When looking at the search results on the MusicBrainz website, I’m seeing the small cover art icon, suggesting the information might already be available more directly:

 ![MusicBrainz web search result](https://community.metabrainz.org/uploads/default/original/3X/6/4/643bbc5654ae0328000c8825ff6775f50a846c9a.png)

---

<div class="post-metadata">

### Author: ![InvisibleMan78](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/i/c67d28/32.png) [@InvisibleMan78](https://community.metabrainz.org/u/InvisibleMan78)
#### Post date: [April 28, 2022, 10:21pm UTC](https://community.metabrainz.org/t/check-if-cover-art-is-available-via-musicbrainz-api/582862/2 "2022-04-28T22:21:46Z")

</div>

I think, you can find the answer here:

> [@How to get/search cover image of track?](https://community.metabrainz.org/t/how-to-get-search-cover-image-of-track/337917/4):
>
> 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](https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2) and [Cover Art Archive API](https://musicbrainz.org/doc/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…

---

<div class="post-metadata">

### Author: ![draconx](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/d/c5a1d2/32.png) [@draconx](https://community.metabrainz.org/u/draconx)
#### Post date: [April 28, 2022, 11:26pm UTC](https://community.metabrainz.org/t/check-if-cover-art-is-available-via-musicbrainz-api/582862/3 "2022-04-28T23:26:58Z")

</div>

> [@InvisibleMan78](#):
>
> I think, you can find the answer here:

I think OP is trying to avoid making separate requests to the Cover Art Archive API for each release in the results. If CAA has the same 1-request-per-second bulk limit as the MB API, it could take almost a minute to query 50 releases.

---

<div class="post-metadata">

### Author: ![fhe](https://community.metabrainz.org/user_avatar/community.metabrainz.org/fhe/32/12245_2.png) [@fhe](https://community.metabrainz.org/u/fhe)
#### Post date: [April 29, 2022, 5:58am UTC](https://community.metabrainz.org/t/check-if-cover-art-is-available-via-musicbrainz-api/582862/4 "2022-04-29T05:58:08Z")

</div>

> [@draconx](#):
>
> I think OP is trying to avoid making separate requests to the Cover Art Archive API for each release in the results.

Yes, that’s my intention. It’s no problem to query the CAA for each of the releases, there is also [no rate-limit in place at the moment](https://musicbrainz.org/doc/Cover_Art_Archive/API#Rate_limiting_rules). I wanted to reduce traffic to the necessary minimum (and prevent 404s) and was just curious if there is a way to omit unnecessary calls to the Cover Art Archive API.

I’ve since checked with the MB server implementation and found the `cover_art_presence` flag, indicating that this information is available internally. It’s also provided if a request for an actual release is made but not for the `query` **search** result.

There is also a related ticket:

> <https://tickets.metabrainz.org/browse/SEARCH-223>

* * *

As background information, I want to display a cover art thumbnail on searches, so that choosing the correct search result becomes a little bit easier:

![Cover Preview](https://community.metabrainz.org/uploads/default/original/3X/4/d/4d96e17d1a7155f2a1813d1a2d4f9dcab085bb9f.gif)

---

<div class="post-metadata">

### Author: ![outsidecontext](https://community.metabrainz.org/user_avatar/community.metabrainz.org/outsidecontext/32/90_2.png) [@outsidecontext](https://community.metabrainz.org/u/outsidecontext)
#### Post date: [April 29, 2022, 6:03am UTC](https://community.metabrainz.org/t/check-if-cover-art-is-available-via-musicbrainz-api/582862/5 "2022-04-29T06:03:42Z")

</div>

The MB web service indicates on a release query if there is cover art available or not when requesting individual releases (not on search queries). The response for a single release will contain something like this:

```json
{
  "cover-art-archive": {
    "artwork": true,
    "count": 11,
    "back":true,
    "front":true,
    "darkened":false
  }
}

```

`artwork` indicates whether there is cover art or not. Compare these two requests with and without cover art:

[https://musicbrainz.org/ws/2/release/22e4c1d6-ded1-40a9-8027-4dfe4935ce4b?fmt=json](https://musicbrainz.org/ws/2/release/22e4c1d6-ded1-40a9-8027-4dfe4935ce4b?fmt=json)  
[https://musicbrainz.org/ws/2/release/4805ebce-9726-3dfe-9edc-76e2bb27465e?fmt=json](https://musicbrainz.org/ws/2/release/4805ebce-9726-3dfe-9edc-76e2bb27465e?fmt=json)

I think `darkened` indicates that the cover art had to be disabled on the CAA due to copyright complaints, and hence effectively is not available. But I’m not sure about the details.

> [@draconx](#):
>
> If CAA has the same 1-request-per-second bulk limit as the MB API, it could take almost a minute to query 50 releases.

CAA doesn’t have this rate limit.

---

<div class="post-metadata">

### Author: ![fhe](https://community.metabrainz.org/user_avatar/community.metabrainz.org/fhe/32/12245_2.png) [@fhe](https://community.metabrainz.org/u/fhe)
#### Post date: [May 1, 2022, 12:17pm UTC](https://community.metabrainz.org/t/check-if-cover-art-is-available-via-musicbrainz-api/582862/6 "2022-05-01T12:17:57Z")

</div>

Thank you for the answer. I’m aware of the details provided when querying a single release, my question was regarding a list of releases (as indicated in the OT).

I guess the answer to my question is NO then, and given the linked ticket had not gained any traction over the years, it’s probably also not a widely requested feature.
