Querying images

GET /20151208/images/[source specific]

All image lookups are rooted at the /images/ path. Clients replace [source specific] with the query data specific to the image they are looking for.

Mandatory parameters for all queries

All queries must contain the following:

user_key
Your API key.

Discogs images

There are two types of Discogs image lookups. The first is using the Discogs image ID, the second allows an "indexed" lookup, returning the nth image.

Discogs image lookups by ID

A Discogs image lookup, using the image ID, is of the form:

GET /20151208/images/discogs/[discogs release id]/[discogs image id]

This returns the specified image from Discogs, from our image cache if possible. If the images doesn't exist, returns a HTTP 404 error code.

A Discogs image URL is of the form:

http://api-img.discogs.com/[authenticated key]/[preamble]/discogs-images/R-3562757-1342008581-3467.jpeg.jpg

That is:

http://api-img.discogs.com/[authenticated key]/[preamble]/discogs-images/R-[discogs release id]-[discogs image id].jpeg.jpg

The values can be plugged into the OneMusicAPI URL. For image URLs which have a two-part image ID, separated by a hyphen, e.g.:

http://api-img.discogs.com/[authenticated key]/[preamble]/discogs-images/R-1144968-1336707466-6400.jpeg.jpg

Use both parts, including the hypen, as the Discogs image ID.

Discogs image lookups by index

The nth image for a given release can be returned using an index integer. /1 is reserved for the primary image for a Discogs release. If there is no primary image, the first secondary image is returned. There are no guarantees made about the order in which images are returned.

Examples

/20151208/images/discogs/1144968/1225188125

Retrieves the primary image for Elastica by Elastica.

/20151208/images/discogs/1144968/1

Retrieves the first image for Elastica by Elastica, which is a "primary" image.

MusicBrainz images

MusicBrainz image lookups are of the form:

GET /20151208/images/musicbrainz/[MusicBrainz Identifier]/[image index]

This returns the nth image (as denoted by the image index) for the MusicBrainz release identified by the MusicBrainz Identifier. If there is no image for this release, or the release doesn't exist, returns a HTTP 404 error code.

Examples

/20151208/images/musicbrainz/b627dd57-415c-4d77-91bb-bfe52b1e9990/1

Retrieves the first image for Now Dance 98.

comments powered by Disqus
© 2012-2018 elsten software limited, Unit 4934, PO Box 6945, London, W1A 6US, UK | terms and conditions | privacy policy