How to get artist, album, or track metrics from Spotify API, if possible - spotify

I have been looking into the Spotify API over the last few days, and it's not clear to me whether any of the following information is available:
For artists, either their stream counts or album sales or any other metrics that indicate how popular an artist is.
Same for albums and tracks, any indication of popularity of the album or track
Here's output from their /get-artist endpoint for Kanye West:
We only receive a followers count of 16011935, which I assume is their Spotify followers, and a popularity of 95 that appears to be on a 0 - 100 scale and is presumably derived from the followers metric. As far as metrics for albums are concerned, from their /get-album endpoint:
Here we receive a popularity for Kanye's Donda album, but no other metrics associated with the album. And from their /get-track endpoint, there are no metrics at all associated with the track.
Am I missing something? Going into this, I sort of assumed that the Spotify web API would have some additional metrics on artists, albums, and tracks, but perhaps not?

Unfortunately you're correct in your analysis, as in Spotify APIs do not directly give access to any kind of streaming metrics. Also note that the popularity is a dynamic metric which changes over time, not only related to follower counts. An alternative way to get some kind of streaming info would be to look at external data sources, such as last.fm, but of course this requires you to match the two APIs.

Related

Instagram API receiving unrelated media for specified hashtag

I'm currently making requests to the Instagram API. Specifically, the endpoint https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN (specified here).
Using the example tag doggo, I'm receiving mostly responses whose JSON tags contain doggo; however, I also receive media with empty tags entries:
Would anybody happen to know why this sort of situation might occur? The range of untagged media that appears to slip in varies wildly in relevance to the specified tag, so I'm curious if this is a bug or some sort of Instagram algorithm to infer a media item's relevance to the specified tag.
Thanks!

Foursquare: Leveraging Search and Explore

Is their a compromise between using the categoriesID of the search endpoint and the extended information given from the explore endpoint. I seem to be having issues querying specified venues queried using their categories ID and also having an extended list of information regarding the venue
In order to associate venues you filtered with categoryId in search with their detail information (like tags, tips, photos, etc), I recommend you make a second call to the venue detail endpoint.
Yes, this means you would have to do one request to venue detail per resulting venue filtered in search.
Foursquare does not match these two together for you.

users/*/playlists not returning starred/collaborative playlists

Last week calls to users/{user_id}/playlists returned a complete list of the users playlists, which included:
their own starred playlists
starred playlists they subscribe too
collaborative playlists they created/subscribed to
Now, this endpoint doesn't seem to return any of these items.
For example, I have a playlist which returns fine UNTIL I change it to be collaborative... then it is no longer in the response.
I have tested this with various combinations of scope authentication.
The /users/{user_id}/playlists endpoint is not guaranteed to return starred tracks. We'll add a specific endpoint to retrieve starred tracks in a very near future, and we'll announce the changes in the change log.
Collaborative playlists are never returned regardless of scope, which is the current intended behaviour. This is covered in the documentation for users/{user_id}/playlists.
Note that a user's collaborative playlists are not currently
retrievable.
We're doing a lot of thinking about how to allow developers to work with collaborative playlists, so please stay tuned for news on the Developer site.

How to grab instagram users based on a hashtag?

is there a way to grab instagram users based on a specific hashtag ?
I run contests based on re posting photos with specified hashtag then randomly pick a winner, i need a tool that can grab the usernames of those who reposted that photo and used that hashtag.
You can query instagram using the API. There are official clients for both python and ruby.
You didn't specify what language/platform you are using, so I'll give you the generic approach.
Query instagram using the Tag Recent Media endpoint.
In the response, you will receive a user object that has the user's username, id, profile url, and so on. This should be enough to do what you are describing.
As far as tools, there aren't great options to probably do things exactly how you want. If you just want a simple contest, you could use statigram, but it's not free.
If you roll your own solution, I highly recommend you also do the following:
Implement a rate limiting mechanism such as a task queue so you don't exceed your API calls (5000 per hour for most calls). Also useful for failures/network hicups, etc.
Have users authenticate so you can use OAuth to extend your API calls to 5000/per user/hour to get around #1.
Try the subscribe API if there won't be many items. You can subscribe to a specific tag as well, and you will get a change notification. At that point though you need to retrieve the actual media item(s), and this can cost a lot of API calls depending on how frequent and what volume these changes occur.
If your users don't have much photos/relatively small/known in advance, you can actually query the user's recent media instead and filter in your own code by hash tag.

How would one utilise Twitter's Streaming API to retrieve Tweets from a specified country?

My goal is to retrieve all Tweets, or as significant a proportion as I can, that originate from certain small countries such as Ireland,New Zealand,Lithuania etc.
Twitter's Search API allows the searching of statuses in a radius around a given lat/long. Twitter decides which results to return by the geotag data included in a user's profile, or by reverse-geocoding the user's Hometown location in their profile.
The public status stream in the Streaming API can be filtered by geobox, but Twitter does not perform reverse-geocoding when returning these results. Research so far has indicated that not very many people at all in these countries use geo-tagging.
Obviously, if I had access to the firehose stream, then using the Streaming API would be the way to go, as I could perform the reverse-geocoding myself. At the default access level, however, the random sample stream does not provide enough relevant users to me.
What, then, if any benefit could I get from using the Streaming API? Should I simply stick to the Search API, as I am unlikely to get any unique data from the Streaming API?
You can pass locations parameter to specify the area of geotagged tweets.
http://dev.twitter.com/pages/streaming_api_methods#locations
With Twitter4J, use FilterQuery#locations().
http://twitter4j.org/en/javadoc/twitter4j/FilterQuery.html#locations(double[][])

Resources