How to fetch playback statistics - soundcloud

I'd like to know if it's possible (and if yes: how) to fetch statistics for our soundcloud tracks via the soundcloud API.
I know that i can get the current playback count of my tracks but is it possible to get the playback count of yesterday and so on to draw a custom graph ?
Or do i have to poll the api and record the data myself?

Not officially. Latest and official api does not support this feature yet. It voilates the tos.
Check that question first, before you read further:
soundcloud: Is api-v2 allowed to be used and is there documentation on it?
For experimental use, you can try this:
soundcloud.com/{username}/stats
Is a good starting point to take a deeper look on the networks tab in the console.
Example calls:
totals -> all tracks
https://api-v2.soundcloud.com/users/soundcloud:users:1672444/stats/totals?from=1427846400000&to=1428364800000&client_id=b45b1aa10f1ac2941910a7f0d10f8e28&app_version=1d6991e
plays -> individual tracks
https://api-v2.soundcloud.com/users/soundcloud:users:1672444/tracks/soundcloud:tracks:148976759/stats/timeseries/plays?from=1427846400000&to=1428364800000&resolution=day&client_id=b45b1aa10f1ac2941910a7f0d10f8e28&app_version=1d6991e
The second call will give you, what you want - an array with the daily plays.
To make the calls working i had to manipulate the request headers.
Origin https://soundcloud.com
Referer https://soundcloud.com
Host api-v2.soundcloud.com
Authorization (copied from network tab)

Related

How do I get the complete track history of a Deezer user?

I want to analyse my music consumption on Deezer.
Researching resulted in their rest api but the amount of entries in the user history seems to be limited (see https://stackoverflow.com/a/19497151/9909548 to navigate through all entries).
In my case, it resulted in only about 140 tracks which should be thousands.
From now on I could regularly store the results of that request but all data till now would be lost.
I'm aware that, by EU law, I could request all stored user data and parse that (in case I get it digitally) but I would not consider that a solution.
Is there a different api call to get the complete history or another api or some other way to get this?
There is no other way to access the entire history:
Deezer Support on 05.12.2020
Hello, Thanks for your email, apologies for the delay in getting back to you. XXX from Support here
https://www.deezer.com/app/stateeztics/
that is the best tool, but else sadly we do not have data analysis tools or data, besides recently played. Other option though: 2020 highlights (in Music)
Kind regards, XXX
The recommended app is stuck when opened and Deezer is slowly stopping their support for app extensions anyway.

Cant apply for next level rate limit Facebook marketing api

I have to create script to create adsets and ads for a facebook campaign and I have to do it for a lot of items. For now, i can create every needed entity but there is a big problem, the rate limit. I reach it pretty quick (I can create like 15 items before getting a rate limit exception) and this is very limitating, creating eveything by hand is actually much faster... I want to apply to the next level of rate limitation but I can't. One of my coworker contacted someone from facebook and we were told we did not make any API call using my app ID. Since I am able to create a campaigns, adsets, ads... and we can see those in power editor I don't understand what is going on.
What my dashboard looks like
We will need to be able to create everything using the API really soon so, after some research, I try asking the question here. Did I miss something when creating my app ?
You probably want to go through the official request to promote your app from a Basic level to a Standard level. The level for your app determines how heavily it is rate limited. Details here: https://developers.facebook.com/docs/marketing-api/access
It sounds as if you have not make your official request in app dashboard. It's possible we evaluated your number of API calls before you reached the threshold, or the data we are able to see on your API calls was from an earlier time period when you did not consistently reach the boundary.
You could also be hitting rate limits due to your error rates.
You can apply here, and if needed, reapply: https://www.facebook.com/business/standardadsapi?attachment_canonical_url=https%3A%2F%2Fwww.facebook.com%2Fbusiness%2Fstandardadsapi

Getting microphone info with WebAudio API

I want to be able to see which microphone WebAudio API picked up when it returns the MediaStream. It would be even better if I could select the microphone when more than one is available.
Is there any way to do this?
Thanks
There is, but it only works when your page is served securely (i.e. https:// instead of http://). (this is common with new security-sensitive apis.)
Check out https://webaudiodemos.appspot.com/input/index.html - the select dropdown lets you choose inputs.

Instagram API: Get the oldest images first based on tagname

I recently developed an app using the Instagram API, But I faced some problems with it. (I got struck)
This app is not calling the api and getting images in the real-time. Instead, it calls the api once a week and store images in the database based on a specific hashtag. I see that their api is designed in a way to call it in real time and pull images, because it has this "recent" in its url, and it only provides 20 results. So every time a user reaches the end, it will load the next 20, until u reach the end.
However, in my case, When I pull the images every week, at one point, I will reach to the oldest image, and from that point I will be stopped, because Im going from Newest to the oldest. So I want to get data as from oldest to newest.( Actually I want to get the opposite of what's offered by instagram.) They have not provided any option to sort them in their docs.
Im thinking of a solution for this, but I can't wrap my head around it. So I will be much thankful if you guys can direct me in the right path.
I searched Google, viewed old questions in SO, but I didn't find the answer.
Edit : Im planning to fetch data starting from the Oldest one like this. (Since I know the min_tag_id, because I ran this once completely).
https://api.instagram.com/v1/tags/my_tag/media/recent?&client_id=xxxxxxxxxxxxxxx&min_tag_id=1408983759354183
where min_tag_id is of the oldest image. So everytime I will be calling to the min_tag_id. Is it a good solution?
Yes, using the min_tag_id and max_tag_id is the solution.
Have a look at this answer: Instagram Search for a tag within particular date range

Getting blocks of data from Google Reader API

I have built a basic app using the Reader API but I dont want to retrieve all the items at once to save on bandwidth and processing. I start with the first 50, using
http://www.google.com/reader/atom/user/-/state/com.google/reading-list?n=50&xt=user/-/state/com.google/read&r=n
but then I want to get the next 50 once they request it.
I have been playing with tracking the <entry gr:crawl-timestamp-msec=""> but I reckon there's a simpler solution.
How do I do that?
Think I've found the answer myself
use the value <gr:continuation>CArhxxjRmNsC</gr:continuation>
like http://www.google.com/reader/atom/user/-/state/com.google/reading-list?c=CArhxxjRmNsC
for more info read the top answer here How to skip known entries when syncing with Google Reader?