listenbrainz

n8n community node for the ListenBrainz API

Package Information

Downloads: 182 weekly / 182 monthly
Latest Version: 0.3.0
Author: Martien

Documentation

n8n-nodes-listenbrainz

Complete n8n community node for the ListenBrainz API - an open-source music tracking service that provides music recommendations, listening statistics, social features, and playlists for music lovers.

n8n is a fair-code licensed workflow automation platform.

Installation

Follow the installation guide in the n8n community nodes documentation.

npm install n8n-nodes-listenbrainz

Complete Feature Set

🎵 Recommendations

  • Get Recommendations: Get collaborative filtered recording recommendations with scores

📊 Statistics

  • Get Top Artists: Top artists with listen counts
  • Get Top Releases: Top albums (perfect for Lidarr integration!)
  • Get Top Recordings: Top tracks
  • Get Listening Activity: Listen activity over time
  • Get Artist Map: Artist distribution by country

Time ranges: this week, this month, this year, week, month, quarter, half year, year, all time

🎧 User Listens

  • Get Recent Listens: Recent listening history (max 1000, with timestamp filtering)
  • Get Listen Count: Total listen count
  • Get Playing Now: Currently playing track

📝 Playlists

  • Get User Playlists: List user's playlists
  • Get Playlist: Get specific playlist by MBID
  • Search Playlists: Search by name (min 3 characters)
  • Create Playlist: Create new playlists with tracks
  • Edit Playlist: Update title, description, privacy
  • Delete Playlist: Remove playlists
  • Copy Playlist: Duplicate playlists
  • Add Items: Add tracks to playlists
  • Delete Items: Remove tracks from playlists

💚 Feedback

  • Submit Feedback: Love/hate recordings
  • Get User Feedback: Retrieve user's feedback history
  • Get Recording Feedback: Get feedback for specific recordings

🔍 Metadata

  • Lookup Recording: Get metadata for recording MBIDs (artist, tags, release info)
  • Lookup Artist: Get artist metadata and tags
  • Lookup by Name: Find MBIDs by artist/recording/release name

👥 Social

  • Get Followers: List user's followers
  • Get Following: List who user follows
  • Follow User: Follow a user
  • Unfollow User: Unfollow a user

📤 Submit Listens

  • Submit Listens: Submit listening data (single, playing_now, import)

🔗 Similar Users

  • Get Similar Users: Find users with similar taste

Credentials

Authentication is optional for most read operations (recommendations, statistics, user listens, playlists, etc.).

Required for:

  • Creating/editing/deleting playlists
  • Submitting feedback
  • Following/unfollowing users
  • Submitting listens

Setup:

  1. Go to https://listenbrainz.org/settings/
  2. Generate a user token
  3. Add token to n8n credentials

Usage Examples

Get Top Releases for Lidarr Workflow

{
  "resource": "statistics",
  "operation": "getTopReleases",
  "username": "Martien",
  "range": "week",
  "count": 25
}

Returns albums with artist names, release MBIDs, and listen counts - perfect for Lidarr integration!

Create a Playlist

{
  "resource": "playlists",
  "operation": "createPlaylist",
  "authentication": "token",
  "playlistTitle": "My Favorites",
  "description": "Generated from n8n",
  "public": true,
  "tracks": "[{\"identifier\": \"recording-mbid-here\"}]"
}

Submit Feedback

{
  "resource": "feedback",
  "operation": "submitFeedback",
  "authentication": "token",
  "recordingMbid": "uuid-here",
  "score": 1
}

Lookup Recording Metadata

{
  "resource": "metadata",
  "operation": "lookupRecording",
  "recordingMbids": "mbid1,mbid2,mbid3"
}

Returns complete metadata including artist info, tags, and release details.

Follow a User

{
  "resource": "social",
  "operation": "followUser",
  "authentication": "token",
  "username": "someuser"
}

Submit Listen Data

{
  "resource": "submitListens",
  "operation": "submitListens",
  "authentication": "token",
  "listenType": "single",
  "listens": "[{\"listened_at\": 1234567890, \"track_metadata\": {\"artist_name\": \"Artist\", \"track_name\": \"Track\", \"release_name\": \"Album\"}}]"
}

Workflow Ideas

Auto-Add Recommended Albums to Lidarr

  1. ListenBrainz: Get Top Releases
  2. Filter: By listen count threshold
  3. Lidarr: Add albums using artist/release names

Playlist Sync

  1. ListenBrainz: Get Top Recordings
  2. ListenBrainz: Create Playlist with top tracks
  3. External Service: Export playlist

Social Music Discovery

  1. ListenBrainz: Get Similar Users
  2. ListenBrainz: Get Their Top Releases
  3. ListenBrainz: Submit Feedback on discoveries

Automated Scrobbling

  1. Music Service: Detect new play
  2. ListenBrainz: Submit Listen

API Coverage

This node implements the complete ListenBrainz API v1:

  • ✅ Recommendations (/1/cf/recommendation/user/{username}/recording)
  • ✅ Statistics (/1/stats/user/{username}/*)
  • ✅ User Listens (/1/user/{username}/listens)
  • ✅ Playlists (/1/playlist/*, /1/user/{username}/playlists)
  • ✅ Feedback (/1/feedback/*)
  • ✅ Metadata (/1/metadata/*)
  • ✅ Social (/1/user/{username}/followers, /1/user/{username}/following)
  • ✅ Submit Listens (/1/submit-listens)
  • ✅ Similar Users (/1/user/{username}/similar-users)

Compatibility

  • n8n version 1.0+
  • Node.js 16+

Resources

License

MIT

Author

Created by Martien

Changelog

See CHANGELOG.md for version history.

Discussion