# Instagram Following API

> List the accounts a public Instagram profile follows, newest first, as JSON: about 200 per page with cursor pagination. See who someone followed recently. 1 credit per page.

**List the accounts a public Instagram profile follows, newest first**: see who it followed most recently. Pages hold about 200 accounts, so one call usually covers weeks of new follows.

```
GET https://api.handlehaul.com/v1/users/{user}/following
```

**Cost:** 1 credit per page of up to about 200 accounts (free from cache), about $0.007 to $0.004 per 1,000 rows. Failed calls are free. Naming the account by a username we have to look up adds 1 credit; send the numeric id to skip it ([details](/pricing#usernames-and-ids)).

Since Instagram's September 2026 update, the following list in the app is no longer shown newest first. This endpoint returns it in real reverse-chronological order and says so in `meta.order`.

## Parameters

| Parameter | In | Description |
|---|---|---|
| `user` | path | Numeric user id (cheapest) or username. A username we have to look up costs 1 extra credit ([why](/docs/pricing#usernames-and-ids)). All digits = an id; write `@12345` for an all-digit username. |
| `by` | query | Optional. `username` or `id`: says which one `user` is, instead of guessing from the digits. |
| `cursor` | query | `pagination.next_cursor` from the previous page. |
| `strict_order` | query | `true`: refuse (free) rather than return a list that is not newest first. |
| `fresh` | query | `true` skips the cache. |

## Response

```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 }
}
```

A page can occasionally be one row short; never report a missing row as an unfollow on its own. See [newest-first order](/docs/newest-first-order).

## Examples

```bash
curl "https://api.handlehaul.com/v1/users/natgeo/following" -H "X-Api-Key: $HANDLEHAUL_API_KEY"
```

```python
import os, requests
r = requests.get("https://api.handlehaul.com/v1/users/natgeo/following",
                 headers={"X-Api-Key": os.environ["HANDLEHAUL_API_KEY"]}, timeout=30)
for row in r.json()["data"][:10]:
    print(row["position"], row["username"])
```

```javascript
const body = await (await fetch("https://api.handlehaul.com/v1/users/natgeo/following", {
  headers: { "X-Api-Key": process.env.HANDLEHAUL_API_KEY },
})).json();
const latest = body.data.slice(0, 10).map((u) => u.username);
```

```php
$ch = curl_init("https://api.handlehaul.com/v1/users/natgeo/following");
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => ["X-Api-Key: " . getenv("HANDLEHAUL_API_KEY")],
    CURLOPT_RETURNTRANSFER => true,
]);
$body = json_decode(curl_exec($ch), true);
print_r($body["data"]);
```

```go
req, _ := http.NewRequest("GET", "https://api.handlehaul.com/v1/users/natgeo/following", nil)
req.Header.Set("X-Api-Key", os.Getenv("HANDLEHAUL_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer res.Body.Close()
var body map[string]any
json.NewDecoder(res.Body).Decode(&body)
fmt.Println(body["data"])
```

## FAQ

### How do I see who someone recently followed on Instagram with an API?
Call `GET /v1/users/{username}/following`. The list is newest first, so the first rows are the accounts they followed most recently.

### Why is Instagram's own following list not in order any more?
Instagram changed the in-app order in September 2026. The HandleHaul API still returns Instagram's real reverse-chronological order and labels each response with `meta.order`.

### How do I detect new follows over time?
Call the endpoint on a schedule and compare the top of the list with your last result. Treat an account as unfollowed only after it is missing from several calls in a row. Code: [Detect new followers and follows](/docs/detect-new-instagram-followers-api).
