API Announcement

  • 6
  • Announcement
  • Updated 5 days ago
We’ve made changes to our API in order to limit abuse and improve the service for everyone, in line with our API Terms of Use

While we allow API users to have access to a lot of data through the API, it has always been against our API Terms of Use for third parties to use audio, audiovisual, images or artwork. In some instances, some data may have been indirectly accessible through a small number of API calls, and so as part of the recent API clean-up, we have corrected that anomaly.

If your application is affected, please refer to our API Terms of Use to ensure your compliance.
Photo of LAST.HQ

LAST.HQ, Your Music Universe

  • 40 Posts
  • 3 Reply Likes

Posted 4 months ago

  • 6
Photo of Ishwara Coello

Ishwara Coello

  • 2 Posts
  • 5 Reply Likes
big oof
Photo of omega1

omega1

  • 3 Posts
  • 10 Reply Likes
Is this why we're getting a 'star' image?
Photo of Enrico Lamperti

Enrico Lamperti

  • 26 Posts
  • 26 Reply Likes
Yes
Photo of Andrea Turco

Andrea Turco

  • 3 Posts
  • 1 Reply Like
same problem here retrieving the image of artist always response from api with the image of a star: https://lastfm-img2.akamaized.net/i/u/34s/2a96cbd8b46e442fc41c2b86b821562f.png 
 will be fixed?
Photo of Conan Smith

Conan Smith

  • 2 Posts
  • 1 Reply Like
This site is going down the shitter
Photo of Satish Rajak

Satish Rajak

  • 1 Post
  • 0 Reply Likes
When the start image problem will be solved??
Photo of BlastFM Limited

BlastFM Limited

  • 10 Posts
  • 19 Reply Likes
We have an account and I have created new keys but no images are showing on our players, what the hell is going on?
Photo of Ishwara Coello

Ishwara Coello

  • 2 Posts
  • 5 Reply Likes
Basically they don't let you use the artist images anymore so you can no longer get them from their api :(
Photo of BlastFM Limited

BlastFM Limited

  • 10 Posts
  • 19 Reply Likes
If that is the case they have just made themselves redundant and lost a subscriber
Photo of BlastFM Limited

BlastFM Limited

  • 10 Posts
  • 19 Reply Likes
We are a fully licensed radio network and we use the images on our players, this has just broken all of our players, along with everyone else's. To quote: In some instances, some data may have been indirectly accessible through a small number of API calls. This is simply not true, people have been using this service for years and players have been developed around it, a small number of cases is actually billions or trillions of cases.
(Edited)
Photo of Aaron Hudspeth

Aaron Hudspeth

  • 6 Posts
  • 8 Reply Likes
Yeah, my site has been using these images for EIGHT YEARS. If it's such a problem, why wait until now?
Photo of Cristiano Oliveira

Cristiano Oliveira

  • 1 Post
  • 0 Reply Likes
You need to create rules, encourage the use of caches, and improve the API like any intelligent being and do not send stars saying that users abuse
Photo of Aaron Hudspeth

Aaron Hudspeth

  • 6 Posts
  • 9 Reply Likes
Seems to have broken my site as well, artist images no longer display. If album art follows suit, Tapmusic will be no more.
(Edited)
Photo of Aaron Hudspeth

Aaron Hudspeth

  • 6 Posts
  • 9 Reply Likes
So do I just have to remove the artist collage functionality from my site completely, or is there a change I can make within my site to get it working normally again?
Photo of cptchi

cptchi

  • 139 Posts
  • 200 Reply Likes
Maybe an announcement before you guys broke all these apps would have been nice. 
Photo of Tim Malseed

Tim Malseed

  • 1 Post
  • 8 Reply Likes
Incredibly unprofessional
Photo of Juan Francisco Guerrero Castillo

Juan Francisco Guerrero Castillo

  • 3 Posts
  • 2 Reply Likes
Musicbrainz api and itune api is a temporal solution
Photo of Lower Gets

Lower Gets

  • 24 Posts
  • 14 Reply Likes
Meeeh, images not the property of Last.fm
Anyway Last.fm should be open source..as its built by users
Photo of BritasticUK

BritasticUK

  • 79 Posts
  • 76 Reply Likes
Oh man, that's a real shame, a lot of the last.fm stats tools just look better with the images. Now they're just showing stars.
Photo of Ian McKenzie Anderson

Ian McKenzie Anderson

  • 9 Posts
  • 9 Reply Likes
Same here! I spent a long time writing JQuery and Ajax code for my two radio station websites utilising the last.fm API, and now it's all broken. I've also had last.fm links on the sites for the last 12 months, being seen by up to 8000 visitors a day! Do you people realise how much traffic you're going to lose when we all remove your API, link and button from our thousands of websites? I honestly think you've just shot yourself squarely in the foot!
Photo of Michael D'Angelo

Michael D'Angelo

  • 1 Post
  • 5 Reply Likes
This is ridiculous. Can we rate limit requests instead of losing images entirely? You've made it *slightly* harder to use images from last.fm at the cost of angering a lot of people. 
Photo of Ian McKenzie Anderson

Ian McKenzie Anderson

  • 9 Posts
  • 8 Reply Likes
I'm looking at changing over to the discogs API, but struggling because its Curl, and I've never tried to use Curl with JQuery before!
Photo of Andrea Turco

Andrea Turco

  • 3 Posts
  • 1 Reply Like
go with this if you have artist and track name 

?method=track.getInfo&artist=ARTIST&track=TRACK-NAME&api_key=APIKEY
Photo of Juan Francisco Guerrero Castillo

Juan Francisco Guerrero Castillo

  • 3 Posts
  • 2 Reply Likes
is the worst for last.fm, they will received multiples requests to get a simple image for an artist or a track image.
For example, you will need at least one call to obtain the track of the artist and the album to which it belongs, and another to the track information. the result 1 call versus 2 for track or author
Photo of Ian McKenzie Anderson

Ian McKenzie Anderson

  • 9 Posts
  • 8 Reply Likes
Thanks Andrea. I'll give it a try. Only issue I can foresee is that having to use the track name as well as the artist, it's one more tag which needs to be perfectly formatted to last.fm standards in every one of 15,000 tracks on my system! If only last.fm database search was more relaxed about things like "The Beatles" vs "Beatles, The" or "ft", "feat" and "Feat."!
(Edited)
Photo of BlastFM Limited

BlastFM Limited

  • 10 Posts
  • 18 Reply Likes
This is why it makes no sense. This would effectively double the number of requests made. I think it is better to go to another service, these people don't even notify their paying customers. If it was already in the terms of service as they say to not allow artist images to third parties then why did they develop their app to allow these calls in the first place. Also, the requests from all the radio station players etc are still being made, ok they aren't sending an image but it will be ages before the requests stop.
(Edited)
Photo of Thom

Thom

  • 6 Posts
  • 11 Reply Likes
So, just to get some official confirmation, will all the images from albums and artists no longer be accessible?

Also why is a change like this not announced upfront? You guys are breaking a lot of stuff, some kind of warning would be nice.
Photo of KatyLB

KatyLB, Moderator

  • 417 Posts
  • 326 Reply Likes
To quote Jon above, the change has already been deployed and no further changes are planned, so you shouldn't expect anything else from the API to change in the foreseeable future.
Photo of DenyPt

DenyPt

  • 2 Posts
  • 5 Reply Likes
Hi Katy, can we expect notice when breaking changes are made to the APIs in the future?

The lack of notice upfront here has pissed off a load of developers and that's the real issue here

The change itself doesn't really make much sense either tbf – why would the API expose URLs if nobody is actually allowed to use them?
Photo of cptchi

cptchi

  • 140 Posts
  • 202 Reply Likes
huh
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
This is absolutely ridiculous, all of your artist images have been uploaded by users and usually curated by developers. One of the reasons for lastfm retaining users has been developers building with that API. Now your saying that artist images are no longer available to developers. If this is the case please remove any images I have uploaded from your database. Absolutely ridiculous, i will be switching API calls to fanart.tv and removing all references to lastfm.
Photo of KatyLB

KatyLB, Moderator

  • 459 Posts
  • 381 Reply Likes
If this is the case please remove any images I have uploaded from your database.
If you actually want us to do this, you will need to provide your username.
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
Thank you for the reply. I've calmed down some and don't want to be petty. I've found a somewhat (very hacky) solution I'll post below.
Photo of Patrick

Patrick

  • 1316 Posts
  • 949 Reply Likes
It seems to be fairly explaining why most photos have disappeared in the past few days. What is next? As Thom said, you people are breaking a lot of stuff; some kind of warning would be nice.
Photo of KatyLB

KatyLB, Moderator

  • 459 Posts
  • 381 Reply Likes
What is next?
As Jon noted above: "The announced change has already been deployed, and was designed to ensure compliance with our API terms of service with as minimal disruption to app developers as possible.  My understanding is that there are no further changes planned, so you shouldn't expect anything else from the api to change in the foreseeable future."
(Edited)
Photo of BlastFM Limited

BlastFM Limited

  • 10 Posts
  • 19 Reply Likes
It doesn't matter about any more changes. You have already broken every player on the planet.
Photo of Juan Francisco Guerrero Castillo

Juan Francisco Guerrero Castillo

  • 3 Posts
  • 2 Reply Likes
musicbrainz api + itune api is a temporal solution
Photo of BlastFM Limited

BlastFM Limited

  • 10 Posts
  • 19 Reply Likes
What we are after is artist images for radio station players. They do not have album information in the stream for the most part and my understanding of it is that it is not possible to get them from a lot of sources. fanart.tv is one possible solution though.
(Edited)
Photo of lawrencenull

lawrencenull

  • 19 Posts
  • 23 Reply Likes
I've posted a solution below using a combination of lastfm and fanart.tv. If you need help implementing it let me know.
Photo of Ian McKenzie Anderson

Ian McKenzie Anderson

  • 9 Posts
  • 8 Reply Likes
Thanks!
Photo of Ian McKenzie Anderson

Ian McKenzie Anderson

  • 9 Posts
  • 9 Reply Likes
OK... We all seem to have established that we're going to get nowhere arguing the point with the LastFM mods, so lets see how we can move forward.

Several suggestions have been made for alternative sources for Artist Images for our various radio players: Musicbrainz/iTunes (Thanks to Juan Francisco Guerrero Castillo), fanart.tv (Thanks to lawrencenull and BlastFM Limited), and I've found API's for theaudiodb.com and discogs.com which may also work.

The problem, as I see it, is that many of us are broadcasters, not career web developers. LastFM has become such a "standard" that there are open source projects all over the internet which only required a copy/paste and a few tweaks. Whilst all of the alternative options may work for us, their API's are not always that easy to understand and follow. Many of them also require knowledge of things like Curl and OAuth which we simply don't have. So far I have failed to find any nice easy copy/paste/tweak solutions for any of the alternatives, and I've spent three days now collecting Auth codes and headscratching!

I wonder if someone here would be kind enough to post up a few code examples for other services, maybe in a GitHub project or similar, for those of us with limited code development skills?

We would all be really grateful, and I'm sure many of us would also credit you on our websites and players.

Thanks
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
Ian I have posted a temp solution below. I'll be making a more comprehensive solution probably sometime this week. When I do I'll post it for everyone.
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
Ian here is a full solution using LastFm Api and fanart.tv's api.

Simply replace my keys with yours, and use the short function with your on change handler. i.e. when a song changes, etc. 

https://codepen.io/lawrencenull/pen/NVWWwR

P.S. LastFm you owe me one for saving you from some serious hate mail.
Photo of daniel wilkie

daniel wilkie

  • 7 Posts
  • 0 Reply Likes
Hero!!
Photo of Thom

Thom

  • 6 Posts
  • 11 Reply Likes
A wild guess from my side to why Last.FM might be doing this is that their parent company (CBS) or someone else from their management decided the bandwidth that the images took up was too expensive and wanted to get rid of it.

The main issue here is that Last.FM is (to my knowledge) the only good publicly accessible and free music database in existence.

I would much rather prefer something like rate limits instead of simply removing access to a feature like this after 8 years. This shows that Last.FM is not a reliable solution to build your application around.
Photo of omega1

omega1

  • 3 Posts
  • 10 Reply Likes
Last.FM could have easily monetized this by having one of their salespeople make themselves known here and give contact details about how to get a 'paid for' account set up and offer a tiered platform based on API calls.

Not only is this a terrible missed opportunity for Last.FM to monetize this properly, but also the thousands of developers and site owners that have been using this for years taken away with no announcement whatsoever (until after the event).

Shame it could have been handled much better...
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
A very hacky and temp solution.

the function:

 function bingProfileImage(bing_Image){
                           document.querySelector('.image_src_to_change').setAttribute('src','https://tse2.mm.bing.net/th?q='+bing_Image+' artist+spotify.com&w=300&h=300&c=7&rs=1&...;

   }

Call the function:

bingProfileImage("taylor momsen");


Set the div id or class in the function to the image to be changed. You can also modify the [w] and [h] attributes in the url for image size. Like I said very hacky and temp solution, but should stop users from seeing a star image.

(Edited)
Photo of Aaron Hudspeth

Aaron Hudspeth

  • 6 Posts
  • 9 Reply Likes
Thanks, I'll try that out and see how it works.
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
See the fiddle below. It doesn't correctly match 100% of the time but it was the fastest thing I could do. 
(Edited)
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
Added a complete replacement below.
Photo of RFF Radio

RFF Radio

  • 11 Posts
  • 9 Reply Likes
Thanks Lawrence! You're already filling the holes that Last.fm has created without any respect for its users.
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
Sorry it truncated the function. Here is a fiddle.

https://jsfiddle.net/1vajnbgt/
Photo of RFF Radio

RFF Radio

  • 11 Posts
  • 9 Reply Likes
This is a great solution! Thanks!
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
Full solution using LastFm Api and fanart.tv's api.

Simply replace my keys with yours, and use the short function with your on change handler. i.e. when a song changes, etc. 

https://codepen.io/lawrencenull/pen/NVWWwR
(Edited)
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
Same base function using the smaller preview image.

https://codepen.io/lawrencenull/pen/arbzNr
Photo of Ian McKenzie Anderson

Ian McKenzie Anderson

  • 9 Posts
  • 9 Reply Likes
Thank you so much, lawrencenull. I really appreciate the time you've put in to help us. Just one question: Is the API key we need for the https://webservice.fanart.tv/v3/music/'+musicBrainzID+'&? request a fanart one or a musicbrainz one? (I assume the other API key is our lastFM one?).

Thanks again! You're awesome! 
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
It's a fanart.tv one. https://fanart.tv/get-an-api-key/
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
They use musicbrainz id as the artist ids for lookup.
Photo of Ian McKenzie Anderson

Ian McKenzie Anderson

  • 9 Posts
  • 9 Reply Likes
Thanks. I have a fanart.tv key, so I'll give it a try.
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 27 Reply Likes
I'm not sure if the albums artwork is also gone. I use a different api for that. If it is let me know and I'll create a function to pull in album by name. If anyone needs help implementing any of these functions let me know.
Photo of BlastFM Limited

BlastFM Limited

  • 10 Posts
  • 19 Reply Likes
It's nice to see someone trying to help. Thanks for all your work. I have gone a different route and decided to build my own API and database so I'll be busy for the next few years lol
(Edited)
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 25 Reply Likes
You know actually I decided the same thing. Hate to say it but lastfm and apple were steady API's and I relied on them. This was a wake up call. For my personal project I'll be building my own database, cross-linked, cross-tagged, and cross-referenced. Using wikidata, ddg, and fanart, but downloading everything...
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 25 Reply Likes
Still want to try to help everyone else though, maybe a flaw in my soul, or character. Not really sure about souls, no spiritual argument meant. If they had any sense they would have monetized this api.
Photo of lawrencenull

lawrencenull

  • 27 Posts
  • 25 Reply Likes
And of course if you need any help with future endevours, let me know and I'll help as much as I can.
Photo of RFF Radio

RFF Radio

  • 11 Posts
  • 9 Reply Likes
I was kinda surprised. My eyes are still wide open. Thanks for your help (code)! I'll get into it the next weeks and let you know when I think I can contribute someting.
Photo of BlastFM Limited

BlastFM Limited

  • 10 Posts
  • 19 Reply Likes
I've now got a PHP website for storing images and at the moment I am loading the images using MySQL calls, no API yet but it's working. When I say working, I mean for certain applications on our website(s), not for images within our players. I have been in contact with the developer who made our players and today he has released an updated version which gets most images but not obscure ones. I'm not sure where he is getting them from or how but it seems to work and we can only hope that more images get added in the future.
(Edited)
Photo of RFF Radio

RFF Radio

  • 11 Posts
  • 9 Reply Likes
A few months ago there was also a 'problem' with the pictures and it was solved pretty quickly. Now it turns out that it probably was/is a deliberate action. I'm very disappointed and a also bit frustrated like many people thas were using the images through the API. These are symptoms of the way the 'free internet' is going. We need to take action.. But that's another thing.
Photo of Donnie

Donnie

  • 2 Posts
  • 3 Reply Likes
On my server there are data about 1.5 million artists, including images. Only artists, no data about albums and tracks. But I do not have a public api and my server will not withstand many requests. However, I’m ready to help other developers, if that’s helpful. We can make a common project for data access.

Fanart.tv has no data on rare artists. A very small database compared to musicbrainz and lastfm.
Photo of lennie

lennie

  • 146 Posts
  • 134 Reply Likes
What a crazy stunt from last.fm, this is just terrible. Not only that many API functions did not work for a long time, now they just drop support for the artist pictures without any warnings in advance.

I'm happy to help building a replacement service if there are others around willing to help.
Photo of DenyPt

DenyPt

  • 2 Posts
  • 5 Reply Likes
Making breaking changes through the API with absolutely no warning upfront is ridiculous.