Skip to main content

Instagram followers API: export available followers with pagination

· 3 min read
Product documentation and integration guides

Exporting an Instagram follower list is the canonical scraping task — and the one where half-baked implementations lose people silently. This is the exact contract behind the followers endpoint.

The endpoint​

GET /v1/followers/{user_id}?count=50&max_id=<cursor>
  • user_id is the numeric pk — resolve a handle first with user search
  • count is 1–50 (the page size you request)
  • max_id is the cursor: take next_max_id from the previous response and pass it back verbatim

The export loop​

from getsocialapi import Client

ig = Client(api_key="gsa_live_...").instagram

followers, cursor = [], None
while True:
page = ig.followers(user_id="25025320", count=50, max_id=cursor)
followers += page["users"]
cursor = page.get("next_max_id")
if not cursor:
break

print(len(followers), "followers")

Collect each returned page and deduplicate by pk. Follower lists can change while an export is running, so cursor pagination alone does not guarantee a fixed snapshot or complete coverage.

Visibility and verified-account limits​

Exports cover the follower data the endpoint makes available, rather than a guaranteed complete list. On verified accounts Instagram exposes approximately one page of 50 followers, without a continuation cursor; the name filter is ignored. Private or restricted accounts may return limited or no data. Follow the current endpoint limitations.

Name filtering​

The endpoint accepts a query parameter pushed down to Instagram: query=marc returns only followers whose name matches. It is the cheap way to answer "does this account have a follower named X" without exporting anything.

Request-budget estimates for unverified accounts​

AccountPages (count=50)RequestsNotes
~1k available followers~20~20estimated at 50 returned users per page
~100k available followers~2 000~2 000estimate; persist the cursor and resume later
private accounts—1empty edges, is_private flag on the profile

For large exports the cursor is your checkpoint: it is a stable, session-independent string. Persist it, and resume the walk after any interruption from exactly where you stopped.

Rate limits and retries​

Follow your plan's RPS budget — exceed it and the gateway answers 429 with Retry-After: 1. Timeouts surface as 503 with Retry-After: 2; retrying the identical request is safe because the cursor fully determines the page. The official Python SDK does this automatically: three retries, exponential backoff, Retry-After respected.

Pair it with following for a mutuals calculation​

Followers + following gives you the social graph edges you need for the classic questions — mutuals, follower ratio, ghost-following detection:

followers = export(ig.followers, uid) # who follows them
following = export(ig.following, uid) # who they follow
mutuals = {u["pk"] for u in followers} & {u["pk"] for u in following}

One account, two exports, every graph question answered — try it with 100 free calls on getsocialapi.com.

Build with GetSocialAPI​

Explore Instagram API for capabilities, pricing and integration examples. Create an account to start with 100 free calls, or follow the quickstart.