Members-only tutorial

Watch the video and get the practice sheet with membership.

See membership options

Get Instagram Follower Accounts in Google Sheets

About this Tutorial

I will show you how to create a hack to retrieve Instagram follower accounts from any Instagram page using import XML. I will explain the step-by-step process, including how to identify the XML, split it, and extract the follower account. Follow along and try it out yourself.

Featured Formulas

Video Transcript

<div>0:00 Welcome to this special presentation of Better Sheets. We're going to create a little hack to get Instagram follower accounts from any Instagram page.<br>0:10 We have a list of Instagram pages. We have the follower account. I'm going to show you exactly how to do that in this video.<br>0:15 Let's see. First off, let's let's go over what it is and then I'll show you how I did it. Step by step.<br>0:21 We are using import Learn how to use the import function to bring data into Google Sheets. Opens in new tab XML. We figured out the XML and then we split Discover how to split text into separate values in your spreadsheet. Opens in new tab it because there's a whole bunch of stuff here.<br>0:29 You can sort Understand the sorting options available in Google Sheets. Opens in new tab of see it here.

We split Discover how to split text into separate values in your spreadsheet. Opens in new tab it around a text and then we used index Find out how to use the index function to retrieve specific data. Opens in new tab to grab just the thing that we needed, which was the follower account.<br>0:37 So first off, let's go to an Instagram account. And I'll show you how I figured this out. So right click on 38 followers here or any follower account.<br>0:46 We can do this, even if it's not my own account. We can go to Instagram, miss excel Get insights on working with XLSX files in Google Sheets. Opens in new tab , go to followers, right click, inspect.<br>0:58 We're gonna see here. Doesn't really give us much.

We can right click and we can try to copy the full XPath and in that case here, I'll put in the URL bar.<br>1:10 Looks like that, but this is not very helpful. What I did find, however, is if we go up here, it's 850K.<br>1:20 So if we go up here, it's 850K. So if we go command F on this right side and we type in 805K, we have nothing.<br>1:30 Oh, 850K, not 805. We have three instances of it. Right now we have OG description. We also have content. Meta content.<br>1:43 And we have this 850K here in this little expand title.

But this title is gonna be hard to get to.<br>1:52 So I opted for this one up here. Meta content, I think, yeah. Oh no, it's actually, that's not what we opted for.<br>2:01 OG description. So we ended up not going for meta content, cause that's also hard to get. But we went for a unique Learn how to extract unique values from a list in your sheet. Opens in new tab one, which is meta property, OG description.<br>2:12 There is only one OG description in this. See, one of one. We searched for it, OG description is only one.<br>2:19 It's meta, is the, HTML tag. We have a property equals OG description.

But what we really want out of this is the content.<br>2:28 So that's why we ended up going with, I'm actually gonna delete all of this stuff. And go here. That's why the XML I chose to do, Let's look at it.<br>2:44 Is slash slash meta. We have at property, which is sort Understand the sorting options available in Google Sheets. Opens in new tab of a class signifier. Equals OG description. And then inside of this, once we've identified that little meta property, we then go do slash, at content to say, give me the content that exists there, not the XML.<br>3:07 So if we don't have content, I'll show you what that looks like.

Equals import Learn how to use the import function to bring data into Google Sheets. Opens in new tab XML, URL is going to be C3, XPath query Explore how to use XPath queries to extract data from XML. Opens in new tab .<br>3:16 Let's just do this alone and see what that looks like. Imported content is empty because there's probably nothing there. The actual content we want is at a class signifier called at content.<br>3:32 So we do slash at content. This is what we are going to get. We get this sort Understand the sorting options available in Google Sheets. Opens in new tab of gibberish here.<br>3:38 Not gibberish at all. It's all this information. 38 followers, 11 followers. The following 18 posts. And it's all the text within that.<br>3:46 But what we really want is just that number Understand how to format and manipulate numbers in Google Sheets. Opens in new tab 38.

We just want to know how many followers does this account have.<br>3:51 That's where Learn about using the WHERE clause in your queries. Opens in new tab we then split Discover how to split text into separate values in your spreadsheet. Opens in new tab . We wrap Discover how to wrap text in cells for better readability. Opens in new tab split Discover how to split text into separate values in your spreadsheet. Opens in new tab around this, comma, the delimitator for our case is going to be followers.<br>4:02 And let's see what happens when we just do that. We get a reference Get to know different types of references in Google Sheets. Opens in new tab error Learn how to troubleshoot common errors in Google Sheets. Opens in new tab . C3. So what it's doing is it would override data Understand how to manage and analyze data in your spreadsheets. Opens in new tab in C3.<br>4:11 Let's do false. There. Okay, we have something now. And see, it didn't do anything. Let's do true for split Discover how to split text into separate values in your spreadsheet. Opens in new tab by.<br>4:22 Each again reference error because it's trying to override in C3.

If I actually move this over here, I can show you sort Understand the sorting options available in Google Sheets. Opens in new tab of what's going on.<br>4:33 Oh, see, it's splitting everything here. And we just want this first thing here. 38. So how do we do that?<br>4:42 Wrap Discover how to wrap text in cells for better readability. Opens in new tab it with index Find out how to use the index function to retrieve specific data. Opens in new tab handy dandy index Find out how to use the index function to retrieve specific data. Opens in new tab formula Familiarize yourself with the syntax rules for Google Sheets functions. Opens in new tab . Our reference Get to know different types of references in Google Sheets. Opens in new tab is going to be all of this stuff that we just did, comma row is going to be one.<br>4:51 And we only want the first column of data Understand how to manage and analyze data in your spreadsheets. Opens in new tab . And the moment we put one over here in, you can see what we get 38.<br>4:58 We are on the right track. Now all we have to do is copy paste this all the way down.

Oops.<br>5:05 And we're just getting the follower count of every single Instagram account that we have the URL for. And that's it.<br>5:12 Grab this sheet. If you're a BetterSheets member, down below, on BetterSheets.co, you're watching this video, you can get this exact Google Sheet.<br>5:20 If you're not a member, become a member today. I'll see you at BetterSheets.co.</div>