How can I export my Shazam tagged songs list?

Search This thread

KraFT_mk

Senior Member
Feb 12, 2008
251
8
Macedonia
Before formatting my TD2 I made a full backup.
Now I want to transfer my Shazam tagged songs list back.
Simple copy paste from the backup is not working.
Where Shazam is keeping the list of tagged songs?
How do I export that list?
__________
Update: found it!
Can someone please open this attached shazam.db (from shazam for wm 6.5 ) and return the song list , date and time in some other format? xls, cvs etc.
Thanks!
 

Attachments

  • Shazam.zip
    225.5 KB · Views: 1,588
Last edited:

MachEnergy

New member
Jun 29, 2010
1
0
Did you have any luck with this? I was hoping to do the same thing, but I hit a wall when I realized that I don't know how to access files on my Droid's internal storage. Would you mind pointing me in the right direction?
 

kokenjr

Member
Jun 23, 2009
26
1
I whipped a quick app (attached below) that can back up the shazam database file to your SDCard (in folder "shazambackup") and restores it need be.

Also you can export the Tagged songs to xml (saved as "exports.xml" in the "shazambackup" folder).

Next i'll probably parse the xml to a more readable format. Maybe CSV? or just Plain Text? Any ideas are welcome! :)

Let me know if you have any issues. So far i've only tested it on my G1. Must also have a rooted phone for any of this to work.
 

Attachments

  • com.kokenjr.android.shazambackup.apk
    18.8 KB · Views: 5,954
Last edited:

KraFT_mk

Senior Member
Feb 12, 2008
251
8
Macedonia
Can you please open this shazam.db (from wp6.5) and return the song list , date and time in some other format? xls, cvs etc.
Thanks!
 

Attachments

  • Shazam.zip
    225.5 KB · Views: 722

p666nn

Member
Feb 23, 2008
5
2
I whipped a quick app (attached below) that can back up the shazam database file to your SDCard (in folder "shazambackup") and restores it need be.

Also you can export the Tagged songs to xml (saved as "exports.xml" in the "shazambackup" folder).

Next i'll probably parse the xml to a more readable format. Maybe CSV? or just Plain Text? Any ideas are welcome! :)

Let me know if you have any issues. So far i've only tested it on my G1. Must also have a rooted phone for any of this to work.

Does not work properly on Desire. Opens the app after installation but "backup" button does not create the backup file and "Export to XML" makes the app force close without exporting anything.

About the export feature - the CSV version would probably be the best.

Thanks!
 
  • Like
Reactions: Sneakyghost

spectas

New member
Jul 28, 2012
3
0
Solution with SQLite

Hi everybody,

I found a solution to export the list via SQLite. I had to find it for myself as I found nothing on the web, but I put it here, so perhaps somebody else is looking for such a solution as well.

This explanation is about how to get Shazam's data base file from your Android phone, access it on your computer and export a list of your tagged songs.

1. COPY FILE FROM PHONE
The data is stored in the file on your Android:
/data/data/com.shazam.android/databases/library.db

You have to copy this file to your Computer to work with it. Probably everybody does this in a different way. Mine was probably a bit more difficult than necessary, there should be simpler ways (e.g. with ssh / scp), but mine was: Opening the Android app "Terminal" and typing in the command:
Code:
cp /data/data/com.shazam.android/databases/library.db /sdcard
Then the file was copyed on the sdcard, which I could access to with my computer via USB cable.

Then you need a program which can open SQLite-Files. There is the command line tool (at least in Linux) "sqlite3", but also graphical tools for Linux/Windows/Mac like the "sqlitebrowser" (Link: sourceforge.net/projects/sqlitebrowser).

2. OUTPUT FROM DATA BASE:
In every of these tools, you can execute SQL-commands. For my output I chose:
Code:
SELECT a.name , t.title, t.subtitle, t.album, t.subgenre_name, tg.short_datetime, tg.location_name , tg.lat, tg.lon 
FROM artist a, artist_track at, track t, tag tg 
WHERE a.id = at.artist_id AND at.track_id = t._id AND tg.track_id = t._id ORDER BY tg.timestamp;
This command displays a list of the songs, ordered by their timestamp.

So with the command line tool "sqlite3" you just type in:
sqlite3 -line /tmp/library.db "SELECT a.name , t.title, t.subtitle, t.album, t.subgenre_name, tg.short_datetime, tg.location_name , tg.lat, tg.lon FROM artist a, artist_track at, track t, tag tg WHERE a.id = at.artist_id AND at.track_id = t._id AND tg.track_id = t._id ORDER BY tg.timestamp;"
The output is in lines, you could also let put this in a text file by e.g. adding to this command:
"[see above] > shazam-tracks.txt"
There is also a way to export the data into an html table (just the table, no complete html file), by changing "-line" for "-html". For further details on how to export everything to a different file format (CVS etc) have a look on the Manpage of sqlite3 (command "man sqlite3").

With the graphical tool "sqlitebrowser" it is imho only possible to show this list, not to export it to a textfile. After having opened the .db-file with the program, you chose the tab "Execute SQL" and put there the above SQL command ("SELECT [...]"). Voilà!

3. DETAILS:
What I do like this is combining the necessary data of the database. They are spread over several tables. There is a table "artist" with the list of the artists and their unique ids. Then there is the same for the tracks, "track". In the "artist_track" table there is listed, which artist's id belongs tho which track's id. Finally in the table "tag" there are additional data like the time stamp of the song and even it's geo data tag.
With the SQLite program you can easily watch all the data and add / remove data from the SQL command, as you wish.

So far, I hope, I could help somebody? :)

Greetings, spectas
 

Flyview

Senior Member
May 17, 2010
2,557
1,675
Toronto/San Diego
Hi everybody,

I found a solution to export the list via SQLite. I had to find it for myself as I found nothing on the web, but I put it here, so perhaps somebody else is looking for such a solution as well.

This explanation is about how to get Shazam's data base file from your Android phone, access it on your computer and export a list of your tagged songs.

1. COPY FILE FROM PHONE
The data is stored in the file on your Android:
/data/data/com.shazam.android/databases/library.db

You have to copy this file to your Computer to work with it. Probably everybody does this in a different way. Mine was probably a bit more difficult than necessary, there should be simpler ways (e.g. with ssh / scp), but mine was: Opening the Android app "Terminal" and typing in the command:
Code:
cp /data/data/com.shazam.android/databases/library.db /sdcard
Then the file was copyed on the sdcard, which I could access to with my computer via USB cable.

Then you need a program which can open SQLite-Files. There is the command line tool (at least in Linux) "sqlite3", but also graphical tools for Linux/Windows/Mac like the "sqlitebrowser" (Link: sourceforge.net/projects/sqlitebrowser).

2. OUTPUT FROM DATA BASE:
In every of these tools, you can execute SQL-commands. For my output I chose:
Code:
SELECT a.name , t.title, t.subtitle, t.album, t.subgenre_name, tg.short_datetime, tg.location_name , tg.lat, tg.lon 
FROM artist a, artist_track at, track t, tag tg 
WHERE a.id = at.artist_id AND at.track_id = t._id AND tg.track_id = t._id ORDER BY tg.timestamp;
This command displays a list of the songs, ordered by their timestamp.

So with the command line tool "sqlite3" you just type in:

The output is in lines, you could also let put this in a text file by e.g. adding to this command:
There is also a way to export the data into an html table (just the table, no complete html file), by changing "-line" for "-html". For further details on how to export everything to a different file format (CVS etc) have a look on the Manpage of sqlite3 (command "man sqlite3").

With the graphical tool "sqlitebrowser" it is imho only possible to show this list, not to export it to a textfile. After having opened the .db-file with the program, you chose the tab "Execute SQL" and put there the above SQL command ("SELECT [...]"). Voilà!

3. DETAILS:
What I do like this is combining the necessary data of the database. They are spread over several tables. There is a table "artist" with the list of the artists and their unique ids. Then there is the same for the tracks, "track". In the "artist_track" table there is listed, which artist's id belongs tho which track's id. Finally in the table "tag" there are additional data like the time stamp of the song and even it's geo data tag.
With the SQLite program you can easily watch all the data and add / remove data from the SQL command, as you wish.

So far, I hope, I could help somebody? :)

Greetings, spectas

Thanks!!! It helped me since Shazam no longer gets past the setup screen!

I found that with SQliteExport you can use your same command above and export to a file of your choice, for example, xls or csv. Here's the link to the little program:

http://www.speqmath.com/tutorials/sqlite_export/index.html
 

KraFT_mk

Senior Member
Feb 12, 2008
251
8
Macedonia
Thanks!!! It helped me since Shazam no longer gets past the setup screen!

I found that with SQliteExport you can use your same command above and export to a file of your choice, for example, xls or csv. Here's the link to the little program:

http://www.speqmath.com/tutorials/sqlite_export/index.html

Tried but cant do it. I need step by step instruction. Or better, can someone just export the db that I attached? (See OP - first post - shazam.db ?)
Thanks
K
 

snakesight

Member
Dec 3, 2012
12
1
Hello I am new on the forum. I've learned a lot of things in this website, it's time to payback

I’ve got another solution to this issue….

1.-Download this plugin for Firefox.
addons.mozilla.org/es/firefox/addon/sqlite-manager

2.- In Firefox – Tools, select SQLite Manager

3.- In the new window select database – connect database – then open your db from shazam

4.- Then you’ll see two panels. on left panel select track and on right panel, select browse and search then you’ll be able to see all your tag info

5.- On the left panel select track – right click – export table, select csv on right panel then ok.

6.- Open your new saved database with any office (word, excel)

7.- That’s all
 
Last edited:

joeyla

New member
Dec 7, 2012
3
0
Shazam Tags

Hello I am new on the forum. I've learned a lot of things in this website, it's time to payback

I’ve got another solution to this issue….

1.-Download this plugin for Firefox.
addons.mozilla.org/es/firefox/addon/sqlite-manager

2.- In Firefox – Tools, select SQLite Manager

3.- In the new window select database – connect database – then open your db from shazam

4.- Then you’ll see two panels. on left panel select track and on right panel, select browse and search then you’ll be able to see all your tag info

5.- On the left panel select track – right click – export table, select csv on right panel then ok.

6.- Open your new saved database with any office (word, excel)

7.- That’s all

This above works well nice one.

I was trying to do my own program before I saw this.I'm not a programmer but I stuck together a few bits of code I found and hopefully works you you. Use android app Root Browser Lite to copy file from data/data/com.shazam.android/databases/library.db to your sd card. Or use the app posted earlier which does this for you.

Put library.db file from you Shazam backup in the same folder as this program and run program and hit 'GetTags' and should get CSV and htm versions of your tags. No error checking or anything fancy in this program. Requires .NET 3.5. May only work on 32-bit machines. I'd like to enhance this and will if people find it useful.

How results should look.
 

Attachments

  • MyShazTags.zip
    326.9 KB · Views: 710
  • Shaz.JPG
    Shaz.JPG
    61.6 KB · Views: 1,527
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    My Shazam to Youtube playlist export

    I've found a much easier way then digging running buggy SQL queries:
    1. Open Fiddler 4 (https://www.telerik.com/download/fiddler) (or use the Chrome Developer tools)
    2. Goto 'Filters' tab, and set: Hosts => Show only the following Hosts: "*.shazam.com"
    3. Goto https://www.shazam.com/myshazam in your browser
    4. Now to the interesting part: you need to find a row, that contains '/discovery' API endpoint and the 'limit' URL param. Example URL: https://www.shazam.com/discovery/v4/en-US/IL/web/-/tag/02B422B0-AB98-4AEF-AC83-7AF4EFABAB74?limit=20 It should look like this:
      hKjBtiI.png
      . P.S: It might be several rows like that (in case you scrolled down when browsing)
    5. Right click this row => Copy => Just URL (CTRL+U)
    6. Go to the browser, and paste the link. Now, BEFORE YOU CLICK ENTER, edit the 'limit' url param to maximum, so you retrieve all your tags in once.
    7. Wait for a JSON output, containing ALL YOUR TAGS! P.S You may want to use a JSON viewer extension for chrome for pretty JSON output.
    8. Go to the following site to extract Shazam tag names: http://jsonpath.com/
    9. There, you can use a JSONPath Syntax like this to extract the song name: $..share.subject . For more information regarding JSONPath Syntax: http://goessner.net/articles/JsonPath/index.html
    10. You can use this wonderful service to import your shazam list to your youtube playlist: http://mixbla.st/ .
    11. You can link/connect to your Youtube account, and save the created playlist!
    2
    I've found a much easier way then digging running buggy SQL queries:
    1. Open Fiddler 4 (https://www.telerik.com/download/fiddler) (or use the Chrome Developer tools)
    2. Goto 'Filters' tab, and set: Hosts => Show only the following Hosts: "*.shazam.com"
    3. Goto https://www.shazam.com/myshazam in your browser
    4. Now to the interesting part: you need to find a row, that contains '/discovery' API endpoint and the 'limit' URL param. Example URL: https://www.shazam.com/discovery/v4/en-US/IL/web/-/tag/02B422B0-AB98-4AEF-AC83-7AF4EFABAB74?limit=20 It should look like this:
      hKjBtiI.png
      . P.S: It might be several rows like that (in case you scrolled down when browsing)
    5. Right click this row => Copy => Just URL (CTRL+U)
    6. Go to the browser, and paste the link. Now, BEFORE YOU CLICK ENTER, edit the 'limit' url param to maximum, so you retrieve all your tags in once.
    7. Wait for a JSON output, containing ALL YOUR TAGS! P.S You may want to use a JSON viewer extension for chrome for pretty JSON output.
    8. Go to the following site to extract Shazam tag names: http://jsonpath.com/
    9. There, you can use a JSONPath Syntax like this to extract the song name: $..share.subject . For more information regarding JSONPath Syntax: http://goessner.net/articles/JsonPath/index.html
    10. You can use this wonderful service to import your shazam list to your youtube playlist: http://mixbla.st/ .
    11. You can link/connect to your Youtube account, and save the created playlist!



    Now THAT is a brilliant find.

    Here is an ever faster/easier way to use that method.

    1) Open up Chrome/Firefox, hit F12 to open up webdev tools, switch to Network tab, and then go to https://www.shazam.com/myshazam

    2) Find that https://www.shazam.com/discovery/v4/en-US/IL/web/-/tag/02B422B0-AB98-4AEF-AC83-7AF4EFABAB74?limit=20 parameter, change the limit=2000 in that URL (or more, if your Shazam list is bigger than 2000 songs), and then load that URL.

    3) Copy that page JSON code into https://konklone.io/json/ and it will give you tabular data with an easy CSV export link too.

    Problem solved. And no need to learn / figure out how to use JSON. Voila!

    Thanks for that catch again, amigo!
    2
    Good work diman!

    So Shazam now seem to offer a CSV export, solving this issue once and for all!

    You can export the file by logging into Shazam and heading to this page - https://www.shazam.com/myshazam

    There you will see a "DOWNLOAD CSV" button.

    -----------------------

    As an aside, here is the app I've developed - https://shazam2discogs.olikester.com/

    This takes a CSV file of Shazam Tags and adds them to your Discogs Wantlist.

    Source code is available here -

    https://github.com/oli-kester/shazam2discogs
    2
    Aha, I figured it out!

    Your post made me think about the different sign-in methods, and it seems that you gotta use the Facebook sign in option to get the old V4 API. The Apple / Google methods could work too, but my account isn't linked to those.

    One thing I know for sure, don't use the email sign-in like I did - this gives you the much less hacker-friendly V5 access.

    Thanks for your help friend. It seems like the Facebook login is pending removal. Who knows when Shazam will close the door on this? So I advise everyone to log in via Facebook and grab your data while you still can! Use the methods posted above.

    Sure, you're welcome.
    Ok, so here is a (very) quick and dirty way to start with V5 API export:
    1. Open Chrome developer tools and load ALL your Shazams by scrolling all the way down.
    2. Save all calls by choosing the option: "Save all as HAR with content"
    gWlRYxE

    3. Use this online tool: https://hintdesk.github.io/networkhartocsv/input or a Java util: https://www.yamamoto.com.ar/blog/?p=201 to convert har to csv format (better use the java tool, as HAR files can grow very big and it's a bad idea to clip-paste its content to browser window).
    4. Once you've converted to csv, it's up to you what tools to use. Basically, I've quickly extracted all /discovery endpoints using Notepad++ (my favorite text editor), so you get a nice list like this:
    Code:
    https://www.shazam.com/discovery/v5/en-US/IL/web/-/track/333457?shazamapiversion=v3&video=v3
    https://www.shazam.com/discovery/v5/en-US/IL/web/-/track/511537540?shazamapiversion=v3&video=v3	
    https://www.shazam.com/discovery/v5/en-US/IL/web/-/track/460794412?shazamapiversion=v3&video=v3	
    https://www.shazam.com/discovery/v5/en-US/IL/web/-/track/370160230?shazamapiversion=v3&video=v3	
    https://www.shazam.com/discovery/v5/en-US/IL/web/-/track/320159957?shazamapiversion=v3&video=v3	
    https://www.shazam.com/discovery/v5/en-US/IL/web/-/track/121729974?shazamapiversion=v3&video=v3	
    https://www.shazam.com/discovery/v5/en-US/IL/web/-/track/456484798?shazamapiversion=v3&video=v3	
    https://www.shazam.com/discovery/v5/en-US/IL/web/-/track/10099399?shazamapiversion=v3&video=v3
    https://www.shazam.com/discovery/v5/en-US/IL/web/-/track/10099381?shazamapiversion=v3&video=v3
    https://www.shazam.com/discovery/v5/en-US/IL/web/-/track/332937961?shazamapiversion=v3&video=v3
    5. From here you can run the following python script/app I've created: https://gist.github.com/diman82/5439d5abe8d9c295db9ad26d376d602c - you input urls file and it outputs songs.json file which you can use in various online services as previously described.
    2 minor problems at the moment:
    1. https://github.com/encode/httpx/issues/914 - nothing I can do, should be fixed on asyncio side, but this doesn't affect the script runtime, it only ends with failure (but songs.json file is still produced)
    2. For non UF-8 characters, output produced is gibberish - will fix this issue when I've more time

    P.S Please press 'Thanks', as it took me some efforts to create this python utility! :)
    1
    I whipped a quick app (attached below) that can back up the shazam database file to your SDCard (in folder "shazambackup") and restores it need be.

    Also you can export the Tagged songs to xml (saved as "exports.xml" in the "shazambackup" folder).

    Next i'll probably parse the xml to a more readable format. Maybe CSV? or just Plain Text? Any ideas are welcome! :)

    Let me know if you have any issues. So far i've only tested it on my G1. Must also have a rooted phone for any of this to work.

    Does not work properly on Desire. Opens the app after installation but "backup" button does not create the backup file and "Export to XML" makes the app force close without exporting anything.

    About the export feature - the CSV version would probably be the best.

    Thanks!