JMusixMatch
A Java wrapper for the MusiXmatch API
Install / Use
/learn @sachin-handiekar/JMusixMatchREADME
jMusixMatch

A Java wrapper for the MusixMatch API
Installation with Maven
<dependency>
<groupId>com.sachinhandiekar</groupId>
<artifactId>jMusixMatch</artifactId>
<version>1.1.4</version>
</dependency>
If you prefer using the latest snapshot build, include the following lines to your pom.xml.
<repositories>
<repository>
<id>oss.snapshots</id>
<name>OSS Sonatype Snapshot Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.sachinhandiekar</groupId>
<artifactId>jMusixMatch</artifactId>
<version>1.1.5-SNAPSHOT</version>
</dependency>
</dependencies>
Usage
- Declaring the MusixMatch Instance
String apiKey = "Your MusixMatch API Key";
MusixMatch musixMatch = new MusixMatch(apiKey);
- Fuzzy Search
String trackName = "Don't stop the Party";
String artistName = "The Black Eyed Peas";
// Track Search [ Fuzzy ]
Track track = musixMatch.getMatchingTrack(trackName, artistName);
TrackData data = track.getTrack();
System.out.println("AlbumID : " + data.getAlbumId());
System.out.println("Album Name : " + data.getAlbumName());
System.out.println("Artist ID : " + data.getArtistId());
System.out.println("Album Name : " + data.getArtistName());
System.out.println("Track ID : " + data.getTrackId());
- Getting Lyrics
int trackID = data.getTrackId();
Lyrics lyrics = musixMatch.getLyrics(trackID);
System.out.println("Lyrics ID : " + lyrics.getLyricsId());
System.out.println("Lyrics Language : " + lyrics.getLyricsLang());
System.out.println("Lyrics Body : " + lyrics.getLyricsBody());
System.out.println("Script-Tracking-URL : " + lyrics.getScriptTrackingURL());
System.out.println("Pixel-Tracking-URL : " + lyrics.getPixelTrackingURL());
System.out.println("Lyrics Copyright : " + lyrics.getLyricsCopyright());
- Search Tracks
// The following will search for tracks with matching artist_name 'Eminem'
List<Track> tracks = musixMatch.searchTracks("", "Eminem", "", 10, 10, true);
for (Track trk : tracks) {
TrackData trkData = trk.getTrack();
System.out.println("AlbumID : " + trkData.getAlbumId());
System.out.println("Album Name : " + trkData.getAlbumName());
System.out.println("Artist ID : " + trkData.getArtistId());
System.out.println("Artist Name : " + trkData.getArtistName());
System.out.println("Track ID : " + trkData.getTrackId());
System.out.println();
}
Dependencies
- Google GSON (http://code.google.com/p/google-gson/)
Contact Me
- Email : sachin.handiekar@gmail.com or sach21@gmail.com
- Twitter : @sachinhandiekar
Related Skills
node-connect
354.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
