Accept a Last.fm Scrobble (Standard)
POST
/2.0/
const url = 'https://example.com/2.0/';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"method":"track.scrobble","artist":"example","track":"example","album":"example","albumArtist":"example","mbid":"example","duration":1,"sk":"example","api_key":"example","timestamp":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/2.0/ \ --header 'Content-Type: application/json' \ --data '{ "method": "track.scrobble", "artist": "example", "track": "example", "album": "example", "albumArtist": "example", "mbid": "example", "duration": 1, "sk": "example", "api_key": "example", "timestamp": 1 }'Accepts the standard Last.fm track.scrobble payload at this endpoint.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”format
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Any of:
Any of:
Single Scrobble
object
method
required
string
artist
required
string
track
required
string
album
string
albumArtist
string
mbid
string
duration
integer
sk
string
api_key
string
timestamp
required
integer
Bulk Scrobbles
object
method
required
string
artist
required
Array<string>
track
required
Array<string>
album
Array<string>
albumArtist
Array<string>
mbid
Array<string>
duration
Array<integer>
sk
string
api_key
string
timestamp
required
Array<integer>
One of:
Update Now Playing
object
method
required
string
artist
required
string
track
required
string
album
string
albumArtist
string
mbid
string
duration
integer
sk
string
api_key
string
Get Mobile Auth Session
object
method
required
string
username
string
password
string
api_key
string
Responses
Section titled “Responses”Success