Using your IDs with taste profiles

This tutorial shows you how you can use your own IDs with various Echo Nest APIs

Details

You may have your own ID system for artists and songs that you'd like to use with the Echo Nest API. For instance, instead of calling the artist/similar method with the Echo Nest Artist ID for the seed artist you may like to use your own ID for the seed artist. You can use taste profiles to help you define your own ID space that you can then use in all of the various Echo Nest calls. When you create a taste profile and add items to the underlying catalog, you give each item an ID. You can use this ID in conjunction with the catalog ID and the item type to build a unique ID that you can use with the Echo Nest APIs. For example consider the WHTZ artist catalog. One of the entries is for the artist Rihanna. The entry looks like so:

        {
            "artist_id": "ARKU3Z61187FB51DCA", 
            "artist_name": "Rihanna", 
            "date_added": "2010-10-31T13:56:07", 
            "foreign_id": "CAOCJCS12C028B69A6:artist:Rihanna", 
            "play_count": 368, 
            "request": {
                "artist_name": "Rihanna", 
                "item_id": "Rihanna"
            }
        } 
The item_id that was given for Rihanna when the catalog was created is 'Rihanna'. When this item was resolved it was assigned a foreign_id based on the catalog id, the catalog type and the item id. So for this item we get a foreign id of
CAOCJCS12C028B69A6:artist:Rihanna
We can use this ID in any context where we could normally use an Echo Nest artist ID. For example, we can get artists similar to Rihanna with the call:

Example

Response

{
    "response": {
        "artists": [
            {
                "id": "ARDUIMG1187B9B9498", 
                "name": "Christina Milian"
            }, 
            {
                "id": "AR5DC8S1187B9958BE", 
                "name": "Mary J. Blige"
            }, 
            {
                "id": "ARTDQRC1187FB4EFD4", 
                "name": "The Black Eyed Peas"
            }, 
            {
                "id": "AR0FXTC1187FB46FEC", 
                "name": "Nicole Scherzinger"
            }, 
            {
                "id": "ARZ33PH1187FB52F58", 
                "name": "Kat DeLuna"
            }
        ], 
        "status": {
            "code": 0, 
            "message": "Success", 
            "version": "4.2"
        }
    }
}