{"id":13869817,"url":"https://github.com/hudsonbrendon/python-musixmatch","last_synced_at":"2025-04-04T09:06:30.773Z","repository":{"id":21457214,"uuid":"92540343","full_name":"hudsonbrendon/python-musixmatch","owner":"hudsonbrendon","description":"Simple integrate of API musixmatch.com with python","archived":false,"fork":false,"pushed_at":"2025-03-25T18:16:58.000Z","size":494,"stargazers_count":107,"open_issues_count":0,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T08:04:47.893Z","etag":null,"topics":["api","lyrics","music","musixmatch","python","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hudsonbrendon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-26T19:00:26.000Z","updated_at":"2025-03-25T18:16:55.000Z","dependencies_parsed_at":"2023-12-10T06:23:35.272Z","dependency_job_id":"efe417d8-83b5-4393-b378-89d5fb334dca","html_url":"https://github.com/hudsonbrendon/python-musixmatch","commit_stats":{"total_commits":63,"total_committers":5,"mean_commits":12.6,"dds":0.09523809523809523,"last_synced_commit":"b204188485acb992b36232e31a09a2dd524c51e7"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudsonbrendon%2Fpython-musixmatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudsonbrendon%2Fpython-musixmatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudsonbrendon%2Fpython-musixmatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudsonbrendon%2Fpython-musixmatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hudsonbrendon","download_url":"https://codeload.github.com/hudsonbrendon/python-musixmatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149500,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","lyrics","music","musixmatch","python","wrapper"],"created_at":"2024-08-05T20:01:18.441Z","updated_at":"2025-04-04T09:06:30.745Z","avatar_url":"https://github.com/hudsonbrendon.png","language":"Python","readme":"# Python Musixmatch\n\nSimple integrate of API musixmatch.com with python\n\n[![Github Issues](http://img.shields.io/github/issues/hudsonbrendon/python-musixmatch.svg?style=flat)](https://github.com/hudsonbrendon/python-musixmatch/issues?sort=updated\u0026state=open)\n![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)\n[![Python package](https://github.com/hudsonbrendon/python-musixmatch/actions/workflows/pythonpackage.yml/badge.svg)](https://github.com/hudsonbrendon/python-musixmatch/actions/workflows/pythonpackage.yml)\n[![Upload Python Package](https://github.com/hudsonbrendon/python-musixmatch/actions/workflows/python-publish.yml/badge.svg)](https://github.com/hudsonbrendon/python-musixmatch/actions/workflows/python-publish.yml)\n\n# Quick start\n\n```bash\n$ pip install pymusixmatch\n```\n\nor\n\n```bash\n$ python setup.py install\n```\n\n# Authentication\n\nRegister for an API key:\n\nAll you need to do is [register](https://developer.musixmatch.com/signup) in order to get your API key, a mandatory parameter for most of our API calls. It’s your personal identifier and should be kept secret.\n\n# Usage\n\nWith your key in hand, it's time to authenticate, so run:\n\n```python\n\u003e\u003e\u003e from musixmatch import Musixmatch\n\n\u003e\u003e\u003e musixmatch = Musixmatch('\u003capikey\u003e')\n```\n\n## Chart Artists Get\n\nThis api provides you the list of the top artists of a given country.\n\nParameters:\n\n- country - A valid country code (default US).\n- page - Define the page number for paginated results.\n- page_size - Define the page size for paginated results (range 1 - 100).\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.chart_artists(1, 1)\n```\n\n## Chart Tracks Get\n\nThis api provides you the list of the top songs of a given country.\n\nParameters:\n\n- page - Define the page number for paginated results.\n- page_size - Define the page size for paginated results (range 1 - 100).\n- f_has_lyrics - When set, filter only contents with lyrics.\n- country - A valid country code (default US).\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.chart_tracks_get(1, 1)\n```\n\n## Chart Tracks Get\n\nSearch for track in our database.\n\nParameters:\n\n- q_track - The song title\n- q_artist - The song artist\n- q_lyrics - Any word in the lyrics\n- f_artist_id - When set, filter by this artist id\n- f_music_genre_id - When set, filter by this music category id\n- f_lyrics_language - Filter by the lyrics language (en,it,..)\n- f_has_lyrics - When set, filter only contents with lyrics\n- f_track_release_group_first_release_date_min - When set, filter the tracks with release date newer than value, format is YYYYMMDD\n- f_track_release_group_first_release_date_max - When set, filter the tracks with release date older than value, format is YYYYMMDD\n- s_artist_rating - Sort by our popularity index for artists (asc|desc)\n- s_track_rating - Sort by our popularity index for tracks (asc|desc)\n- quorum_factor - Search only a part of the given query string.Allowed range is (0.1 – 0.9)\n- page - Define the page number for paginated results\n- page_size - Define the page size for paginated results. Range is 1 to 100.\n- callback - jsonp callback\n- format - Decide the output type (json or xml)\n\n```python\n\u003e\u003e\u003e musixmatch.track_search(q_track='Stressed Out', q_artist='twentyonepilots', page_size=10, page=1, s_track_rating='desc')\n```\n\n## Track Get\n\nGet a track info from our database: title, artist, instrumental flag and cover art.\n\nParameters:\n\n- commontrack_id - The musiXmatch commontrack id.\n- track_isrc - A valid ISRC identifier.\n\n```python\n\u003e\u003e\u003e musixmatch.track_get(15445219)\n```\n\n## Track Lyrics Get\n\nGet the lyrics of a track.\n\nParameters:\n\n- track_id - The musiXmatch track id.\n- track_mbid - The musicbrainz recording id.\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.track_lyrics_get(15953433)\n```\n\n## Track Snippet Get\n\nGet the snippet for a given track.\n\nA lyrics snippet is a very short representation of a song lyrics. It’s usually twenty to a hundred characters long and it’s calculated extracting a sequence of words from the lyrics.\n\nParameters:\n\n- track_id - The musiXmatch track id.\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.track_snippet_get(16860631)\n```\n\n## Track Snippet Get\n\nRetreive the subtitle of a track.\n\nReturn the subtitle of a track in LRC or DFXP format. Refer to Wikipedia LRC format page or DFXP format on W3c for format specifications.\n\nParameters:\n\n- track_id - The musiXmatch track id.\n- track_mbid - The musicbrainz track id.\n- subtitle_format - The format of the subtitle (lrc,dfxp,stledu). Default to lrc.\n- f_subtitle_length - The desired length of the subtitle (seconds).\n- f_subtitle_length_max_deviation - The maximum deviation allowed from the f_subtitle_length (seconds).\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.track_subtitle_get(14201829)\n```\n\n## Track Richsync Get\n\nGet the Rich sync for a track.\n\nA rich sync is an enhanced version of the standard sync which allows:\n\n- position offset by single characther.\n- endless formatting options at single char level.\n- multiple concurrent voices.\n- multiple scrolling direction.\n\nParameters:\n\n- track_id - The musiXmatch track id.\n- f_sync_length - The desired length of the sync (seconds).\n- f_sync_length_max_deviation - The maximum deviation allowed.\n- from the f_sync_length (seconds).\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.track_richsync_get(14201829)\n```\n\n## Track Lyrics Post\n\nSubmit a lyrics to our database.\n\nIt may happen we don’t have the lyrics for a song, you can ask your users to help us sending the missing lyrics. We’ll validate every submission and in case, make it available through our api.\n\nPlease take all the necessary precautions to avoid users or automatic software to use your website/app to use this commands, a captcha solution like http://www.google.com/recaptcha or an equivalent one has to be implemented in every user interaction that ends in a POST operation on the musixmatch api.\n\nParameters:\n\n- track_i - dA valid country code (default US).\n- lyrics_body - The lyrics.\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.track_lyrics_post(1471157, 'test')\n```\n\n## Track Lyrics Post\n\nThis API method provides you the opportunity to help us improving our catalogue.\n\nWe aim to provide you with the best quality service imaginable, so we are especially interested in your detailed feedback to help us to continually improve it.\n\nPlease take all the necessary precautions to avoid users or automatic software to use your website/app to use this commands, a captcha solution like http://www.google.com/recaptcha or an equivalent one has to be implemented in every user interaction that ends in a POST operation on the musixmatch api.\n\nParameters:\n\n- lyrics_id - The musiXmatch lyrics id.\n- track_id - The musiXmatch track id.\n- feedback - The feedback to be reported, possible values are: wrong_lyrics, wrong_attribution, bad_characters,\n- lines_too_long, wrong_verses, wrong_formatting\n- format - Decide the output type json or xml (default json)\n\n```python\n\u003e\u003e\u003e musixmatch.track_lyrics_feedback_post(1471157, 4193713, 'wrong_verses')\n```\n\n## Matcher Lyrics Get\n\nGet the lyrics for track based on title and artist.\n\nParameters:\n\n- q_track - The song title\n- q_artist - The song artist\n- track_isrc - If you have an available isrc id in your catalogue you can query using this id only (optional)\n- format - Decide the output type json or xml (default json)\n\n```python\n\u003e\u003e\u003e musixmatch.matcher_lyrics_get('Sexy and I know it', 'LMFAO')\n```\n\n## Matcher Track Get\n\nMatch your song against our database.\n\nIn some cases you already have some informations about the track title, artist name, album etc.\nA possible strategy to get the corresponding lyrics could be:\n\n- search our catalogue with a perfect match,\n- maybe try using the fuzzy search,\n- maybe try again using artist aliases, and so on.\n\nThe matcher.track.get method does all the job for you in a single call. This way you dont’t need to worry about the details, and you’ll get instant benefits for your application without changing a row in your code, while we take care of improving the implementation behind. Cool, uh?\n\nParameters:\n\n- q_track - The song title.\n- q_artist - The song artist.\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.matcher_track_get('Lose Yourself (soundtrack)', 'Eminem')\n```\n\n## Matcher Subtitle Get\n\nYou can use the f_subtitle_length_max_deviation to fetch subtitles within a given duration range.\n\nParameters:\n\n- q_track - The song title\n- q_artist - The song artist\n- f_subtitle_length - Filter by subtitle length in seconds\n- f_subtitle_length_max_deviation - Max deviation for a subtitle length in seconds\n- track_isrc - If you have an available isrc id in your catalogue you can query using this id only (optional)\n- format - Decide the output type json or xml (default json)\n\nNote: This method requires a commercial plan.\n\n```python\n\u003e\u003e\u003e musixmatch.matcher_subtitle_get('Sexy and I know it', 'LMFAO', 200, 3)\n```\n\n## Artist Get\n\nGet the artist data from our database.\n\nParameters:\n\n- artist_id - Musixmatch artist id\n- artist_mbid - Musicbrainz artist id\n- format - Decide the output type json or xml (default json)\n\n```python\n\u003e\u003e\u003e musixmatch.artist_get(118)\n```\n\n## Artist Search\n\nSearch for artists in our database.\n\nParameters:\n\n- q_artist - The song artist.\n- f_artist_id - When set, filter by this artist id.\n- f_artist_mbid - When set, filter by this artist musicbrainz id.\n- page - Define the page number for paginated results.\n- page_size - Define the page size for paginated results (range is 1 to 100).\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.artist_search('prodigy', 1, 1, 16439, '4a4ee089-93b1-4470-af9a-6ff575d32704')\n```\n\n## Artist Album Get\n\nGet the album discography of an artist.\n\nParameters:\n\n- artist_id - Musixmatch artist id.\n- artist_mbid - Musicbrainz artist id.\n- g_album_name - Group by Album Name.\n- s_release_date - Sort by release date (asc|desc).\n- page - Define the page number for paginated results.\n- page_size - Define the page size for paginated results (range is 1 to 100).\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.artist_albums_get(1039, 1, 1, 1, 'desc')\n```\n\n## Artist Related Get\n\nGet a list of artists somehow related to a given one.\n\nParameters:\n\n- artist_id - Musixmatch artist id.\n- artist_mbid - Musicbrainz artist id.\n- page - Define the page number for paginated results.\n- page_size - Define the page size for paginated results (range is 1 to 100).\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.artist_related_get(56, 1, 1)\n```\n\n## Album Get\n\nGet an album from our database: name, release_date, release_type, cover art.\n\nParameters:\n\n- album_id - The musiXmatch album id\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.album_get(14250417)\n```\n\n## Album Tracks Get\n\nThis api provides you the list of the songs of an album.\n\nParameters:\n\n- album_id - Musixmatch album id.\n- album_mbid - Musicbrainz album id.\n- f_has_lyrics - When set, filter only contents with lyrics.\n- page - Define the page number for paginated results.\n- page_size - Define the page size for paginated results (range is 1 to 100).\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.album_tracks_get(13750844, 1, 1, '')\n```\n\n## Tracking Url Get\n\nGet the base url for the tracking script\n\nWith this api you’ll be able to get the base url for the tracking script you need to insert in your page to legalize your existent lyrics library.\n\nRead more here: rights-clearance-on-your-existing-catalog\n\nIn case you’re fetching the lyrics by the musiXmatch api called track.lyrics.get you don’t need to implement this API call.\n\nParameters:\n\n- domain - Your domain name.\n- format - Decide the output type json or xml (default json).\n\n```python\n\u003e\u003e\u003e musixmatch.album_tracks_get(13750844, 1, 1, '')\n```\n\n## Catalogue Dump Get\n\nGet the list of our songs with the lyrics last updated information\n\nCATALOGUE_COMMONTRACKS\n\nDump of our catalogue in this format:\n\n```python\n{\n    \"track_name\": \"Shape of you\",\n    \"artist_name\": \"Ed Sheeran\",\n\t\"commontrack_id\": 12075763,\n    \"instrumental\": false,\n    \"has_lyrics\": yes,\n    \"updated_time\": \"2013-04-08T09:28:40Z\"\n}\n```\n\nNote: This method requires a commercial plan.\n\n```python\n\u003e\u003e\u003e musixmatch.catalogue_dump_get('test')\n```\n\n# Features\n\n- [x] [Chart Artists Get](https://developer.musixmatch.com/documentation/api-reference/artist-chart-get)\n- [x] [Chart Track Get](https://developer.musixmatch.com/documentation/api-reference/track-chart-get)\n- [x] [Track Search](https://developer.musixmatch.com/documentation/api-reference/track-search)\n- [x] [Track Get](https://developer.musixmatch.com/documentation/api-reference/track-get)\n- [x] [Track Lyrics Get](https://developer.musixmatch.com/documentation/api-reference/track-lyrics-get)\n- [x] [Track Snippet Get](https://developer.musixmatch.com/documentation/api-reference/track-snippet-get)\n- [x] [Track Subtitle Get](https://developer.musixmatch.com/documentation/api-reference/track-subtitle-get)\n- [x] [Track Richsync Get](https://developer.musixmatch.com/documentation/api-reference/track-richsync-get)\n- [x] [Track Lyrics Post](https://developer.musixmatch.com/documentation/api-reference/track-lyrics-post)\n- [x] [Track Lyrics Feedback Post](https://developer.musixmatch.com/documentation/api-reference/track-lyrics-feedback-post)\n- [x] [Matcher Lyrics Get](https://developer.musixmatch.com/documentation/api-reference/matcher-lyrics-get)\n- [x] [Matcher Track Get](https://developer.musixmatch.com/documentation/api-reference/matcher-track-get)\n- [x] [Matcher Subtitle Get](https://developer.musixmatch.com/documentation/api-reference/matcher-subtitle-get)\n- [x] [Artist Get](https://developer.musixmatch.com/documentation/api-reference/artist-get)\n- [x] [Artist Search](https://developer.musixmatch.com/documentation/api-reference/artist-search)\n- [x] [Artist Albums Get](https://developer.musixmatch.com/documentation/api-reference/artist-albums-get)\n- [x] [Artist Related Get](https://developer.musixmatch.com/documentation/api-reference/artist-related-get)\n- [x] [Album Get](https://developer.musixmatch.com/documentation/api-reference/album-get)\n- [x] [Album Tracks Get](https://developer.musixmatch.com/documentation/api-reference/album-tracks-get)\n- [x] [Tracking Url Get](https://developer.musixmatch.com/documentation/api-reference/tracking-url-get)\n- [x] [Catalogue Dump Get](https://developer.musixmatch.com/documentation/api-reference/catalogue-dump-get)\n\n# Dependencies\n\n- Python 3.5\n- [Pipenv](https://github.com/kennethreitz/pipenv)\n- [requests](http://docs.python-requests.org/en/latest/)\n\n# License\n\n[MIT](http://en.wikipedia.org/wiki/MIT_License)\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhudsonbrendon%2Fpython-musixmatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhudsonbrendon%2Fpython-musixmatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhudsonbrendon%2Fpython-musixmatch/lists"}