Instagram's Graph API does not expose "who unfollowed me." There is no endpoint that returns a diff of your follower list over time — the count moves, but the identities behind the change are gone. Yet plenty of tools surface unfollowers. Here is the approach that actually works without touching a private API, and the pitfalls I hit building it.
Why the obvious approaches fail
The naive idea is "log in with the user's credentials and read their follower list." Do not. That is the pattern Meta's automation rules flag hardest, it gets accounts action-blocked, and if the session token leaks it can post and DM on the victim's behalf. Any tool whose first step is connect your Instagram account is carrying that liability.
The second idea is the official Graph API. It gives you aggregate metrics (follower_count, reach) but never the follower list, so you cannot compute a set difference. Dead end for unfollower detection.
The snapshot-diff model
What actually works is embarrassingly simple set math on public data:
- Read the public follower/following lists for a handle (the same data anyone sees in a browser).
- Store a hashed snapshot:
snapshot_t = { follower_ids }. - On the next run, compute
unfollowed = snapshot_{t-1} - snapshot_tandnew = snapshot_t - snapshot_{t-1}.
def diff_followers(prev: set[str], curr: set[str]):
return {
"unfollowed": prev - curr,
"new": curr - prev,
"net": len(curr) - len(prev),
}
The first run can only store a baseline — there is nothing to diff against yet, which is a UX gotcha worth surfacing to users so the empty first result does not read as a bug.
Pitfalls I hit
- Pagination drift. Large accounts paginate; if a page fails mid-collection you get phantom "unfollows." Treat a snapshot as valid only if the full list resolved, otherwise discard it.
- Bot noise in engagement. A raw follower delta is misleading when a chunk of the audience is inactive. Cross-referencing recent likers against the follower set gives a far more honest engagement rate than the vanity count.
- Rate limiting. Space reads out; a burst looks automated and gets throttled.
Where this leaves you
You end up with a diff you can act on — names of leavers, new followers, and a real engagement rate — computed entirely from public data with no login. If you just want the result rather than the plumbing, I built a hosted version of exactly this at followertracker.io; drop in any public @username and it stores the baseline and shows the diff on your next check. But the model above is the whole trick, and it is worth understanding before you trust any Instagram follower tracker with your data.
Top comments (0)