# Instagram related profiles scraper (`supreme_coder/instagram-related-profiles-scraper`) Actor

Scrape the related / suggested profiles Instagram shows for any account

- **URL**: https://apify.com/supreme\_coder/instagram-related-profiles-scraper.md
- **Developed by:** [Supreme Coder](https://apify.com/supreme_coder) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Instagram Related Profiles Scraper

Find the **related / suggested profiles** Instagram recommends for any account — the "Suggested for you" accounts shown on a profile — and export them to JSON, CSV or Excel.

Give it one or more Instagram accounts and get back, for each one, the profiles Instagram associates with it: username, full name, user ID, whether they are verified or private, and their profile picture. Great for competitor and influencer discovery, audience research, lookalike lists and mapping niches.

### What you get

For every input account, one row per related profile:

| Field | Description |
|---|---|
| `username` | Handle of the related profile |
| `fullName` | Display name |
| `userId` | Instagram numeric user ID |
| `isVerified` | Whether the account is verified |
| `isPrivate` | Whether the account is private |
| `profilePicUrl` | Profile picture URL |
| `followerCount` | Follower count when Instagram includes it |
| `profileUrl` | Direct link to the profile |
| `sourceUsername` / `sourceUserId` / `sourceFullName` | The account these suggestions belong to |
| `scrapedAt` | When the record was collected |

### Input

- **Instagram profiles** — usernames (`nike`), profile URLs (`https://www.instagram.com/nike/`) or numeric user IDs, one per line.
- **Max related profiles per account** — cap per account (Instagram returns up to ~50). `0` = all.
- **Max results** — overall cap across all accounts. `0` = no limit.
- **Session cookies** *(optional)* — only needed for private accounts or accounts Instagram hides behind a login. Most public accounts need nothing here.

#### Example input

```json
{
    "profiles": ["therock", "https://www.instagram.com/nasa/"],
    "maxRelatedPerProfile": 0,
    "maxItems": 0
}
```

#### Example output

```json
{
    "username": "beargrylls",
    "fullName": "Bear Grylls",
    "userId": "232192182",
    "isVerified": true,
    "isPrivate": false,
    "profilePicUrl": "https://instagram.f...jpg",
    "followerCount": null,
    "profileUrl": "https://www.instagram.com/beargrylls/",
    "sourceUsername": "therock",
    "sourceUserId": "232192182",
    "sourceFullName": "Dwayne Johnson",
    "scrapedAt": "2026-08-05T00:00:00.000Z"
}
```

### Notes

- **Not every account has suggestions.** Instagram only shows related profiles for some accounts; when it shows none, the run records that clearly for that account instead of failing.
- **Private and some business accounts** may require session cookies. If a run reports a login is needed, add cookies as described above and re-run.
- Results reflect what Instagram shows publicly and can change over time.

# Actor input Schema

## `profiles` (type: `array`):

Accounts to get related profiles for — a username ("nike"), a profile URL ("https://www.instagram.com/nike/") or a numeric user ID. One per line.

## `maxRelatedPerProfile` (type: `integer`):

Cap how many related profiles to keep for each input account. Instagram returns up to ~50. Set to 0 for all of them.

## `maxItems` (type: `integer`):

Maximum number of related-profile records to collect across all input accounts. Set to 0 for no limit.

## `cookies` (type: `array`):

Only needed for private accounts, or accounts Instagram hides behind a login. Leave empty for normal public accounts. To get them: install the Cookie-Editor browser extension, log in to Instagram, open the extension on instagram.com and Export, then paste the result here.

## `minDelay` (type: `integer`):

Minimum pause between accounts.

## `maxDelay` (type: `integer`):

Maximum pause between accounts.

## Actor input object example

```json
{
  "profiles": [
    "therock",
    "https://www.instagram.com/nasa/"
  ],
  "maxRelatedPerProfile": 0,
  "maxItems": 0,
  "minDelay": 1,
  "maxDelay": 4
}
```

# Actor output Schema

## `relatedProfiles` (type: `string`):

Every related / suggested profile (username, full name, user ID, verified and private flags, profile picture) as one item per account in the default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "profiles": [
        "instagram",
        "natgeo"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("supreme_coder/instagram-related-profiles-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "profiles": [
        "instagram",
        "natgeo",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("supreme_coder/instagram-related-profiles-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "profiles": [
    "instagram",
    "natgeo"
  ]
}' |
apify call supreme_coder/instagram-related-profiles-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=supreme_coder/instagram-related-profiles-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vOBD0hLior4DtOjMp/builds/Vup6HNHYQJY8WYGIo/openapi.json
