Forums » Feature Requests Search

Search artists by their hometown or current city? New Reply

Author Post
Posts: 25
Registered: Feb 27, 2009

I'd love to build an app that allows bands to be browsed by their hometown or current location. For example, you could view a comprehensive, interactive list of all the bands based in Boston.

I don't see anything that would allow me to do this in the EchoNest api, and I of course understand the complexity of finding this data for every band out there. Facebook does have 'hometown' and 'current_location' for bands, though sometimes the info isn't filled in. These are also a non-indexable columns, so unfortunately I can't use FQL (Facebook Query Language) to, say, sort by all artists who list "Boston, MA" as their current location.

Perhaps EchoNest could scrape each band's FB page to grab this info? Anyhow, not sure how to get it done, but would open some really cool possibilities to have this info to play with.

  • Jordan
Posts: 206
Registered: Sep 05, 2008

You can do this with artist/search and the latitude and longitude parameters. We have artist location for a very large percentage of our database.

Posts: 25
Registered: Feb 27, 2009

Thanks Brian! Hmm, I still can't seem to find any of the specs for latitude or longitude on http://developer.echonest.com/docs/v4/artist.html

And when I try 'latitude' or 'min_latitude', I get an error message that these are invalid parameters.

This is one call I tried that didn't work: http://developer.echonest.com/api/v4/artist/search?api_key=MY_API_KEY&format=json&results=20&latitude=42.3583&longitude=71.0603

Posts: 46
Registered: Dec 05, 2008

Try this http://developer.echonest.com/api/v4/artist/search?api_key=YOUR_API_KEY&artist_location=^boston,ma&bucket=artist_location - this API is in beta at the moment or you can use lat/long of the artists while searching for songs - http://developer.echonest.com/api/v4/song/search?sort=song_hotttnesss-desc&results=100&min_latitude=40&api_key=YOUR_API_KEY&bucket=artist_familiarity&bucket=song_hotttnesss&limit=false&bucket=artist_location

Posts: 25
Registered: Feb 27, 2009

Sweet, the first one is just what I'm looking for. Thanks @yfaktor!

Posts: 3
Registered: Mar 14, 2011

Hey. This is exactly what I was looking for. Besides, is there a way to get the total number of artists by town/city/location? I mean, no specific results, just the artist count.

Thanks in advance.

JP

Posts: 1109
Registered: Sep 08, 2008

jpcarrascal - sorry, no way to do that just now.

-- Paul

Posts: 3
Registered: Mar 14, 2011

Thanks plamere. One last question on the topic. With the sample queries mentioned above "start + results must be less than 1000". Should I assume then that it is not possible to find more than 1000 artists per location? Is there a way to go beyond that limit?

JP

Posts: 1109
Registered: Sep 08, 2008

jp - that is correct. There's no way to go beyond 1000. -- Paul

Posts: 3
Registered: Mar 14, 2011

Hi. Since you are constantly adding new features, I am asking again (hopefully it won't hurt ;) if it's possible to get the total number of artists per city. Since the maximum amount of artist that can be obtained with the artist methods is 1000, I cannot calculate such number for cities with more than 1000 artists. And in any case, even if the 1000 limit was not set, I'm not willing to download all your database to obtain the numbers.

I just would like to know if this has changed.

Thanks in advance.

JP

Reply to this Thread

You must log in to post a reply.