> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Instagram Followers & Following API

> Extract the followers or following list of any public Instagram account: handle, name, verification, and privacy

`POST /v1/data/instagram/followers/run`

**Pricing:** $0.00075 per profile ($0.75 per 1,000).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**usernames** `string` *required*

An Instagram username (e.g. natgeo) or full profile URL (e.g. [https://www.instagram.com/natgeo/](https://www.instagram.com/natgeo/)) whose followers or following list you want to pull.

Format e.g. `https://www.instagram.com/natgeo/`.

**dataToScrape** `string` (default: Followers)

Whether to fetch the account's followers or the accounts it follows.

Allowed values: `Followers`, `Followings` (Following).

**maxResults** `integer`

Number of profiles to return (50-500,000). Use 0 for all.

Min `50`; max `500000`.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/instagram/followers/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "usernames": "natgeo",
    "dataToScrape": "Followers",
    "maxResults": 50
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/instagram/followers/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "usernames": "natgeo",
    "dataToScrape": "Followers",
    "maxResults": 50
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/instagram/followers/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "usernames": "natgeo",
  "dataToScrape": "Followers",
  "maxResults": 50
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one profile, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `username` | Username | text |
| `profileUrl` | Profile URL | url |
| `instagramUserId` | Instagram User ID | text |
| `fullName` | Full Name | text |
| `verified` | Verified | boolean |
| `private` | Private | boolean |
| `profilePicture` | Profile Picture | image |
| `sourceAccount` | Source Account | text |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "instagram/followers",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "sourceAccount": "natgeo",
      "verified": false,
      "fullName": null,
      "profileUrl": "https://www.instagram.com/sultain_21/",
      "private": true,
      "profilePicture": "https://scontent-bru2-1.cdninstagram.com/v/t51.82787-19/774184831_18042658466809598_4155877808742313299_n.jpg?stp=dst-jpg_e0_s150x150_tt6&efg=eyJ2ZW5jb2RlX3R...",
      "username": "sultain_21",
      "instagramUserId": "54337225597"
    }
  ]
}
```

## Related APIs

For full profiles of the accounts use [`instagram/profiles`](https://docs.mindcase.co/apis/instagram/profiles).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.