To scrape who an Instagram account follows, send one GET request to /v1/instagram/following with the handle. Each page returns up to 50 followed accounts for $0.0100, so the 270 accounts @nike follows take 6 pages and cost $0.06. The official Instagram Graph API has no way to list them. This guide builds an Instagram following scraper in Python on that one call: a page, a cursor loop, a CSV export, and a job for long lists.
Why the Graph API cannot list who a user follows
Meta's IG User reference has a follows_count field. It is a number. The edges on the same page include media, stories, tags and business_discovery, and none of them returns the accounts a user follows.
Business Discovery reads other Business and Creator accounts from your own professional account, and it returns counts and media, not lists of accounts. Instagram shows a following list only to a signed-in user. The Instagram following API reads it with one of our signed-in accounts and answers in one JSON shape, Page[Account].
Check the list size before you scrape
A following list is often far shorter than a follower list, so price it before you scrape. The Instagram profile API at /v1/instagram/web_profile_info returns data.following for $0.0005. A saved read of @nike on 2026-11-25 put it at 270 accounts followed, against 289,736,738 followers, so its full following list is 6 pages and $0.06.
import math
import os
import sys
import requests
HEADERS = {"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"}
res = requests.get(
"https://api.virev.ai/v1/instagram/web_profile_info",
params={"handle": sys.argv[1]},
headers=HEADERS,
)
res.raise_for_status()
following = res.json()["data"]["following"]
pages = math.ceil(following / 50)
print(following, "accounts,", pages, "pages,", f"${pages * 0.01:.2f}")Scrape one page of the following list
Create a key in the dashboard and put it in VIREV_API_KEY. Send the handle with max_pages=1, and the call answers HTTP 200 with one page.
curl "https://api.virev.ai/v1/instagram/following?handle=nike&max_pages=1" \
-H "Authorization: Bearer $VIREV_API_KEY"This is the data block of a saved first page of @nike, read by one of our signed-in readers on 2026-10-29. Three of its 50 accounts are shown, and the signed picture links and the cursor are cut. On that page, 48 of the 50 accounts were verified and none were private.
{
"items": [
{
"id": "6521802054",
"username": "edglrd",
"full_name": "EDGLRD",
"is_verified": true,
"is_private": false,
"avatar_url": "https://scontent-icn2-1.cdninstagram.com/v/t51.2885-19/412348837_292215560473500_6831959463045518177_n.jpg?…",
"latest_story_at": "2026-10-28T19:43:59+00:00",
"extra": {}
},
{
"id": "8688762057",
"username": "skims",
"full_name": "SKIMS",
"is_verified": true,
"is_private": false,
"avatar_url": "https://scontent-icn2-1.cdninstagram.com/v/t51.2885-19/328698483_1641687269593311_1311019168842483373_n.jpg?…",
"latest_story_at": "2026-10-28T16:02:00+00:00",
"extra": {}
},
{
"id": "76728187434",
"username": "virgilabloharchive",
"full_name": "VIRGIL ABLOH ARCHIVE™️",
"is_verified": false,
"is_private": false,
"avatar_url": "https://scontent-icn2-1.cdninstagram.com/v/t51.82787-19/629270838_17873554827555435_3053539763372703802_n.jpg?…",
"latest_story_at": null,
"extra": {}
}
],
"pages": [
{ "cursor": null, "fetched_at": "2026-10-29T15:49:08.415282+00:00", "count": 50, "signed_in": true }
],
"next_cursor": "eyJfc25hcHNob3Qi…",
"has_more": true,
"stop_reason": "pages",
"coverage": { "since": null, "oldest_at": null, "since_reached": false }
}Each item has id, username, full_name, is_verified, is_private, avatar_url and latest_story_at. The avatar_url link is signed and stops working after a few days, so download the picture if you keep it. Beside the items, meta.cost says what the call charged, $0.0100 for one page.
Walk the list with a cursor and write a CSV
Send next_cursor back as cursor until has_more is false. A walk stays on the signed-in reader that served its first page, and that reader reads at most 19 follower and following pages in any 24 hours, about 950 accounts. A page past that answers 429 daily_page_limit with a Retry-After header and no charge. When every reader is busy, the call answers 503 capacity_exhausted, also with Retry-After and no charge. In both cases the script below saves what it has and prints the cursor, so you can call again later from the same place.
import csv
import os
import sys
import requests
API = "https://api.virev.ai/v1/instagram/following"
HEADERS = {"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"}
COLUMNS = ["id", "username", "full_name", "is_verified", "is_private", "latest_story_at"]
def scrape_following(handle, cursor=None):
accounts, seen = [], set()
while True:
params = {"handle": handle, "max_pages": 1}
if cursor:
params["cursor"] = cursor
res = requests.get(API, params=params, headers=HEADERS)
if res.status_code in (429, 503):
code = res.json()["error"]["code"]
print(code, "- call again in", res.headers.get("Retry-After"), "s with cursor", cursor)
return accounts, cursor
res.raise_for_status()
data = res.json()["data"]
for account in data["items"]:
if account["id"] not in seen:
seen.add(account["id"])
accounts.append(account)
if not data["has_more"]:
return accounts, None
cursor = data["next_cursor"]
handle = sys.argv[1]
resume = sys.argv[2] if len(sys.argv) > 2 else None
accounts, resume_at = scrape_following(handle, resume)
path = f"{handle}-following.csv"
new_file = not os.path.exists(path)
with open(path, "a", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=COLUMNS, extrasaction="ignore")
if new_file:
writer.writeheader()
writer.writerows(accounts)
print(len(accounts), "accounts written to", path)
if resume_at:
print("resume with: python following_csv.py", handle, resume_at)Run it as python following_csv.py nike. The loop ends on the cursor, not on a page count, so a list of 270 accounts stops after its sixth page. If the script prints a resume line, run that line after the delay, and the new rows go into the same CSV file. The set of ids drops an account that Instagram repeats inside one run.
Read a long following list as a job
For a list past about 950 accounts, send max_pages=-1. The call answers HTTP 202 with a durable job that keeps reading after you disconnect, so you need no script that stays up for days. Leave out max_pages and the job stops after 10 pages.
- 1
Start the job
CallGET /v1/instagram/following?handle=<username>&max_pages=-1and keepbatch_id,status_urlandresults_urlfrom the answer. - 2
Wait for it
- 3
Download the accounts
Readresults_url, the job results API at/v1/jobs/{job_id}/results, and send itsnext_cursorback ascursoruntilcompleteis true. Downloads are free, and when the job completes it is charged for every page it read.
The Instagram followers scraper guide has a full Python version of this job loop with a CSV writer. Change the path from followers to following and it works for this list.
What a following list costs
Billing counts the unique accounts returned, $0.0100 for each 50, rounded up, with one page as the least a call costs. A call that answers an error is not charged.
| Accounts followed | Pages of 50 | Cost | Days on one walk |
|---|---|---|---|
| 50 | 1 | $0.0100 | 1 |
| 270, as @nike | 6 | $0.06 | 1 |
| 950 | 19 | $0.19 | 1 |
| 2,000 | 40 | $0.40 | 3 |
| 5,000 | 100 | $1.00 | 6 |
Add counts, niche and country to each account
A list item has no follower count or bio. For accounts we already store, the bulk lookup API at POST /v1/creators/mget takes up to 200 usernames in one call for $0.0010. Each row in data.creators has followers, country, primaryNiche, engagementRatio and the brand collabs. It reads our database only, so a handle we never crawled is missing from the answer. Read those with /v1/instagram/web_profile_info at $0.0005 each.
import csv
import os
import sys
import requests
HEADERS = {"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"}
with open(sys.argv[1], encoding="utf-8") as f:
usernames = [row["username"] for row in csv.DictReader(f)]
rows = []
for start in range(0, len(usernames), 200):
res = requests.post(
"https://api.virev.ai/v1/creators/mget",
json={"usernames": usernames[start : start + 200], "platform": "instagram"},
headers=HEADERS,
)
res.raise_for_status()
rows.extend(res.json()["data"]["creators"])
for row in rows:
print(row["username"], row["followers"], row["primaryNiche"], row["country"])
found = {row["username"] for row in rows}
print(len(found), "stored,", len(set(usernames) - found), "to read with web_profile_info")The 200 in the loop is the API limit
The bulk lookup takes at most 200 usernames per call, so the loop sends them in slices of 200. The 270 accounts @nike follows take two calls, $0.0020.
What people use a following list for
- A brand follows its athletes, sub-brands and partners, so its list is a short map of who it works with, such as @skims, @wnba and @nikeseoul on the first page of @nike.
- Two competitors who follow the same creators show which creators that market already watches, and one set intersection of the two lists finds them.
- A creator who follows many accounts in one niche tells you which niche that creator reads, which helps when you match creators to a campaign.
- Your followers list and your following list together give the accounts that do not follow you back, with one set difference.
# a and b are lists of Page[Account] items from two /v1/instagram/following walks
shared = {x["username"] for x in a} & {x["username"] for x in b}
print(len(shared), "accounts both follow:", sorted(shared))Limits to know before you scrape
- A private, hidden or restricted account answers 403, and the call is not charged.
- Followers and following draw on the same 19 pages a day of each reader, so a walk of each list for one account uses one budget.
- A walk with no cursor starts on a reader with pages left, so scrape many accounts side by side instead of one long list at a time.
- Instagram decides the order of the list, so sort the CSV yourself if you need a stable order.
- To list who follows an account instead, change the path to
/v1/instagram/followers, the Instagram followers API, at the same $0.0100 a page.
Scrape your first following list
Create an account, add a key, and run the loop above on one handle. A page of 50 accounts costs $0.0100.
Get your API key →