Last.fm is a service that tracks users' listening habits by collecting data on the music tracks, called "scrobbles", that users listen to. It also functions as a social network by recommending new music to users based on their listening data and the data of other users. Last.fm has an API that allows developers to access data on individual users or in aggregate, including data on artists, tags, and tracks. To use the API, developers must apply for an API key and secret code to authenticate their requests. API requests return data in XML format, with parameters like artist, track, and username optionally included to provide context.