How to get 5 hours back trend in Twitter? - api

I know how to get the current trends of Twitter for a specific location, but is there any way to get 5 hours back trend in Twitter using API ?

The Twitter REST API does not support this sort of inquiry. To accomplish this, you would need to have your application poll the trends every hour (or so) and store them in a database. You could then query that database however you like.

Related

YouTube API - get monthly views from foreign channel

I try finding a way to get the viewcount of the last 6 months of any given YouTube channel. The YouTube analytics API is not helpful, cause it only allows for channels I own - the YouTube data API only returns the total view count of the channel lifetime.
Is there a way I can get the view count a channel has made on a monthly basis via the API? Scraping socialblade is my second option, but I'd rather use the Google Api.
Thanks for your help!
Your going to have to do it like socalblade probably does.
Just scan each channel you want to check every month.
YouTube analytics api only stores data for three months I think and you have to be authorized as you mentioned.
The YouTube data api doesn't store data by date its not intended for analytics.
I set up a system for a client a while back that just poles a few channels every day to get stats for them. Its not optimal but it works.

Get the most recent tweet on Twitter overall

I'm creating an application using the Twitter API and want to get the last Tweet tweeted. Not the last Tweet from people I follow or something like this, the actual last Tweet from all around the world in that moment. Is there a possible way for that?
Not really possible. Best you can do is get the latest tweet from an approximately one percent sampling of all tweets.
I think the only way you'd be able to do that accurately would be to consume the Twitter firehose. As an alternative, you could use the statuses/sample realtime API to get Tweets from 1% of the current volume of the firehose. Another option would be to use statuses/filter with a geofence over the whole planet, but again this would just be a 1% dataset.

What Is The Time Range For Google Analytics Real Time API

I'm having no issues using the API with PHP, but when I look at my dashboard on Google Analytics, it says I have 1 real time user, but the data I get back from my API call shows far more than that. This leads me to believe this is over a period of time. What is the time period it is calling? The last 15 mins, 30?
Thanks for your help!
For real time reports, the session duration of a user is 5 minutes. More info can be found here https://support.google.com/analytics/answer/1638635?hl=en under "Active User Metrics". I'm not sure if this would be any different if the data was accessed through the API though.
I discovered that the answer is 30 minutes. Realtime displays pageviews back 30 minutes, not as a snapshot as I had thought.

User's current playing track

Is-it possible to get the user's current playing track with Deezer API?
I've tried to use history but it seems to get 1 or 2 minutes before adding the last track... No way to get it real time?
I'm working on iOS app.
There are no real time updates for now in the Deezer API. Using the listening history is the right way to proceed.
If you absolutely need real time, you may use Facebook as an intermediary since they have real time updates for the Deezer users who publish their music activity on Facebook.

Monitor twitter hashtags in realtime with common search api?

I've been working with the twitter search api, retrieving tweets with a php script run by a cron job, 3 or 4 times per hour.
All works fine, I can save some fields from the resulting tweets into mySQL for doing some research, contests, and accounting.
I begun experiencing some "trouble" some days ago when some hashtag hit Global Trending Topic, and the saved tweets werent't reflecting the real quantity of tweets We could see through search, etc.
So:
1- Should I use instead the twitter Streaming API?
2- Should I contact api AT twitter.com and request special permissions for my app or username?
3- Finally, is there a working way to acchieve this "realtime" monitoring script that can give more accurate and real results?
Thanks a lot in advance
Got a reply from twitter api staff...
It seems I should use STREAMING API, and they point me to this url
https://dev.twitter.com/docs/streaming-api/methods#track
Hope it is useful for others