Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way of retrieving a list of poll voters from Instagram stories?

I know there is an endpoint here for retrieving a list of story id's, but I was wondering if it was possible to get a list of the users who voted on a specific story poll?

There seems to be very little data on stories (even when you export personal account data) and it would be great if this was accessible via the API.

Also I don't want to make my account a Business Account.

Answers don't have to be limited to using the API, I have manually screen shotted the list and joined the screenshots together and used text recognition to get the handles, so any fancy solution that is faster than data entry is welcomed.

Thank you in advanced!

like image 500
Meers E. Chahine Avatar asked Mar 26 '19 11:03

Meers E. Chahine


People also ask

Can you see who voted Instagram poll?

How to view the results of your Instagram poll. To view the results of your Instagram poll, simply view your own story and tap the "Seen by" button in the lower left corner. This will show you how many viewers you've had on your story as well as who voted on your poll and how many votes each answer option received.

Where can I find Story poll results?

Once your Instagram Story is live, you can check the results of your poll by swiping up on the published story and selecting the eye icon.


2 Answers

Yes, but not using the Instagram Platform API (via https://www.instagram.com/developer) but rather the new Instagram Graph API

Your account must also be a business account or else you won't have access to the end point.

The endpoint is: /user/stories and can be found in the following documentation

I hope this helps someone, I wasn't able to find a good answer so here's to knowledge-filling.

like image 148
Meers E. Chahine Avatar answered Oct 26 '22 02:10

Meers E. Chahine


To be honest I'm not familiar with the Instagram API,

I tried to find the AJAX request on my story, and find out that it is as follow:

https://www.instagram.com/graphql/query/?query_hash=<_QUERY_HASH_>&variables=%7B%22reel_ids%22%3A%5B%22<_USER_ID_>%22%5D%2C%22tag_names%22%3A%5B%5D%2C%22location_ids%22%3A%5B%5D%2C%22highlight_reel_ids%22%3A%5B%5D%2C%22precomposed_overlay%22%3Afalse%2C%22show_story_viewer_list%22%3Atrue%2C%22story_viewer_fetch_count%22%3A50%2C%22story_viewer_cursor%22%3A%22%22%7D

'variables' is just a URL encode of:

{"reel_ids":["<_USER_ID_>"],"tag_names":[],"location_ids":[],"highlight_reel_ids":[],"precomposed_overlay":false,"show_story_viewer_list":true,"story_viewer_fetch_count":50,"story_viewer_cursor":""}

Note, you need to replace <_USER_ID_> with your user ID, And for me <_QUERY_HASH_> was some constant string,

Then, the response JSON can be parsed using a small Python program:

import json

def parse_instagram_json(json_as_str):
    data = json.loads(json_as_str)
    if ("data" not in data) or ("reels_media" not in data["data"]):
        print "Invalid JSON"
        return
    for media in data["data"]["reels_media"]:
        for media_item in media["items"]:
            print "You have {} views".format(media_item["edge_story_media_viewers"]["count"])
            viewer = []
            for v in media_item["edge_story_media_viewers"]["edges"]:
                viewer.append("{} ({})".format(v["node"]["username"], v["node"]["id"]))
            if 0 < len(viewer):
                print ", ".join(viewer)

I'm not sure if I'm getting the viewer list or the voter list,

The JSON fields suggest it is the former but you can give it a try and maybe it will be what you was looking for...

like image 42
Yogev Neumann Avatar answered Oct 26 '22 01:10

Yogev Neumann