How do I use the Echonest API Start Parameter?

134 views Asked by At

I am following the examples located on the following page:

http://developer.echonest.com/docs/v4/genre.html#artists

I'd like to offset the results from a search for artists by genre. The example they provide on the page listed "results" and "start". I assume "start" is the offset. The example query they provide is:

http://developer.echonest.com/api/v4/genre/artists?api_key=JEXNQ223JXCCQEINO&format=json&results=5&start=0&bucket=hotttnesss&name=jazz

But I get any error stating the "start" is an invalid parameter. Has anyone been able to use the "start" parameter with success?

1

There are 1 answers

0
David W Gray On

This looks like a bug in their example. If you read the documentation, "start" and "results" are not valid for the genre/artists endpoint. Changing the example to remove these to parameters works.

Calling:

http://developer.echonest.com/api/v4/genre/artists?api_key=*********&format=json&bucket=hotttnesss&name=jazz

(replace the *** with your Key)

Yields:

{  
    "response":{  
        "status":{  
            "version":"4.2",
            "code":0,
            "message":"Success"
        },
        "artists":[  
            {  
                "name":"John Coltrane",
                "hotttnesss":0.588225,
                "id":"ARIOZCU1187FB3A3DC"
            },
            {  
                "name":"Thelonious Monk",
                "hotttnesss":0.649332,
                "id":"AR9PLH11187FB58A87"
            },
            {  
                "name":"Miles Davis",
                "hotttnesss":0.697302,
                "id":"AR7RTGF1187FB38793"
            },
            {  
                "name":"Miles Davis Quintet",
                "hotttnesss":0.489603,
                "id":"AR5DF1C1187FB4E94C"
            },
            {  
                "name":"Cannonball Adderley",
                "hotttnesss":0.560071,
                "id":"ARQ5TM41187FB3E97D"
            },
            {  
                "name":"Wayne Shorter",
                "hotttnesss":0.548165,
                "id":"ARO3CKW1187B9905A8"
            },
            {  
                "name":"Wynton Marsalis",
                "hotttnesss":0.566708,
                "id":"ARV3VEI1187B9AD5C9"
            },
            {  
                "name":"Sonny Rollins",
                "hotttnesss":0.577764,
                "id":"AR6Q4T91187B995616"
            },
            {  
                "name":"The Dave Brubeck Quartet",
                "hotttnesss":0.570099,
                "id":"ARLKR161187FB50694"
            },
            {  
                "name":"Kenny Burrell",
                "hotttnesss":0.543388,
                "id":"ARQYH461187FB3E975"
            },
            {  
                "name":"Stan Getz",
                "hotttnesss":0.559735,
                "id":"ARMGQLA1187B9AEBF8"
            },
            {  
                "name":"Dizzy Gillespie",
                "hotttnesss":0.561122,
                "id":"ARXA17J1187FB3B507"
            },
            {  
                "name":"Yusef Lateef",
                "hotttnesss":0.513261,
                "id":"ART95BW1187FB3AF79"
            },
            {  
                "name":"Bill Evans",
                "hotttnesss":0.581819,
                "id":"ARTLL9E1187FB4436F"
            },
            {  
                "name":"Freddie Hubbard",
                "hotttnesss":0.524227,
                "id":"ARU1K2U1187FB48529"
            }
        ]
    }
}

As far as I can tell, there isn't a way to page through the artists associated with a genre...