LastFm API

API

Music metadata & user listening data API for artists, tracks, and scrobbles

Visit Website

Overview

The LastFm API provides RESTful access to extensive music metadata, user listening history, and community-driven data. Key endpoints include artist details (biography, top tracks), track info (tags, lyrics links), user scrobbles, album data, and global chart rankings. Responses are available in JSON format. Use cases include building music discovery apps, integrating personalized listening stats into services, creating custom playlists, analyzing genre trends, and adding music-related content to websites. It supports read operations (e.g., fetching stats) and write operations (e.g., scrobbling tracks). Authentication requires an API key for basic access, with OAuth for user-specific actions.

Example Integration (JavaScript)

script.js JS

fetch('https://www.last.fm/api')
  .then(res => res.json())
  .then(data => console.log(data))
  .catch(err => console.error(err));

Key Features

  • RESTful
  • JSON Support
  • OAuth Authentication
  • Music Metadata Access
  • User Listening History
  • Scrobbling Capability
  • Chart Rankings

Frequently Asked Questions

? Is LastFm API free to use?

Yes, the basic tier is free for non-commercial use with rate limits. Commercial use requires contacting LastFm for licensing.

? Does it require an API Key?

Yes, most endpoints need an API key (register on LastFm to get one). User-specific operations like scrobbling require OAuth 2.0 authentication.

? What is the response format?

Responses are primarily in JSON, though some endpoints may support XML as an optional format.

Top Alternatives

Spotify API Search Google
Apple Music API Search Google
Deezer API Compare

People Also Ask about LastFm API

LastFm API vs Spotify APILastFm API vs Apple Music APILastFm API vs Deezer API LastFm API 2025 review

Tool Info

Pricing Freemium
Category Music
Platform Public API

Pros

  • Extensive music database
  • Supports read/write operations
  • Well-documented with community support

Cons

  • Rate-limited free tier
  • Commercial use requires approval
  • OAuth setup for user actions is complex

More Music Tools