# Instagram Related Profiles Scraper (`parsebird/instagram-related-profiles-scraper`) Actor

Find Instagram accounts similar to any profile from Instagram's "Suggested for you" list, with followers, bio, emails and phones from bios and Linktree, category and engagement. Chain discovery, seed overlap and filters. No login.

- **URL**: https://apify.com/parsebird/instagram-related-profiles-scraper.md
- **Developed by:** [ParseBird](https://apify.com/parsebird) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.89 / 1,000 related profiles

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Instagram Related Profiles Scraper

Instagram Related Profiles Scraper **finds accounts similar to any Instagram profile**, using the "Suggested for you" list Instagram shows under each profile, and returns them as a flat list with follower counts, bio, links, emails and phones found in the bio, category and engagement.

<table><tr>
<td style="border-left:4px solid #E1306C;padding:12px 16px;font-weight:600">
Enter one or more accounts, get up to about 50 lookalikes each, keep only the ones several of your accounts share, or follow the suggestion graph up to 5 levels deep to map a whole niche. No Instagram login or cookies needed.
</td>
</tr></table>

<br>

<table>
<tr>
<td colspan="3" style="padding:10px 14px;background:#E1306C;border:none;border-radius:4px 4px 0 0">
<span style="color:#FFFFFF;font-size:14px;font-weight:700;letter-spacing:0.5px">ParseBird Instagram Suite</span>
<span style="color:#FFD1E3;font-size:13px">&nbsp;&nbsp;&bull;&nbsp;&nbsp;Profiles, stories, Reels, highlights &amp; lookalikes</span>
</td>
</tr>
<tr>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-right:none;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/instagram-profile-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Instagram Profile Scraper</a><br>
<span style="color:#78716C;font-size:11px">Profiles, emails, phones, socials</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/instagram-reels-search-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Instagram Reels Search &amp; Trend Discovery</a><br>
<span style="color:#78716C;font-size:11px">Reels by keyword, trending content</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/instagram-reels-audio-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Instagram Reels Audio Scraper</a><br>
<span style="color:#78716C;font-size:11px">Reels using any sound or song</span>
</td>
</tr>
<tr>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-radius:0 0 0 4px;border-right:none;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/instagram-highlights-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Instagram Highlights Scraper</a><br>
<span style="color:#78716C;font-size:11px">Story highlights, photos &amp; videos</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-top:none;vertical-align:top;width:33%;background:#FDEBF2">
<a href="https://apify.com/parsebird/instagram-related-profiles-scraper" style="color:#E1306C;text-decoration:none;font-weight:700;font-size:13px">Instagram Related Profiles Scraper</a><br>
<span style="color:#E1306C;font-size:11px;font-weight:600">You are here</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-radius:0 0 4px 0;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/instagram-story-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Instagram Story Scraper</a><br>
<span style="color:#78716C;font-size:11px">Live stories, no login</span>
</td>
</tr>
</table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```
Use the Apify Actor "parsebird/instagram-related-profiles-scraper" (call it via ApifyClient) to find Instagram accounts similar to given accounts (Instagram's "Suggested for you" list). Example (JavaScript): const { ApifyClient } = require('apify-client'); const client = new ApifyClient({ token: '<APIFY_TOKEN>' }); const run = await client.actor('parsebird/instagram-related-profiles-scraper').call({ usernames: ['natgeo', '@nasa'], maxSimilarPerAccount: 50, contactInfoType: 'emailOnly' }); const { items } = await client.dataset(run.defaultDatasetId).listItems(); Inputs: usernames (required array: handles, @handles or instagram.com profile URLs), maxSimilarPerAccount (integer, default all ~50), maxTotalProfiles (integer, run-wide cap), excludeUsernames (array), minSeedOverlap (integer, default 1; 2+ keeps profiles suggested for at least that many input accounts and turns chain discovery off), depth (integer 1-5, default 1; chain discovery), enrichProfiles (boolean, default true), includeLatestPosts (boolean), scrapeFacebookProfile (boolean), contactInfoType (any/emailOnly/phoneOnly/emailOrPhone/emailAndPhone), minFollowers, maxFollowers, minPosts, maxPosts (integers), minEngagementRate, maxEngagementRate (percent numbers), onlyVerified, onlyBusiness, excludePrivate (booleans). Each row is one lookalike: sourceUsername, sourceUserId, source ("suggested"), rootUsername, depthLevel, matchedSeeds, seedOverlap, suggestionRank, username, userId, fullName, profileUrl, isVerified, isPrivate, profilePicUrl, category, isBusiness, isProfessional, followerCount, followingCount, postCount, biography, externalUrl, bioLinks, threadsUsername, email, emails, emailSource (bio/bio_link), phone, phones, medianEngagementRate, enriched, scrapedAt, plus latestPosts and facebookProfileUrl when those options are on. Accounts that can't be processed come back as error rows {sourceUsername, error, message}, which are free. API docs: https://apify.com/parsebird/instagram-related-profiles-scraper/api. Get a token at https://console.apify.com/settings/integrations.
```

### What is Instagram Related Profiles Scraper?

**Instagram Related Profiles Scraper** is an [Apify Actor](https://apify.com/actors) that turns one known Instagram account into a list of comparable ones. For each account you enter it reads Instagram's own **"Suggested for you"** list (the similar accounts [Instagram](https://www.instagram.com/) recommends under a profile) and returns every suggestion as a row, tagged with the account it came from.

It's built for **lead generation**, **influencer discovery**, **competitor mapping** and **niche research**: start from a customer, creator or competitor you know and get the accounts Instagram itself considers similar. It works as an Instagram similar-accounts API alternative, with no login, cookies or Instagram account needed.

### What can Instagram Related Profiles Scraper do?

- 🔎 **Lookalikes from Instagram's own graph**: up to about 50 suggested accounts per profile, in Instagram's order (`suggestionRank`).
- 🤝 **Seed overlap**: enter several accounts and keep only the profiles Instagram suggests for at least 2 (or more) of them, which gives the shared neighborhood of the whole set.
- 🕸️ **Chain discovery**: follow the graph 1 to 5 levels deep. Each row records `rootUsername`, `depthLevel` and `sourceUsername`, so the network can be rebuilt. Each profile appears (and is charged) only once per run.
- 📇 **Profile details by default**: followers, following, posts, bio, bio links, Threads username, category, business flag and median engagement rate.
- ✉️ **Contacts from public text**: emails and phone numbers found in the bio and on Linktree or lnk.bio pages the bio links to.
- 🎯 **Filters**: followers, posts, engagement rate, verified, business accounts, private accounts and "has an email/phone". Profiles you exclude, and accounts dropped by the verified/private filters, cost nothing.
- 🧯 **Hard caps**: per-account and run-wide limits, plus the maximum cost per run set in Apify Console.
- ⏱️ **Platform features**: [schedule](https://docs.apify.com/platform/schedules) runs, call it from the [Apify API](https://docs.apify.com/api/v2), get [webhooks](https://docs.apify.com/platform/integrations/webhooks), and send results to [Google Sheets, HubSpot, Make, Zapier, n8n and more](https://apify.com/integrations). Export as JSON, CSV, Excel or HTML.

### What data can you extract?

| Field | Description |
|-------|-------------|
| `sourceUsername`, `sourceUserId` | The account this lookalike was suggested for |
| `rootUsername`, `depthLevel` | The input account a chain started from, and how many hops out (1 = direct lookalike) |
| `matchedSeeds`, `seedOverlap` | Which of your input accounts Instagram suggests this profile for, and how many |
| `suggestionRank` | Position in Instagram's suggestion list (1 = first) |
| `username`, `userId`, `fullName`, `profileUrl`, `profilePicUrl` | Account identity |
| `isVerified`, `isPrivate` | Badge and privacy |
| `followerCount`, `followingCount`, `postCount` | Audience size |
| `biography`, `externalUrl`, `bioLinks`, `threadsUsername` | Bio, link buttons and Threads handle |
| `category`, `isBusiness`, `isProfessional` | Instagram category and account type |
| `medianEngagementRate` | Median (likes + comments) / followers over the latest 12 posts, in percent |
| `email`, `emails`, `emailSource`, `phone`, `phones` | Contacts found in the bio (`bio`) or on its link-in-bio page (`bio_link`) |
| `latestPosts`, `facebookProfileUrl` | Optional: 3-post preview and Facebook page link |

### How to find similar Instagram accounts

1. Open [Instagram Related Profiles Scraper](https://apify.com/parsebird/instagram-related-profiles-scraper) in Apify Console and create a free Apify account if you don't have one.
2. Add one or more accounts: `natgeo`, `@nasa` or `https://www.instagram.com/nike` all work, mixed in one run.
3. Set **Max related profiles per account**, and optionally **Min shared seeds** or **Chain discovery depth**.
4. Add filters if you need them, for example **Has an email** and **Min followers**.
5. Click **Start**, then download the list from the **Output** tab or pull it through the API.

### Input examples

#### Lookalikes of one account, with details

```json
{
    "usernames": ["natgeo"],
    "maxSimilarPerAccount": 50
}
```

#### Profiles shared by several accounts

```json
{
    "usernames": ["bonappetitmag", "nytcooking", "epicurious"],
    "minSeedOverlap": 2,
    "excludeUsernames": ["thefeedfeed"]
}
```

On October 17, 2026 this returned 8 food accounts that Instagram suggests for at least two of the three publishers.

#### Map a niche with chain discovery

```json
{
    "usernames": ["gymshark"],
    "depth": 3,
    "maxSimilarPerAccount": 10,
    "maxTotalProfiles": 150
}
```

On October 17, 2026 this saved 150 unique fitness profiles (10 at level 1, 96 at level 2, 44 at level 3) in under 4 minutes.

#### Lead list with contacts

```json
{
    "usernames": ["halfbakedharvest", "bonappetitmag"],
    "contactInfoType": "emailOnly",
    "minFollowers": 10000
}
```

#### Fast list without details

```json
{
    "usernames": ["natgeo"],
    "enrichProfiles": false
}
```

### Output example

A real row from `usernames: ["natgeo"]` (October 17, 2026; picture URL shortened):

```json
{
    "sourceUsername": "natgeo",
    "sourceUserId": "787132",
    "source": "suggested",
    "rootUsername": "natgeo",
    "depthLevel": 1,
    "matchedSeeds": ["natgeo"],
    "seedOverlap": 1,
    "suggestionRank": 2,
    "username": "pbsnature",
    "userId": "289756973",
    "fullName": "Nature",
    "profileUrl": "https://www.instagram.com/pbsnature/",
    "isVerified": true,
    "isPrivate": false,
    "profilePicUrl": "https://scontent-iad6-1.cdninstagram.com/v/t51.2885-19/...",
    "category": "Content & Apps",
    "isBusiness": true,
    "isProfessional": true,
    "followerCount": 491299,
    "followingCount": 220,
    "postCount": 1909,
    "biography": "NATURE is an award-winning signature @PBS series created by The WNET Group and made possible by all of you. #NaturePBS",
    "externalUrl": "http://sprout.link/pbsnature/",
    "bioLinks": [
        { "title": "", "url": "http://sprout.link/pbsnature/" },
        { "title": "", "url": "https://youtube.com/live/gJ-aSGU2owE" }
    ],
    "threadsUsername": null,
    "email": null,
    "emails": [],
    "emailSource": null,
    "phone": null,
    "phones": [],
    "medianEngagementRate": 0.131,
    "enriched": true,
    "scrapedAt": "2026-10-17T12:32:33Z"
}
```

An account that can't be processed comes back as an error row, which is never charged:

```json
{
    "sourceUsername": "nike",
    "error": "no_suggestions_available",
    "message": "Instagram returns no \"suggested for you\" accounts for @nike. This happens on some very large or restricted accounts - try a smaller or more niche account."
}
```

Other error codes are `invalid_input`, `account_not_found`, `private_account` and `blocked`.

### Use Instagram Related Profiles Scraper from Python or JavaScript

Install the Apify client (`pip install apify-client` or `npm install apify-client`) and use your [API token](https://console.apify.com/settings/integrations).

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")

run = client.actor("parsebird/instagram-related-profiles-scraper").call(run_input={
    "usernames": ["gymshark"],
    "maxSimilarPerAccount": 30,
    "minFollowers": 10000,
    "maxFollowers": 500000,
})

for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if not row.get("error"):
        print(row["username"], row["followerCount"], row["medianEngagementRate"], row["email"])
```

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<APIFY_TOKEN>' });

const run = await client.actor('parsebird/instagram-related-profiles-scraper').call({
    usernames: ['bonappetitmag', 'nytcooking', 'epicurious'],
    minSeedOverlap: 2,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.filter((r) => !r.error).forEach((r) => console.log(r.username, r.matchedSeeds.join(', ')));
```

### Use cases

- **Lead generation**: expand one ideal customer into a list of similar accounts, then keep the ones with a public email.
- **Influencer marketing**: find creators similar to one who already performed well, within a follower and engagement band.
- **Competitor analysis**: see which accounts Instagram places next to a competitor.
- **Agencies**: build prospect lists in a client's exact niche.
- **Partnerships**: discover adjacent brands and creators for collaborations.
- **Market research**: study how accounts cluster in a category with chain discovery.

### How it works

1. Every input is turned into a clean username. Anything that isn't an account (a post, reel or hashtag) becomes an error row instead of a wasted lookup.
2. The account is looked up to get its ID. Missing and private accounts get an error row.
3. Instagram's "Suggested for you" list for that account is read. Instagram returns up to about 50 accounts, often fewer for niche accounts.
4. With several inputs, profiles suggested for more of them come first; with **Min shared seeds** above 1, only shared profiles are kept.
5. With depth above 1, every saved profile becomes a new source, level by level. A run-wide set makes sure no profile is fetched or charged twice.
6. Each lookalike is then looked up for details (unless you turn that off), filters are applied, and the row is saved.

### How much does it cost to find similar Instagram accounts?

Instagram Related Profiles Scraper uses pay-per-event pricing. Platform usage (compute and proxies) is included in the event prices.

| Event | When it's charged | Free | Bronze | Silver | Gold |
|-------|-------------------|------|--------|--------|------|
| Related profile | Each lookalike saved to the dataset | $0.00299 | $0.00249 | $0.00219 | $0.00189 |
| Enrichment | Each lookalike looked up for details | $0.00399 | $0.00349 | $0.00299 | $0.00249 |

- **With details (default)**: $6.98 per 1,000 profiles on the Free plan, $4.38 on Gold.
- **Without details** (`enrichProfiles: false`): $2.99 per 1,000 on Free, $1.89 on Gold.
- **Filters**: a profile dropped by a follower, post, engagement, business or contact filter isn't charged the related-profile fee, but its enrichment lookup is. The verified and private filters and `excludeUsernames` are checked before any lookup, so those accounts are free.
- **Error rows** are free.

Example: the 150-profile Gymshark run above costs about $1.05 on the Free plan. Set **Max profiles in total** and the maximum cost per run in Apify Console to stay within budget.

### Is it legal to scrape Instagram related profiles?

This Actor only reads information Instagram shows publicly to logged-out visitors: the suggestion list, public profile details, and contact details that account owners put in their own bio or link page. Scraping publicly available data is generally legal, but personal data is protected by laws such as GDPR and CCPA, and you are responsible for how you use it, including for outreach. Follow Instagram's terms and local laws, and if you aren't sure, consult a lawyer. Read more on the [Apify blog about web scraping legality](https://blog.apify.com/is-web-scraping-legal/).

This Actor is unofficial and isn't affiliated with, endorsed by or sponsored by Instagram or Meta.

### Other Instagram scrapers from ParseBird

- [Instagram Profile Scraper](https://apify.com/parsebird/instagram-profile-scraper): full profile details, bio links, emails and phones for a list of accounts.
- [Instagram Reels Search Scraper](https://apify.com/parsebird/instagram-reels-search-scraper): Reels for any keyword, with views, likes and authors.
- [Instagram Reels Audio Scraper](https://apify.com/parsebird/instagram-reels-audio-scraper): every Reel that uses a given sound.
- [Instagram Highlights Scraper](https://apify.com/parsebird/instagram-highlights-scraper): story highlights of public profiles.

### FAQ

**How many similar accounts do I get per profile?**
Whatever Instagram suggests: up to about 50 for most public accounts, fewer (sometimes around 10) for niche ones. Instagram returns the same list on every call, so use several input accounts or chain discovery to get more.

**Why did an account return no suggestions?**
Instagram shows no suggestion list for some very large brand accounts (for example `nike`) and for private accounts. You get an error row that explains this, free of charge. Try a smaller or more niche account.

**Why are `category` and `medianEngagementRate` empty for some profiles?**
Instagram's public profile service returns an error for some accounts, mostly business accounts with a category. For those, the category, account type and engagement can't be read without logging in, so they stay empty. The post count then comes from the profile page, where Instagram rounds large numbers (10K). In our October 17, 2026 tests, between about 40% and 70% of profiles per run had these fields filled.

**Where do the emails and phones come from?**
From the profile's bio text and from Linktree or lnk.bio pages its bio links to (`emailSource` says which). Instagram's contact buttons (business email and phone) are only shown to logged-in users, so they aren't included.

**Does it include "business category" recommendations or account history?**
No. Instagram's same-category recommendations and the "About this account" panel (join date, country, former usernames) are only available when logged in. This Actor works without a login.

**Do I need an Instagram account or cookies?**
No. Everything comes from what Instagram shows logged-out visitors.

**Can I use it through the API?**
Yes. Use the [API tab](https://apify.com/parsebird/instagram-related-profiles-scraper/api) or the Python and JavaScript examples above. You can also run it from Make, Zapier or n8n.

**Something is missing or broken?**
Open an issue on the [Issues tab](https://apify.com/parsebird/instagram-related-profiles-scraper/issues).

# Changelog

This Actor's version history is a separate document: https://apify.com/parsebird/instagram-related-profiles-scraper/changelog.md

# Actor input Schema

## `usernames` (type: `array`):

Add the accounts to find lookalikes for: usernames (natgeo), @handles (@nasa) or profile links (https://www.instagram.com/nike). Post, reel and hashtag links aren't supported.

## `maxSimilarPerAccount` (type: `integer`):

Cap on lookalikes taken from each source account. Instagram suggests up to about 50 per account. Leave empty for all.

## `maxTotalProfiles` (type: `integer`):

Hard cap on profiles saved (and charged) across the whole run. Recommended with chain discovery.

## `excludeUsernames` (type: `array`):

Accounts never to return, such as your own brand or creators you already work with. They are dropped before any lookup and never charged.

## `minSeedOverlap` (type: `integer`):

Keep only profiles Instagram suggests for at least this many of your accounts. 2 or more finds the lookalikes of the whole set. Turns chain discovery off.

## `depth` (type: `integer`):

Follow the suggestion graph 1 to 5 levels deep. Level 2 also fetches the lookalikes of every profile found at level 1, and so on. Every profile appears only once per run. Set Max profiles in total to control size.

## `enrichProfiles` (type: `boolean`):

Look up each lookalike to add followers, following, posts, bio, links, emails and phones from the bio and Linktree/lnk.bio pages, category, business flag and median engagement. Charged as one enrichment per profile looked up. Any filter below that needs these fields turns this on.

## `includeLatestPosts` (type: `boolean`):

Attach a preview of each profile's 3 latest posts (link, likes, comments, caption, image), when Instagram returns them.

## `scrapeFacebookProfile` (type: `boolean`):

Put the profile's linked Facebook page, or a Facebook link from its bio, on facebookProfileUrl. Facebook itself is not opened.

## `contactInfoType` (type: `string`):

Keep only profiles where an email and/or phone number was found in the bio or on its Linktree/lnk.bio page.

## `minFollowers` (type: `integer`):

Drop lookalikes below this follower count.

## `maxFollowers` (type: `integer`):

Drop lookalikes above this follower count, for example to keep micro and mid-tier creators.

## `minEngagementRate` (type: `number`):

Median (likes + comments) / followers over the latest 12 posts, in percent. Profiles whose rate can't be measured are dropped.

## `maxEngagementRate` (type: `number`):

Upper bound of the median engagement rate, in percent. Profiles whose rate can't be measured are dropped.

## `minPosts` (type: `integer`):

Drop lookalikes with fewer posts.

## `maxPosts` (type: `integer`):

Drop lookalikes with more posts.

## `onlyVerified` (type: `boolean`):

Return only accounts with a verification badge. Checked before any lookup, so dropped accounts cost nothing.

## `onlyBusiness` (type: `boolean`):

Keep only professional (business or creator) accounts. Profiles whose account type Instagram doesn't return are dropped.

## `excludePrivate` (type: `boolean`):

Drop private lookalikes. Private accounts never seed the next level of chain discovery either way.

## Actor input object example

```json
{
  "usernames": [
    "natgeo"
  ],
  "maxSimilarPerAccount": 20,
  "minSeedOverlap": 1,
  "depth": 1,
  "enrichProfiles": true,
  "includeLatestPosts": false,
  "scrapeFacebookProfile": false,
  "contactInfoType": "any",
  "onlyVerified": false,
  "onlyBusiness": false,
  "excludePrivate": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {
    "usernames": [
        "natgeo"
    ],
    "maxSimilarPerAccount": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/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 = {
    "usernames": ["natgeo"],
    "maxSimilarPerAccount": 20,
}

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

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

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

```

## CLI example

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parsebird/instagram-related-profiles-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

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