Our platform is often used by growth hackers for lead generation in social media networks. One such use case is building a list of Instagram followers from interestingprofiles. Today we placed one such robot into our portal‘s demo space for anyone to use. Robot is only 30 lines of Javascript code and works quite fast. We tested it with IBM’s Instagram which has 78k followers and it took only 14 minutes to scrape them.
How to use this robot:
- Login to Web Robots portal on Chrome browser.
- Make sure you have Web Robots Chrome extension to run the robot.
- Open robot instagram_followers in our extension.
- Make sure you are logged in on Instagram website.
- Modify start URL to the desired Instagram profile (example: https://www.instagram.com/ibm) and click Run.
- When robot is finished data will be available on portal in CSV and JSON formats.
Remember, this robot is placed in Demo space, which means it can be modified by anyone. In case someone messes up the code, you can restore it from code below. Just paste it into extension’s editor:
// Must be logged in // Start URL above must be target Instagram profile. Example: https://www.instagram.com/ibm/ steps.start = function(req) { var user_id = $("script:contains(profilePage_)").text().split('profilePage_')[1].split('"')[0]; if (!req) { req = "q=ig_user(" + user_id + ")+%7B%0A++followed_by.first(20)+%7B%0A++++count%2C%0A++++page_info+%7B%0A++++++end_cursor%2C%0A++++++has_next_page%0A++++%7D%2C%0A++++nodes+%7B%0A++++++id%2C%0A++++++is_verified%2C%0A++++++followed_by_viewer%2C%0A++++++requested_by_viewer%2C%0A++++++full_name%2C%0A++++++profile_pic_url%2C%0A++++++username%0A++++%7D%0A++%7D%0A%7D%0A&ref=relationships%3A%3Afollow_list"; } var token = $("script:contains(csrf_token)").text().split('"csrf_token": "').pop().split('"').shift(); $.ajax({ url: "https://www.instagram.com/query/", headers: { 'x-instagram-ajax': '1', "x-csrftoken": token }, method: 'POST', data: req, success: function(data) { emit("Followers", data.followed_by.nodes); if (data.followed_by.page_info.has_next_page) { var next_req = "q=ig_user(" + user_id + ")+%7B%0A++followed_by.after(" + data.followed_by.page_info.end_cursor + "%2C+20)+%7B%0A++++count%2C%0A++++page_info+%7B%0A++++++end_cursor%2C%0A++++++has_next_page%0A++++%7D%2C%0A++++nodes+%7B%0A++++++id%2C%0A++++++is_verified%2C%0A++++++followed_by_viewer%2C%0A++++++requested_by_viewer%2C%0A++++++full_name%2C%0A++++++profile_pic_url%2C%0A++++++username%0A++++%7D%0A++%7D%0A%7D%0A&ref=relationships%3A%3Afollow_list"; next("", "start", next_req); } done(1000); } }); };
There are several errors when I put the code in the developed environment
Hi Lisa, Thanks for pointing out. We formatted the code differently and now you can copy-paste just fine. I tested it just now. Enjoy!
How long does it take for data to show, think I did all the steps correctly, but still shows zero data after 5-10 minutes, is that normal?
Very useful tool, but is limited to a maximum output of 100 thousand people could leave
100k records limit applies to download using CSV button on portal. This limit has to be there to avoid perormance problems as portal generates file in real-time. This process uses a lot of compute resources. However this limitation is not a problem. Each successful run also generates complete CSV and JSON files for download. Files usually take several minutes to appear under the run in the “Files” section. Just refresh run results page after several minutes from run completion.
Love this tool. Is there any way this tool can scrape followings instead of followers?
When i used it, it only scraped my personal facebook not the profile I set in hte start URL
Hi, thanks for commenting on this issue. Instagram changed their website’s internal structure. Robot is now adjusted and works! Robot code in this blog post is also up to date.
I have the same problem as joe
When i used it, it only scraped my personal instagram not the profile I set in the start URL
Hi, thanks for commenting on this issue. Instagram changed their website’s internal structure. Robot is now adjusted and works! Robot code in this blog post is also up to date.
Hey Nicerobot, that’s quite awesome. Works like a charm. Is there a way to add number of followers for each follower? That would be cool!
It would be great if it could scrape the followers and only add them to the csv file if the follower has greater than 10 posts (for example or any number chosen) to try to filter out all the fake postless accounts out there.
It is possible to implement by opening each follower separately and checking their stats. Looks doable on a small scale. Robot’s running time would grow significantly.
This is great, any chance there is code you’ve created to follow the accounts that are dumped into the CVS? If there is a tool out there, would appreciate someone pointing me in the right direction!
Cheers
LT
No we haven’t done such a thing. I think it would be very intrusive and not appreceated by Instagram.
Can I input a list of usernames (for example, @ibm, @nike, @instagram) and have this scraper pull the profile data for each username into a .csv. For example, username, first name, last name, # of followers, #of followings, # of posts, bio?
Helo Nice Robot, i, would like to buy this as an application on my windows7 if its possible can you reach me via email or skype? ill be waiting for you. thank you.
Hi! This script works fine? Any changes??? thanks
Nice Robot- not able to get this script to work. Any idea why not?
Sadly, Instagram has a new website design and this robot will not work until we recreate it for the new design.
hate that- would love to use it again once it gets recreated.
Where can I find the CSV after it’s finishd?
Nevermind, I tried it for Instagram so that’s why I couldn’t find anything… Do you know when the robot will get recreated?
hello my friend, i wanna ask to all of this members ^^, i can’t save file in output menu on webrobot extension :( and i was bringed into portal, but there is nothing download botton ( CSV ) anyone can help me?
We used Marketing98.com to draw the Instagram contest and choose the winner of the contest
Follow the link below to export instagram comments and follower in Excel and free giveaway
https://marketing98.com/export-instagram-comments/
Sir can you please give me your fb id? I am having prb to use it. In the code
Sir would you like to marketing for us? We will give you commission for per sell?
Is this one still working?
All of this are broken, I have found another solution to export instagram comments to excel file in a few clicks using this online tool https://exportcomments.com/ – free download and no account needed.
Good luck.
Any chance you’re redoing this robot?
The bot seems not to be working unfortunately. tried on a account with 14k followers and ended up with just:
Done: 4 Que: 0 Fails: 2 Emits: 0 Rows: 0 Dur: 94.75
executeCode: steps.start();
No longer supported by their server — don’t waste your time here…
First of all thanks for the wonderful article. I found your article via google search. Its been very useful and help for our business. once again thanks a lot. Keep writing and inspiring! thank you. you can also visit our website to get new joomla and wordpress plugin and templates to keep update your site[Enter]