# Lost table of artists and albums but got recordings... Can I reverse query using the app?

**URL:** https://community.metabrainz.org/t/lost-table-of-artists-and-albums-but-got-recordings-can-i-reverse-query-using-the-app/520671
**Category:** MusicBrainz
**Tags:** api
**Created:** [February 22, 2021, 7:20pm UTC](https://community.metabrainz.org/t/lost-table-of-artists-and-albums-but-got-recordings-can-i-reverse-query-using-the-app/520671 "2021-02-22T19:20:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nazgyl](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/n/50afbb/32.png) [@nazgyl](https://community.metabrainz.org/u/nazgyl)
#### Post date: [February 22, 2021, 7:20pm UTC](https://community.metabrainz.org/t/lost-table-of-artists-and-albums-but-got-recordings-can-i-reverse-query-using-the-app/520671/1 "2021-02-22T19:20:04Z")

</div>

Hello all, so have been using the api to get artists-\>albums-\>tracks and save them in MySQL DB

Long story short, after 29k tracks and more than 19k albums and nearly 900 bands, I lost my artist table and albums table… All I have is the tracks (recording) table that contains mbid of each recording, position in the album…  
Is there a way to use this information to restore my albums and bands using the api?

Any guidance is appreciated

Edit: typos

---

<div class="post-metadata">

### Author: ![dns\_server](https://community.metabrainz.org/user_avatar/community.metabrainz.org/dns_server/32/175_2.png) [@dns\_server](https://community.metabrainz.org/u/dns_server)
#### Post date: [February 23, 2021, 9:20am UTC](https://community.metabrainz.org/t/lost-table-of-artists-and-albums-but-got-recordings-can-i-reverse-query-using-the-app/520671/2 "2021-02-23T09:20:02Z")

</div>

You can do a lookup of recordings to see what the artist is for that track.  
You can also get a list of albums this recording was found on and this can be a large list and include compilations.  
There may be several editions of a release ie the base release, a release with bonus tracks, a different edition in another country etc so you may need to decide what release is the one you want.

First lookup the recording to get the artist and the list of releases  
[https://musicbrainz.org/ws/2/recording/833f00e1-781f-4edd-90e4-e52712618862?inc=artists+releases&fmt=json](https://musicbrainz.org/ws/2/recording/833f00e1-781f-4edd-90e4-e52712618862?inc=artists+releases&fmt=json)  
Next look up the release to get the track list  
[https://musicbrainz.org/ws/2/release/e0aec533-0eb3-49ed-8293-4d650d2aa4eb?inc=recordings&fmt=json](https://musicbrainz.org/ws/2/release/e0aec533-0eb3-49ed-8293-4d650d2aa4eb?inc=recordings&fmt=json)
