How to retrieve video view count from Instagram API

instagram api examples
instagram graph api python
instagram graph api tutorial
instagram feed api
instagram insights api
instagram publishing api
instagram graph api non business
instagram api graph api

Instagram recently started showing view counts on videos. Is there a way to pull this data from the API?

I read through the documentation but I could not find anything about "Views" only "Likes".


Yes you can get it, if you have your facebook and instagram accounts linked and your instagram account has a business profile, make following GET request:

https://graph.facebook.com/v3.0/instagram_video_id/insights/video_views

you will get response in this format:

{
  "data": [
    {
      "name": "video_views",
      "period": "lifetime",
      "values": [
        {
          "value": 123
        }
      ],
      "title": "Video Views",
      "description": "Total number of times the video has been seen",
      "id": "instagram_video_id/insights/video_views/lifetime"
    }
  ]
}

How do I see who viewed my Instagram videos? 2020, Does watching your own video on Instagram count as a view? A few weeks ago, I learned how to retrieve data from Instagram's private API. How? I was diving into the app store, searching apps that were using the Instagram public API, apparently. It was curious that some of them directly didn't use a token to retrieve information: basic user profile, media,


Not available via public API yet.

Video View Counts on Instagram, Below a video, you can see a count of how many times it's been viewed. A video's view count is visible to anyone who can see the post. Note that you're not able  Also, keep in mind that video views only include views from within the Instagram app, and not from other places like an embedded post or from a browser. If your account is set to private, you may not see the video view count until your video has reached a certain number of video views. Video view counts will only show up on videos that were


The only way I've found is to systematically scrape posts' permalinks using browser automation like Seleniuim (with some logic handling the formatting e.g. 5.6k views vs 1,046 views) and picking out the appropriate element. A simple GET request doesn't yield the desired DOM due to the lack of javascript detected.

In python:

from bs4 import BeautifulSoup
from selenium import webdriver

def insertViews(posts):
    driver = webdriver.PhantomJS('<path-to-phantomjs-driver-ignoring-escapes>')
    views_span_dom_path = '._9jphp > span'

    for post in posts:
        post_type = post.get('Type')
        link = post.get('Link')
        views = post.get('Views')

        if post_type == 'video':
            driver.get(link)
            html = driver.page_source

            soup = BeautifulSoup(html, "lxml")
            views_string_results = soup.select(views_span_dom_path)
            if len(views_string_results) > 0:
                views_string = views_string_results[0].get_text()
            if 'k' in views_string:
                views = float(views_string.replace('k', '')) * 1000
            elif ',' in views_string:
                views = float(views_string.replace(',', ''))
            elif 'k' not in views_string and ',' not in views_string:
                views = float(views_string)
        else:
            views = None

        post['Views'] = views
    driver.quit()
    return posts

The PhantomJS driver can be downloaded here.

Instagram views: What Counts as a view on Instagram Videos, If your account is set to private, you may not see the video view count until your video has reached a certain number of video views. Video view counts will only  Now let's get the data from Instagram, like recent photos, popular photos and user details. To get the data using the API then we need an access token first, so let's get the access token. Get Access Token. The Instagram Access Token is a long number that grants other applications access to your Instagram feed.


Why aren't video views showing up on Instagram?, For instance: you can retrieve photos with a given hashtag by accessing the On views where pagination is present, we also support the "count" parameter. Autoplay When autoplay is enabled, a suggested video will automatically play next. Up next Java Project Tutorial - Make Login and Register Form Step by Step Using NetBeans And MySQL Database


API Endpoints • Instagram Developer Documentation, an app for consumers or you only need to get an app user's basic profile information, photos, and videos, consider the Instagram Basic Display API instead. You cannot replicate the core user experience of the Instagram apps or web site. For example, do not build a media viewer. You cannot use the API Platform to crawl or store users' media without their express consent. Do not abuse the API Platform, automate requests, or encourage unauthentic behavior. This will get your access turned off.


Instagram Graph API - Instagram Platform, The Insights API allows you to get social interaction metrics for IG Users and their IG metrics; interactions on ads containing a media object are not counted. "​title": "Profile Views", "description": "Total number of unique accounts that have Videos · Facebook for Developers Page. Follow us. Follow us on Facebook  For instance: you can retrieve photos with a given hashtag by accessing the following URL with your access_token (replace ACCESS-TOKEN with your own): The Instagram API requires an access_token from authenticated users for each endpoint. We no longer support making requests using just the client_id.