Normalized SQLite export of all Magnatune data
Download from:
/info/sqlite_normalized.db
or
/info/sqlite_normalized.db.gz
or, the smallest download, a gzipped SQL dump of the same data:
/info/sqlite_normalized.sql.gz
You should be able to open the database file up directly from inside SQLite. Feel free to have your own software program(s) automatically download from this URL, it is stable. Please download the gzipped version of the file if you have gzipping capability on your platform.
sqlite_normalized.sql.gz is a gzipped SQL text dump (the CREATE TABLE and INSERT statements) of the exact same catalog. It is about 27% smaller to download than sqlite_normalized.db.gz, because a SQLite database file also stores index b-trees and page padding, whereas the SQL dump is plain text that gzip compresses much harder. Note that it is not itself a ready-to-open database file: after un-gzipping it, run the SQL into a new, empty SQLite database to rebuild an identical catalog, for example:
gunzip sqlite_normalized.sql.gz
sqlite3 sqlite_normalized.db < sqlite_normalized.sql
Tables exported: artists, albums, songs, genres, subgenres, collections, genres_albums, subgenres_albums, collections_albums, playlists, playlist_songs, recommendations.
Explanation:
- Artists have albums and there is a column to tell you the artists' (collecting) society
- Albums have songs and genres and subgenres and collections
- recommendations gives, per album, the "if you like this, also try…" albums: recommendations(album_id, recommended_album_id, rank), where rank 1 is the best match
- playlists + playlist_songs are the Magnatune-curated playlists
Notes:
A URL to play a song is created with this pseudo code:
url = "/all/".urlenc($mp3)
Where "urlenc" is a function that replaces " " with "%20" to make a valid URL.
----------
A URL to download an album is created with this pseudo code:
url = "/music/urlenc($artist)/urlenc($album)/urlenc($sku)-format.zip"
Where "urlenc" is a function that replaces " " with "%20" to make a valid URL.
and where "format" is one of: "vbr" "wav" "mp3" "flac" "aac" "alac" "ogg" "opus"
for example:
/music/Amoeba/Pivot/amoeba-pivot-flac.zip
Download URLs are HTTP-AUTH protected, so you'll need to use your membership account to access the file. Here is a wget comment example:
wget -c --http-user=$user --http-passwd=$password "/music/Amoeba/Pivot/amoeba-pivot-flac.zip
----------
An artist's page is located at:
url = "/artists/".$page
----------
An album's page is located at:
url = "/artists/albums/".urlenc($sku)
Where "urlenc" is a function that replaces " " with "%20" to make a valid URL.
----------
Cover art is available at this url:
url = "/music/".urlenc($artist)."/".urlenc(album)."/cover_100.jpg"
Where "urlenc" is a function that replaces " " with "%20" to make a valid URL.
Cover art is available in a variety of sizes, and is always square:
cover_50.jpg
cover_75.jpg
cover_100.jpg
cover_160.jpg
cover_200.jpg
cover_300.jpg
cover_600.jpg
cover_1400.jpg
Sample data:
artists(artist) = Zilla
artists(city) = (this is empty if artist is from the USA)
artists(country) = USA
artists(description) = live, improvised electronica
artists(homepage) = zilla
artists(state) = CO (this is empty if artist is from outside the USA)
======================
albums(albumname) = Egg (Note: album names are unique at Magnatune)
albums(artist) = Zilla
albums(launchdate) = 1159513200
albums(sku) = zilla-egg
albums(upc) = 876809005078
======================
collections(albumname) = Egg
collections(collection) = Experimental Electronic
======================
genres(albumname) = Egg
genres(genre) = Electronica
======================
songs(albumname) = Egg
songs(desc) = Soupy Sails
songs(duration) = 357
songs(mp3) = 13-Soupy Sails-Zilla.mp3
======================