The hard way to secretly view Instagram stories!

I observe a lot of things and a lot of people, and I don’t step back while assuming certain things about anything that comes to my mind. Bad habit!

You might be wondering what those words have to do with the blog post. The answer is ~ This post is a result of the events happened in the past and are the outcomes of people’s actions.


I wish I could give the complete description of the event and mention the name of the people involved in the story!

Now, coming to the important thing. Sometimes you want to see someone’s Instagram stories, but in the past, you’ve been acting so desperate that you start to appear first in the list of those people “who watched the stories.” Oh shit!

You try to do something and somehow find a 3rd-party tool which you can use to view the Instagram stories. Boom! You stop checking their profile to see if they have uploaded any story. Okay, the problem is, you start to visit those 3rd-party apps multiple times in a day. Big time waste!

After a while, when you are happy not appearing in the list, the user starts to think “Why the hell this person isn’t checking my stories?” ~ Ten Open-ended questions nobody could answer. 


The question bugs them so much that they get depressed and change the privacy of their profile, but you were such a big fuck that instead of acting smart, you check their profile immediately and end up viewing the story. The user notices this and gets to know about your sick mentality. Ouch!

Anyway, you could have saved your ass by acting smart. Here is the way I found to secretly view someone’s Instagram stories.

Before I being ~ Stalking is a bad thing, guys! I’m writing this because I had a good laugh when I saw someone struggling with Instagram and shit. I told him a hard way of checking user’s stories so that he realizes the time he wastes viewing stories of his crush. I’m not sure if he stopped, but I thoroughly enjoyed the whole incident. 

Screenshot from 2018-09-03 05-27-09

I’m not sure if it had been previously done or not, but I discovered it a few weeks back while working on a client’s project. Okay, let’s go step by step, in the most boring way possible ~

⮞ Suppose your crush is Justin Beiber and you wanna stalk the hell out of her (mind your words, eh?). For the sake of maintaining the secrecy, we’ll first figure out the mechanism on another account (9geg) so that we don’t get caught while doing the most productive work on the Internet.

  • Go to 9GAG
  • Press Ctrl + Shift + I to open the Console.
  • Switch to the Network tab.

DevTools -

  • Press F5 to reload the page to record the network activity.

So, till now everything is going fine and we are on the right way to waste our time.

Now, when the page completely loads, clear the activities in the Network Tab, and without closing the Developer Console, click on 9GAG’s profile picture to load the stories. If you want, you can view all the stories otherwise that one click was enough for the next step.

When everything is done, you’ll get to see something similar ~

DevTools -

  • Find the name that starts with ?query_hash and click on it.
  • In the Header category under the General section (sorry, no reservation here), you’ll find Requested URL.
  • Copy the URL that looks something similar to the below one and paste it in your text editor for future use (don’t copy the URL pasted below, it won’t work) ~
  • Now, you can do two things ~
    • Copy the response from the Response tab which is next to the Headers.
    • or, paste the URL and make a request to see what you get.
  • Either way, you’ll the same data which is in the form of JSON
  • Copy the whole response, paste it into your favourite Text Editor, and save it as stories.json

Alright, now what to do? Of course, find the links which redirect towards the stories, but the question is ~ how many stories did the user upload? So, to get the number of stories that a user upload, we’ll do ~


So,  there are 8 stories (seven videos and one image) uploaded by 9gag.

Okay, it’s time to find out the links of the images, but before, let’s check out the arrangement of data.

When you’ll type (in console)


you’ll see something similar ~

IMPORTANT NOTE ~ For items[6] – We are taking the seventh item (story) from an array because other 7 out of 8 stories are videos. This is done for the sake of explanation.

Another thing – “seventh item” and “7 stories” ~ remember array indexing.

{ __typename: 'GraphStoryImage',
  id: '1859618471283064827',
  dimensions: { height: 1920, width: 1080 },
   [ { src: '',
       config_width: 640,
       config_height: 1137 },
     { src: '',
       config_width: 750,
       config_height: 1333 },
     { src: '',
       config_width: 1080,
       config_height: 1920 } ],
  display_url: '',
  media_preview: 'ABcq6RmCjJ6CoPtK/wCSP8anLYqPdQBKDnkUU1XDcCigCreTbEbacPxj1rm2llhxLlhuzg5znHB4yf1q5qyt5xYHoo/nj+ZFY+8ng8/40wOvtbuKdtsZyduT/n60Vk6KhWVs90/qKKQF680w3EhlDbcgDGM9M+49apf2G5OfM6/7P/166OigDLsdONq5cvuyuMYx3zmitSigD//Z',
  taken_at_timestamp: 1535903818,
  expiring_at_timestamp: 1535990218,
  story_cta_url: '',
  story_view_count: null,
  is_video: true }

So, display_resources is the main object that contains all the links to one story inside an array, in different formats.

If 9gag has uploaded only one story which isn’t a video, but an image, then things would have been easy, as you’d do ~


and get the link –

You can copy-paste the link to download or view the story and the person.

Remember, 9gag has uploaded eight stories, but we have found the link to only one.

So, in order to find all the URLs of the stories, we need to loop through 8 times over the items ~

const stories = require('./stories.json');

const base =[0].items;

for (let i = 0; i < base.length; i++) {

which gives us ~


Part I of this blog would have been over if it was all about the images. But we’ve got to deal with something more, and a little bit more. Why? Because one of the content in the story is a video, but we’ve got the link only to the images, which includes the preview of the video.


The good thing is ~ If a user (here, 9gag) has uploaded images (only images) as their stories, then using the code written above, we can find the find the links to download/view the content. But if there are multiple stories with mixed formats of data (images/videos), then we have to do something else, right?

The bad things ~ Let’s find a way to fix the code and make it more flexible so that we don’t have to worry about if the data is video or image.

First thing first – 

Getting back to the source which we saved earlier as stories.json~

From the source, we can easily check if the story is in the form of the image or the video~


It means the third and the fifth story is a video, and the seventh story is an image. Good! Let’s modify our code accordingly so that it does what you want it to ~

const base =[0].items;
const list = {story: []};

for (let i = 0; i < base.length; i++) {
    const is = base[i].is_video;
    is === true ? list.story.push(base[i].video_resources[0].src) : list.story.push(base[i].display_resources[0].src);


Result ~

{ story: 
   [ '',
     '' ] }

Woohoo! Now we have the code which does the exact same thing we want so that we can easily collect the links without any hectic.

Save the code for the future use! 

Part – II

Right before this, you got the URLs of the stories uploaded by 9gag, but the problem is ~ the moment you clicked on the profile picture to view the story, your name got added in the list of story viewers. Too bad.

Question ~ What’s the profit from everything I did?

Answer ~ You learned the mechanism to collect the links of the stories.

As of now, you have got the code in your text editor. All you need is the JSON data of the story uploaded by your crush (don’t forget Beiber’s name). 

Problem ~ The act of anonymously viewing the stories of a user ends as soon as you click on the profile picture, and what we did previously is the same thing. In order to find the link which has something like “?query_hash” as the parameter, we had to click on 9gag’s profile.

 Solution ~ Yum Yum! (wait, what?)

  • Remember we copied the URL about which I just talked about? Let’s bring it down here ~

After decoding, it looks like ~{"reel_ids":["259220806"],"tag_names":[],"location_ids":[],"highlight_reel_ids":[],"precomposed_overlay":false}

After breaking it down, we get ~

  • query_hash=d2ab0364afbe46d0a04e487de893f919&
  • variables =  

I can wild guess that Instagram rotates the value of ?query_hash, after a certain interval of time, but I’m not sure of it. In case, they don’t do it, it’s a good thing.

Looking at the query string parameters, we can see that "reel_ids" holds the "user id" of the account. Here, 259220806 is the user ID of 9gag. Great! It means we need valid query hash and user ID in order to download or view the Instagram stories of a user.

Okay, so we have figured out the way to get the required data, but we are only one step away from maintaining our anonymity while doing the most productive work. So, yeah, let’s do it ~

I talked about viewing Beiber’s Instagram stories, but right now, he hasn’t uploaded any. So, let’s test the process on some other account (You can choose your favourite). 

  • Open user’s profile ~ Andy Best (one of my favourite photographer on Instagram)
  • Hit Ctrl + u
  • Hit Ctrl + f and search for "id":" and you’ll find something like ~

"has_requested_viewer":false, "id":"482421524"

  • Copy the digits.

Now, we have the ID of the user whose stories we wanna view without getting caught (gosh! I hate repeating the same thing)

So, previously we had already copied the URL which had the parameters like query_hash and variables. It’s time to use them for the goodness.

  • Open your Text Editor
  • Find 259220806 (since we tested everything on 9gag)
  • Replace it with the ID of the user you want to sneak on (in this case, it will be ~ 482421524
  • Copy and paste the URL into the browser to request the JSON data.

Screenshot from 2018-09-04 05-40-03

  • Copy and save the data as stories.json and use the code we used above to extract all the URLs of the stories.

Screenshot from 2018-09-04 05-47-51

  • Use those URLs to view/download the stories of the user and your name won’t come in the list of viewers. That’s it. You made it!

You can pin the tab and refresh the page after 20 hours in case you aren’t done stalking. Copy the code. Paste and save. Use the code. Copy the output. Check the stories with full anonymity. 

You might be wondering what’s the point of doing all these things when you can view the story with one click? The answer is ~ Absolutely nothing. 

Look at the blog’s title ~ “The hard way to secretly view Instagram stories!” 

I could have simplified the whole process, but it’s not fun. Diving a little deep to understand what the fuck is going is kinda fun.

I hope you learned something from it. And please don’t waste your time sneaking around people’s profile.

~ Thank You ~


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s