Skip to content

Instantly share code, notes, and snippets.

@omeroot
Last active May 22, 2019 07:30
Show Gist options
  • Save omeroot/edf7321fdb069c06ab4f7a5f57665b7f to your computer and use it in GitHub Desktop.
Save omeroot/edf7321fdb069c06ab4f7a5f57665b7f to your computer and use it in GitHub Desktop.
Instagram
You can use the Insights API to get a business user's reach, impressions, and profile_views metrics.
You can use the Insights API to get metrics about business user posts.
The following example returns the reach, impressions, and profile_views metrics.
Media like and comment count
Story icin
"media_id": "18023345989012587",
"exits": 1,
"replies": 0,
"reach": 17,
"taps_forward": 12,
"taps_back": 0,
"impressions": 28
Media Comment count
---
Twitter
Impressions impressions All Yes A count of how many times the Tweet has been viewed. This metric is only available for Tweets that have been posted within the past 90 days.
Engagements engagements All Yes A count of the number of times a user has interacted with the Tweet. This metric is only available for Tweets that have been posted within the past 90 days.
Favorites favorites All
Yes - /28hrs & /Historical
No - /totals
A count of how many times the Tweet has been favorited.
Retweets retweets All
Yes - /28hrs & /Historical
No - /totals
A count of how many times the Tweet has been Retweeted.
Replies replies All
Yes - /28hrs & /Historical
No - /totals
A count of how many times the Tweet has been replied to.
Video Views
video_views All
Yes - /28hrs & /Historical
No - /totals
A count of how many times a video in the given Tweet has been 50% visible for at least two seconds.
Please note that you may see a discrepancy between the video views metric displayed in the Twitter owned and operated platforms (mobile app and website) and the number that you receive via the /28hr and /historical endpoints.
The video views displayed in the Twitter user interface and with the /totals endpoint will display the video view aggregated across all Tweets in which the given video has been posted. That means that the metric displayed in the UI includes the combined views from any instance where the video has been Retweeted or reposted in separate Tweets.
The video views provided by the /28hr and /historical endpoints will just include those views generated by the specific Tweet for which you are pulling metrics.
Media Views media_views /28hr /historical
Yes
A count of all views (autoplay and click) of your media counted across videos, gifs, and images.
Media Engagements
(formerly Media Clicks) media_engagements /28hr /historical Yes
A count of how many times media such as an image or video in the Tweet has been clicked.
URL Clicks url_clicks /28hr /historical Yes A count of how many times a URL in the Tweet has been clicked.
Hashtag Clicks hashtag_clicks /28hr /historical Yes
A count of how many times a hashtag in the Tweet has been clicked.
Detail Click detail_expands /28hr /historical Yes
A count of how many times the Tweet has been clicked to see more details.
Permalink Clicks permalink_clicks /28hr /historical Yes
A count of how many times the permalink to the Tweet (the individual web page dedicated to this Tweet) has been clicked.
App Install Attempts app_install_attempts /28hr /historical Yes
A count of how many times an App Install event has occurred from the Tweet
App Opens app_opens /28hr /historical Yes
A count of how many times an App Open event has occurred from the Tweet.
Tweet Emails email_tweet /28hr /historical Yes
A count of how many times the Tweet has been shared via email.
User Follows user_follows /28hr /historical Yes
A count of how many times the User (Tweet author) has been followed from this Tweet.
User Profile Clicks user_profile_clicks /28hr /historical Yes
A count of how many times the User (Tweet author) has had their profile clicked from this Tweet.
---
Youtube
likes (core metric)
dislikes (core metric)
shares (core metric)
comments (core metric) The number of times that users commented on a video.
views (core metric) The number of times that a video was viewed.
viewerPercentage (core metric) The percentage of viewers who were logged in when watching the video or playlist.
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment