# Instagram Followers API

> List a public Instagram account's followers newest first as JSON, 25 per page with cursor pagination. See who followed an account most recently. 1 credit per page.

**List the followers of a public Instagram account, newest first.** `position: 1` is the account's most recent follower. Pages hold up to 25 accounts; page on with the cursor.

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

**Cost:** 1 credit per page of up to 25 accounts (free from cache), about $0.058 to $0.033 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)).

## 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. Omit for the first page. |
| `strict_order` | query | `true`: answer `503 order_unavailable` (free) instead of a list whose order is not newest first. |
| `fresh` | query | `true` skips the cache. |

## Response

```json
{
  "data": [
    { "position": 1, "id": "6860189", "username": "new_follower", "full_name": "New Follower", "is_private": false, "is_verified": false, "profile_pic_url": "https://scontent.cdninstagram.com/…" },
    { "position": 2, "id": "3141592", "username": "coffee.place", "full_name": "Coffee Place", "is_private": false, "is_verified": false, "profile_pic_url": "https://scontent.cdninstagram.com/…" }
  ],
  "pagination": { "next_cursor": "kJx1…opaque…Qw", "has_more": true, "page_size": 25 },
  "meta": { "request_id": "req_…", "order": "newest_first", "list_hidden": false, "cached": false, "cache_age_seconds": 0, "credits_charged": 1, "credits_remaining": 26947.5 }
}
```

- `meta.order` is `newest_first`, or `unspecified` on the rare call where only a list in another order was available. Use `strict_order=true` to never receive an unspecified list.
- `meta.list_hidden: true` means the account hides its followers from everyone: the page is empty, the list is not.
- **A page can be one row short.** Now and then one account is missing from a call while the rest stay in order. Never treat an account missing from one call as an unfollow; confirm it over several calls.

## Examples

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

```python
import os, requests
H = {"X-Api-Key": os.environ["HANDLEHAUL_API_KEY"]}
url, params, rows = "https://api.handlehaul.com/v1/users/natgeo/followers", {}, []
for _ in range(4):                       # newest 100 followers
    body = requests.get(url, headers=H, params=params, timeout=30).json()
    rows += body["data"]
    if not body["pagination"]["has_more"]:
        break
    params = {"cursor": body["pagination"]["next_cursor"]}
```

```javascript
let cursor = null, rows = [];
do {
  const url = new URL("https://api.handlehaul.com/v1/users/natgeo/followers");
  if (cursor) url.searchParams.set("cursor", cursor);
  const body = await (await fetch(url, { headers: { "X-Api-Key": process.env.HANDLEHAUL_API_KEY } })).json();
  rows.push(...body.data);
  cursor = body.pagination.next_cursor;
} while (cursor && rows.length < 100);
```

```php
$ch = curl_init("https://api.handlehaul.com/v1/users/natgeo/followers");
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/followers", 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"])
```

## Errors

| Status | Code | When |
|---|---|---|
| 403 | `private_account` | The account is private (free) |
| 404 | `user_not_found` | No such account (free) |
| 400 | `invalid_cursor` | The cursor is from another endpoint or account |
| 503 | `order_unavailable` | `strict_order=true` and no newest-first list was available (free) |

## FAQ

### How can I see someone's newest Instagram followers with an API?
Call `GET /v1/users/{username}/followers`. The list is newest first: `data[0]` (position 1) is the most recent follower.

### Can the API tell me when someone followed an account?
No. Instagram does not share follow dates with anyone. The API gives the order (newest first), never a follow time.

### How many followers can I get?
As many as the account has, 25 per page. Each page costs 1 credit, so read only as deep as you need: the newest rows are on page one.
