last.fm apicdn.last.fm/matt/stockholmapi.pdf · 571 scrobbles in the last second ... a way to call...
TRANSCRIPT
![Page 1: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/1.jpg)
Last.fm API Music Hack Day • Stockholm
30 January 2010
![Page 2: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/2.jpg)
What’s Last.fm?
![Page 3: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/3.jpg)
What’s Last.fm?We do lots of things:
![Page 4: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/4.jpg)
What’s Last.fm?We do lots of things:
Charts, recommendations, catalogue, personalised radio, metadata, artists similarity, tags, images, events, groups, venues, friends, journals, shoutboxes
![Page 5: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/5.jpg)
What’s Last.fm?We do lots of things:
Charts, recommendations, catalogue, personalised radio, metadata, artists similarity, tags, images, events, groups, venues, friends, journals, shoutboxes
“The social music revolution”
![Page 6: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/6.jpg)
What’s Last.fm?We do lots of things:
Charts, recommendations, catalogue, personalised radio, metadata, artists similarity, tags, images, events, groups, venues, friends, journals, shoutboxes
“The social music revolution”
The definitive online home for your music taste
![Page 7: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/7.jpg)
What’s Last.fm?We do lots of things:
Charts, recommendations, catalogue, personalised radio, metadata, artists similarity, tags, images, events, groups, venues, friends, journals, shoutboxes
“The social music revolution”
The definitive online home for your music taste
We’ve offered APIs since 2003
![Page 8: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/8.jpg)
![Page 9: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/9.jpg)
![Page 10: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/10.jpg)
![Page 11: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/11.jpg)
![Page 12: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/12.jpg)
Scrobbling
![Page 13: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/13.jpg)
Scrobbling
(Not scribbling, scobbing, snowballing or scrabbling. These are the risks of made-up words.)
![Page 14: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/14.jpg)
Scrobbling
(Not scribbling, scobbing, snowballing or scrabbling. These are the risks of made-up words.)
scrobble: skrob· bul (ˈskrɒbəll)[verb] To automatically add the tracks you play to your Last.fm profile with a piece of software called a Scrobbler
![Page 15: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/15.jpg)
![Page 16: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/16.jpg)
![Page 17: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/17.jpg)
![Page 18: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/18.jpg)
Whole lotta scrobblin’
![Page 19: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/19.jpg)
Whole lotta scrobblin’571 scrobbles in the last second
![Page 20: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/20.jpg)
Whole lotta scrobblin’571 scrobbles in the last second
34,260 scrobbles in the last minute
![Page 21: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/21.jpg)
Whole lotta scrobblin’571 scrobbles in the last second
34,260 scrobbles in the last minute
2,055,600 scrobbles in the last hour
![Page 22: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/22.jpg)
Whole lotta scrobblin’571 scrobbles in the last second
34,260 scrobbles in the last minute
2,055,600 scrobbles in the last hour
24,667,200 scrobbles in the last 12 hours
![Page 23: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/23.jpg)
Whole lotta scrobblin’571 scrobbles in the last second
34,260 scrobbles in the last minute
2,055,600 scrobbles in the last hour
24,667,200 scrobbles in the last 12 hours
49,334,400 scrobbles in the last day
![Page 24: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/24.jpg)
Whole lotta scrobblin’571 scrobbles in the last second
34,260 scrobbles in the last minute
2,055,600 scrobbles in the last hour
24,667,200 scrobbles in the last 12 hours
49,334,400 scrobbles in the last day
That's over 38,085,313,884 tracks scrobbled since 2003. About 297,089 years of music in total.
![Page 25: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/25.jpg)
![Page 26: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/26.jpg)
API 2.0
![Page 27: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/27.jpg)
API 2.0A REST-style HTTP API, that you (might) know and love (modelled on Flickr)
![Page 28: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/28.jpg)
API 2.0A REST-style HTTP API, that you (might) know and love (modelled on Flickr)
Clients available in PHP, Ruby, Python, C++
![Page 29: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/29.jpg)
API 2.0A REST-style HTTP API, that you (might) know and love (modelled on Flickr)
Clients available in PHP, Ruby, Python, C++
Unrestricted non-commercial use
![Page 30: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/30.jpg)
Documentation
![Page 31: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/31.jpg)
Documentation
Complete documentation can be found at http://last.fm/api
![Page 32: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/32.jpg)
Documentation
Complete documentation can be found at http://last.fm/api
Each method has a page that details is required and optional parameters
![Page 33: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/33.jpg)
Documentation
Complete documentation can be found at http://last.fm/api
Each method has a page that details is required and optional parameters
It covers everything here in greater depth, and is generally much more useful than me blathering up here
![Page 34: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/34.jpg)
What does it offer?
![Page 35: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/35.jpg)
What does it offer?
One hundred or so methods to access information about:
![Page 36: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/36.jpg)
What does it offer?
One hundred or so methods to access information about:
Artists, albums, tracks, tags, users, events, venues, groups, radio
![Page 37: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/37.jpg)
What does it offer?
One hundred or so methods to access information about:
Artists, albums, tracks, tags, users, events, venues, groups, radio
Authenticated access to private data
![Page 38: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/38.jpg)
What does it offer?
One hundred or so methods to access information about:
Artists, albums, tracks, tags, users, events, venues, groups, radio
Authenticated access to private data
Export a user’s full listening history
![Page 39: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/39.jpg)
album.addTags, album.getInfo, album.getTags, album.removeTag, album.search, artist.addTags, artist.getEvents, artist.getImages, artist.getInfo, artist.getPastEvents,
artist.getPodcast, artist.getShouts, artist.getSimilar, artist.getTags, artist.getTopAlbums, artist.getTopFans, artist.getTopTags, artist.getTopTracks, artist.removeTag, artist.search,
artist.share, artist.shout, auth.getMobileSession, auth.getSession, auth.getToken, event.attend, event.getAttendees, event.getInfo, event.getShouts, event.share,
event.shout, geo.getEvents, geo.getMetroArtistChart, geo.getMetroTrackChart, geo.getMetroUniqueArtistChart, geo.getMetroUniqueTrackChart, geo.getMetroWeeklyChartlist, geo.getTopArtists, geo.getTopTracks,
group.getMembers, group.getWeeklyAlbumChart, group.getWeeklyArtistChart, group.getWeeklyChartList, group.getWeeklyTrackChart, library.addAlbum,
library.addArtist, library.addTrack, library.getAlbums, library.getArtists, library.getTracks, playlist.addTrack, playlist.create, playlist.fetch, radio.getPlaylist, radio.tune, tag.getSimilar, tag.getTopAlbums, tag.getTopArtists, tag.getTopTags,
tag.getTopTracks, tag.getWeeklyArtistChart, tag.getWeeklyChartList, tag.search, tasteometer.compare, track.addTags, track.ban, track.getInfo, track.getSimilar, track.getTags, track.getTopFans, track.getTopTags, track.love, track.removeTag,
track.search, track.share, user.getEvents, user.getFriends, user.getInfo, user.getLovedTracks, user.getNeighbours, user.getPastEvents, user.getPlaylists, user.getRecentStations, user.getRecentTracks, user.getRecommendedArtists,
user.getRecommendedEvents, user.getShouts, user.getTopAlbums, user.getTopArtists, user.getTopTags, user.getTopTracks, user.getWeeklyAlbumChart,
user.getWeeklyArtistChart, user.getWeeklyChartList, user.getWeeklyTrackChart, user.shout, venue.getEvents, venue.getPastEvents, venue.search
![Page 40: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/40.jpg)
Or in an organised fashion...
![Page 41: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/41.jpg)
Who’s using it?
![Page 42: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/42.jpg)
Who’s using it?
1,000s of 3rd party developers every day
![Page 43: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/43.jpg)
Who’s using it?
1,000s of 3rd party developers every day
Checkout http://build.last.fm for examples, from forum sigs to complex apps
![Page 44: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/44.jpg)
Who’s using it?
1,000s of 3rd party developers every day
Checkout http://build.last.fm for examples, from forum sigs to complex apps
Microsoft built our Xbox 360 app using only our public API
![Page 45: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/45.jpg)
Who’s using it?
1,000s of 3rd party developers every day
Checkout http://build.last.fm for examples, from forum sigs to complex apps
Microsoft built our Xbox 360 app using only our public API
Squeezebox, Sonos and other hardware devices
![Page 46: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/46.jpg)
Current Last.fm traffic
45%
17%
37%
Web requests to www.last.fmAPI requests (official Last.fm apps)API requests (3rd party)
(December 2009)
![Page 47: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/47.jpg)
Whole lotta scrobblers
![Page 48: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/48.jpg)
Whole lotta scrobblersHype Machine, Spotify, Songbird, Winamp, iTunes and 100s more
![Page 49: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/49.jpg)
Whole lotta scrobblersHype Machine, Spotify, Songbird, Winamp, iTunes and 100s more
People have found ways to scrobble Youtube, and even their vinyl collection
![Page 50: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/50.jpg)
Whole lotta scrobblersHype Machine, Spotify, Songbird, Winamp, iTunes and 100s more
People have found ways to scrobble Youtube, and even their vinyl collection
You? Check out our scrobbling API (aka ‘submissions API’) too
![Page 51: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/51.jpg)
Whole lotta scrobblersHype Machine, Spotify, Songbird, Winamp, iTunes and 100s more
People have found ways to scrobble Youtube, and even their vinyl collection
You? Check out our scrobbling API (aka ‘submissions API’) too
Question: as a developer what would make scrobbling easier / more appealing to you?
![Page 52: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/52.jpg)
Using the API
![Page 53: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/53.jpg)
Using the API
You’ll need...
![Page 54: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/54.jpg)
Using the API
You’ll need...
An API Key (a 32 char unique identifier)
![Page 55: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/55.jpg)
Using the API
You’ll need...
An API Key (a 32 char unique identifier)
A way to call the API (use a supported client, or plain old wget, up to you)
![Page 56: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/56.jpg)
Using the API
You’ll need...
An API Key (a 32 char unique identifier)
A way to call the API (use a supported client, or plain old wget, up to you)
A way to parse the response (this is where clients can come in handy)
![Page 57: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/57.jpg)
Getting an API Key
Please don’t use the example key
![Page 58: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/58.jpg)
Getting an API Key
To get one you’ll need a Last.fm account, so if you don’t have one you’ll need to join (fast, free)
Please don’t use the example key
![Page 59: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/59.jpg)
Getting an API Key
To get one you’ll need a Last.fm account, so if you don’t have one you’ll need to join (fast, free)
Set it up at http://last.fm/api/account
Please don’t use the example key
![Page 60: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/60.jpg)
Getting an API Key
To get one you’ll need a Last.fm account, so if you don’t have one you’ll need to join (fast, free)
Set it up at http://last.fm/api/account
Only one API Key per account
Please don’t use the example key
![Page 61: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/61.jpg)
Anatomy of an API call
![Page 62: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/62.jpg)
Anatomy of an API call
http://ws.audioscrobbler.com/2.0/?method=user.getinfo&api_key=XXX&user=underpangs
![Page 63: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/63.jpg)
Anatomy of an API call
http://ws.audioscrobbler.com/2.0/?method=user.getinfo&api_key=XXX&user=underpangs
Root URL + Method + API Key + method specific parameters (check the method documentation)
![Page 64: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/64.jpg)
Anatomy of a response<lfm status="ok"> <user>
<id>1021212</id> <name>underpangs</name> <realname>David Singleton</realname> <url>http://www.last.fm/user/underpangs</url> <image>http://userserve-ak.last.fm/serve/126/13884831.jpg</image> <country>UK</country> <age>25</age> <gender>m</gender> <subscriber>1</subscriber> <playcount>45519</playcount> <playlists>12</playlists> <bootstrap>0</bootstrap> <registered unixtime="1073173934">2004-01-03 23:52</registered>
</user></lfm>
Every response is wrapped in a root <lfm> node
![Page 65: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/65.jpg)
Output Formats
![Page 66: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/66.jpg)
Output Formats
By default all services output XML are also available as JSON
![Page 67: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/67.jpg)
Output Formats
By default all services output XML are also available as JSON
To switch, add format=json to your call
![Page 68: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/68.jpg)
Output Formats
By default all services output XML are also available as JSON
To switch, add format=json to your call
Some services offer even more output formats, check the method docs
![Page 69: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/69.jpg)
Output Formats
By default all services output XML are also available as JSON
To switch, add format=json to your call
Some services offer even more output formats, check the method docs
In particular, some can output RSS, XSPF, iCal and JSONP
![Page 70: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/70.jpg)
JSON Output
{ "user": { "id": "1021212", "name": "underpangs", "realname": "David Singleton",[SNIP!] "registered": { "#text": "2004-01-03 23:52", "unixtime": "1073173934" } }}
Note that for elements with both a text child and attributes, that the text is expressed as the #text attribute
![Page 71: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/71.jpg)
Paginated methods
<lfm status="ok" total="109" page="1" perPage="50" totalPages="3">...
</lfm>
![Page 72: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/72.jpg)
Paginated methods
Some methods can return a lot of results, we limit them and let you page through
<lfm status="ok" total="109" page="1" perPage="50" totalPages="3">...
</lfm>
![Page 73: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/73.jpg)
Paginated methods
Some methods can return a lot of results, we limit them and let you page through
These services will generally accept a limit (amount per page) and page offset. The root node will also give you the total number of results and pages
<lfm status="ok" total="109" page="1" perPage="50" totalPages="3">...
</lfm>
![Page 74: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/74.jpg)
Errors
<lfm status="failed"> <error code="10">Invalid API Key</error></lfm>
![Page 75: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/75.jpg)
Errors
The root lfm node has a status of “failed” and will contain an error code and message
<lfm status="failed"> <error code="10">Invalid API Key</error></lfm>
![Page 76: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/76.jpg)
Errors
The root lfm node has a status of “failed” and will contain an error code and message
The possible errors for a method are listed on it’s documentation page
<lfm status="failed"> <error code="10">Invalid API Key</error></lfm>
![Page 77: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/77.jpg)
Common Errors
![Page 78: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/78.jpg)
Common Errors
Invalid format - This service doesn't exist in that format
![Page 79: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/79.jpg)
Common Errors
Invalid format - This service doesn't exist in that format
Invalid parameters - Your request is missing a required parameter
![Page 80: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/80.jpg)
Common Errors
Invalid format - This service doesn't exist in that format
Invalid parameters - Your request is missing a required parameter
Invalid API key
![Page 81: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/81.jpg)
Common Errors
Invalid format - This service doesn't exist in that format
Invalid parameters - Your request is missing a required parameter
Invalid API key
Invalid method signature supplied
![Page 82: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/82.jpg)
Common Methods
![Page 83: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/83.jpg)
Common Methods
artist.getImages
![Page 84: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/84.jpg)
Common Methods
artist.getImages
album.getTags
![Page 85: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/85.jpg)
Common Methods
artist.getImages
album.getTags
track.search
![Page 86: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/86.jpg)
Common Methods
artist.getImages
album.getTags
track.search
user.getTopArtists
![Page 87: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/87.jpg)
Common Methods
artist.getImages
album.getTags
track.search
user.getTopArtists
geo.getEvents
![Page 88: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/88.jpg)
Method “Types”
![Page 89: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/89.jpg)
Method “Types”
Public - Does what it says on the tin
![Page 90: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/90.jpg)
Method “Types”
Public - Does what it says on the tin
Private - Requires authentication (we’ll get to that shortly)
![Page 91: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/91.jpg)
Method “Types”
Public - Does what it says on the tin
Private - Requires authentication (we’ll get to that shortly)
“Enhanced” - Public, but with extra information if you supply a user, artist.getInfo is a good example of this
![Page 92: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/92.jpg)
Caveats
![Page 93: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/93.jpg)
Caveats
Send an identifiable user-agent
![Page 94: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/94.jpg)
Caveats
Send an identifiable user-agent
Don’t hammer the API (check the TOS)
![Page 95: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/95.jpg)
Caveats
Send an identifiable user-agent
Don’t hammer the API (check the TOS)
Respect HTTP caching headers
![Page 96: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/96.jpg)
Caveats
Send an identifiable user-agent
Don’t hammer the API (check the TOS)
Respect HTTP caching headers
UTF-8 encoding assumed
![Page 97: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/97.jpg)
Authenticated Calls
![Page 98: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/98.jpg)
Authenticated Calls
Some methods access private data and require explicit permission from a user
![Page 99: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/99.jpg)
Authenticated Calls
Some methods access private data and require explicit permission from a user
To do this we use an oAuth model, where a user will grant permission to an application, in the form of a session key
![Page 100: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/100.jpg)
Authenticated Calls
Some methods access private data and require explicit permission from a user
To do this we use an oAuth model, where a user will grant permission to an application, in the form of a session key
Slightly different ways to get a session key for web, mobile and desktop
![Page 101: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/101.jpg)
Radio
![Page 102: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/102.jpg)
Radio Radio is an authenticated call, you’ll need a user session key
![Page 103: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/103.jpg)
Radio Radio is an authenticated call, you’ll need a user session key
API-based radio is only available to subscribers
![Page 104: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/104.jpg)
Radio Radio is an authenticated call, you’ll need a user session key
API-based radio is only available to subscribers
Full documentation for using this is available at http://last.fm/api/radio
![Page 105: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/105.jpg)
Radio Radio is an authenticated call, you’ll need a user session key
API-based radio is only available to subscribers
Full documentation for using this is available at http://last.fm/api/radio
However, here’s a quick introduction...
![Page 106: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/106.jpg)
Tuning
![Page 107: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/107.jpg)
Tuning
POST call, to API root, method=radio.tune
![Page 108: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/108.jpg)
Tuning
POST call, to API root, method=radio.tune
The station is in the form of a Last.fm URL, eg; lastfm://artist/cher/similarartists
![Page 109: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/109.jpg)
Tuning
POST call, to API root, method=radio.tune
The station is in the form of a Last.fm URL, eg; lastfm://artist/cher/similarartists
Once tuned, you request a playlist of 5 tracks at a time, with radio.getPlaylist which returns an XSPF
![Page 110: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/110.jpg)
<playlist version="1" xmlns="http://xspf.org/ns/0/"> <title>+Cher+Similar+Artists</title> <creator>Last.fm</creator> <date>2007-11-26T17:34:38</date> <link rel="http://www.last.fm/expiry">3600</link> <trackList> <track> <location>http://play.last.fm/ ... .mp3</location> <title>Two People (Live)</title> <identifier>8212510</identifier> <album>Tina Live In Europe</album> <creator>Tina Turner</creator> <duration>265000</duration> <image>http:// ... .jpg</image> <extension application="http://www.last.fm"> <artistpage>...</artistpage> <albumpage>...</albumpage> <trackpage>...</trackpage> </extension> </track> ... </trackList></playlist>
![Page 111: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/111.jpg)
How can you use it?
![Page 112: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/112.jpg)
How can you use it?A few ideas:
![Page 113: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/113.jpg)
How can you use it?A few ideas:
Rich artist information, stats, bio, images
![Page 114: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/114.jpg)
How can you use it?A few ideas:
Rich artist information, stats, bio, images
Bootstrapping a user’s music taste on your service
![Page 115: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/115.jpg)
How can you use it?A few ideas:
Rich artist information, stats, bio, images
Bootstrapping a user’s music taste on your service
Catalogue search, artists, albums, tracks
![Page 116: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/116.jpg)
How can you use it?A few ideas:
Rich artist information, stats, bio, images
Bootstrapping a user’s music taste on your service
Catalogue search, artists, albums, tracks
The API is simple and flexible, so it’s really up to you and your imagination
![Page 117: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/117.jpg)
Hax
![Page 118: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/118.jpg)
Hax
We’ll be around all weekend to answer API questions
![Page 119: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/119.jpg)
Hax
We’ll be around all weekend to answer API questions
If we don’t have what you need, we might be able to add it for you
![Page 120: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/120.jpg)
Hax
We’ll be around all weekend to answer API questions
If we don’t have what you need, we might be able to add it for you
Free 1-year subscription to anyone who demos an app tomorrow that uses the Last.fm API
![Page 121: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/121.jpg)
Jonty in the Xbox launch war room @ Last.HQ, London
Want the firehose? We’re hiring.www.last.fm/about/jobs/Want the firehose? We’re hiring.www.last.fm/about/jobs/
![Page 122: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/122.jpg)
Questions?
![Page 123: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/123.jpg)
Questions?
IRC: #musichackday on freenode
![Page 124: Last.fm APIcdn.last.fm/matt/StockholmAPI.pdf · 571 scrobbles in the last second ... A way to call the API (use a supported client, or plain old wget, up to you) A way to parse the](https://reader033.vdocument.in/reader033/viewer/2022041900/5e5ff77600455b6e3744c45e/html5/thumbnails/124.jpg)
Questions?
@flaneur
IRC: #musichackday on freenode