Tutorial · Instagram · cURL, Python, Node.js, PHP, Go, Ruby

Get the accounts an Instagram profile follows

Following, newest first. Complete code for GET /v1/instagram/users/{user}/following in six languages and both official SDKs, each tested against the documented response.

Short answer. One call returns about 200 accounts a public profile follows, newest first: position: 1 is the most recent follow. One page usually covers weeks of new follows.

Facts checked 2 December 2026. Prices change: follow the links before you decide.

Why call it

  • See which brands, creators and peers an influencer followed recently, for trend and partnership research.
  • Export a following list to CSV for audience or competitor analysis: even the largest list is a few dozen pages.
  • Add follow-tracking to an analytics app with one API key, without an Instagram login or a Meta app.

The request

GET https://api.handlehaul.com/v1/instagram/users/{user}/following with your key in the X-Api-Key header. Following, newest first. Up to about 200 accounts a page, newest first. 1 credit a page (free from cache).

Parameters for Following, newest first
ParameterInDescription
user requiredpathNumeric user id (skips the lookup credit) or Instagram username. All digits = an id; write "@12345" for an all-digit username. On list and user endpoints, a username we have to look up costs 1 extra credit (meta.lookup_credits).
byqueryOptional: says whether user is a username or an id, instead of guessing from the digits. One of: username, id.
cursorquerynext_cursor from the previous page (opaque, sealed).
strict_orderquerytrue: answer order_unavailable (free) instead of a list that is not newest first.
freshquerytrue skips the cache (full price).

Code in 6 languages

Each sample is a complete program: it reads the key from HANDLEHAUL_API_KEY, waits and retries when the API answers 429 (using Retry-After), stops with the error code on anything else, and follows pagination.next_cursor for up to 3 pages. The SDK versions do the retries for you.

instagram-following.sh

# Following, newest first. --retry waits out a 429 using its Retry-After header;
# --fail exits with code 22 on any other error (drop it to read the error JSON).
# Next page: add --data-urlencode "cursor=<pagination.next_cursor>" (stop when it is null).
curl -sS --fail --retry 3 "https://api.handlehaul.com/v1/instagram/users/natgeo/following" \
  -H "X-Api-Key: $HANDLEHAUL_API_KEY"
Generated from the OpenAPI spec (2026-12-02); every sample was syntax-checked and run against a local mock serving the response below. Language guides: Python, Node.js, PHP, Go, Ruby, cURL.

Response

A list in data, with pagination.next_cursor and has_more, and meta with what the call cost. Example values, from the API docs. Lists are cut to two rows here.

200 · application/json
{
  "data": [
    {
      "position": 1,
      "id": "6860189",
      "username": "new_friend",
      "full_name": "New Friend",
      "is_private": false,
      "is_verified": false,
      "profile_pic_url": "https://scontent.cdninstagram.com/…"
    }
  ],
  "pagination": {
    "next_cursor": "Qm9v…opaque…",
    "has_more": true,
    "page_size": 200
  },
  "meta": {
    "request_id": "req_…",
    "order": "newest_first",
    "list_hidden": false,
    "cached": false,
    "cache_age_seconds": 0,
    "credits_charged": 2,
    "credits_remaining": 26945.5
  }
}

Cost, cache and limits

  • 1 credit per page. At $1.40 to $0.80 per 1,000 calls; the samples stop after 3 pages, so one run costs 3 credits at most (plus a lookup credit, below). Cache hits, failed calls and 429 answers are free; meta.credits_charged says what each call cost.
  • Lookup credit. Naming the account by a username we have not looked up in the last 7 days adds 1 lookup credit (meta.lookup_credits). Send the numeric id from any result to skip it.
  • Cache. The first page is cached for 60 seconds and later pages (with a cursor) for 15 minutes. Add fresh=true to force a live call (billed).
  • Speed. Over your plan's requests-per-second limit the API answers 429 rate_limited with Retry-After; the samples wait that long and retry.
  • Private accounts. Public data only: a private account answers 403 private_account, and that call is free.
  • Testing. A kd_test_ key returns sample data in this exact shape at no cost, so you can run the code before you spend anything.

Things to know

  • Since Instagram's September 2026 update, the in-app following list is no longer newest first. This endpoint returns the real reverse-chronological order and labels it in meta.order; strict_order=true refuses any other order (free).
  • A page can be one row short. Treat an account as unfollowed only after it is missing from several calls in a row.
  • Hidden list: 200 with an empty page and meta.list_hidden: true. Show "this list is hidden", not "no follows".
  • In a spreadsheet export, keep the id column as text, or long ids lose digits.

Next steps

Instagram following API: questions

Why is Instagram's own following list not in order any more?
Instagram changed the in-app order in September 2026. The API still returns Instagram's real reverse-chronological order and labels each response with meta.order.
How many pages is a full Instagram following list?
Pages hold about 200 accounts. Instagram lets an account follow at most 7,500 others, so the largest list is about 38 pages.

Run it on real data

One key for Instagram and TikTok. $1.40 to $0.80 per 1,000 calls; failed calls and cache hits are free.

Want to test first? Sandbox keys are free and unlimited, with sample data in the live schema.