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

Discover lookalike and related Instagram profiles from seed accounts — ideal for B2B lead-gen, influencer discovery, and competitor mapping. Provider-backed, cookieless, no login.

- **URL**: https://apify.com/khadinakbar/find-instagram-related-profiles-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, Lead generation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 related profile founds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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 **lookalike and related Instagram profiles** from public seed accounts. Agencies, brand teams, and lead-gen workflows get one dataset row per related handle with username, follower count when exposed, verification, business category, website, and the seed that surfaced it. The Actor is cookieless, needs no Instagram login, and is built for Console, API, and AI agents on Apify.

Designed for competitor mapping, influencer prospecting, and B2B lookalike lists that start from one or more public Instagram handles.

### Best fit

- You have public Instagram handles or profile URLs and want the accounts Instagram publicly clusters as **related / suggested**.
- You want structured lookalike rows (`username`, `followersCount`, `businessCategory`, `externalUrl`, `seedUsername`) instead of a screenshot of the Suggestions rail.
- After a handle shortlist, start here, then enrich bios and contacts with [Instagram Profile Scraper](https://apify.com/khadinakbar/instagram-profile-scraper) when you need full profile details, or pass `externalUrl` into [Bulk Website Contact Extractor](https://apify.com/khadinakbar/bulk-website-contact-extractor) for emails. This Actor stays focused on related-profile discovery.

### Workflow: from a competitor seed to a lookalike list

A fitness brand starts with one public competitor, `gymshark`. It runs this Actor with `usernames: ["gymshark"]` and `maxRelatedPerSeed: 20`. Next it exports the overview view, keeps rows with a website and a public account, and feeds those handles to profile or contact enrichment. The same flow works for a batch of niche seeds when `deduplicateAcrossSeeds` is on, so overlapping lookalikes appear once.

### How it works

1. Normalize seed usernames and profile URLs.
2. Fetch each public seed via ScrapeCreators `/v1/instagram/profile` (primary) and unwrap `edge_related_profiles`.
3. If that seed is empty or blocked, retry SociaVault `/v1/scrape/instagram/profile`.
4. Apply `maxRelatedPerSeed`, `maxTotalResults`, optional private/follower filters, and cross-seed dedupe.
5. Charge `related-profile-found` only after a real related row is saved.

Unknown or empty seeds finish as `VALID_EMPTY`. Missing provider keys finish as `CONFIG_ERROR`. Required upstream outages with no rows finish as `UPSTREAM_FAILED`.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `usernames` | array (required) | `["gymshark"]` | Public handles, @handles, or profile URLs |
| `maxRelatedPerSeed` | integer | 20 | Cap per seed (quality prefill is 3) |
| `maxTotalResults` | integer | 500 | Hard cap across the run |
| `deduplicateAcrossSeeds` | boolean | true | Keep each related username once |
| `skipPrivateProfiles` | boolean | false | Drop private related accounts |
| `minFollowers` | integer | 0 | Keep rows at or above this follower count when the stub includes it |
| `providerOrder` | enum | `scrapecreators-first` | Public-data provider priority |

#### Quick start input

```json
{
  "usernames": ["gymshark"],
  "maxRelatedPerSeed": 3,
  "maxTotalResults": 10,
  "deduplicateAcrossSeeds": true,
  "skipPrivateProfiles": false,
  "minFollowers": 0,
  "providerOrder": "scrapecreators-first"
}
```

That input is the quality-test sample: one public brand seed, a few related rows, and a short run.

### Output

One dataset item is one related Instagram profile. Download JSON, CSV, Excel, or HTML from the dataset tab. Every run also writes `OUTPUT` and `RUN_SUMMARY` with the outcome, row counts, and charged events.

```json
{
  "username": "gymsharkwomen",
  "fullName": "Gymshark Women",
  "biography": null,
  "profileUrl": "https://www.instagram.com/gymsharkwomen/",
  "followersCount": null,
  "isVerified": true,
  "isPrivate": false,
  "businessCategory": null,
  "externalUrl": null,
  "seedUsername": "gymshark",
  "seedProfileUrl": "https://www.instagram.com/gymshark/",
  "provider": "scrapecreators",
  "scrapedAt": "2026-08-18T13:00:00.000Z"
}
```

| Field | What it answers |
| --- | --- |
| `username` + `profileUrl` | Which related public profile Instagram surfaced |
| `fullName` + `isVerified` + `isPrivate` | Display identity and visibility |
| `followersCount` / `businessCategory` / `externalUrl` | Lead-gen fields when the related stub includes them |
| `seedUsername` | Which seed produced this lookalike |
| `provider` | `scrapecreators` or `sociavault` |
| `outcome` (in `OUTPUT`) | COMPLETE, PARTIAL, VALID\_EMPTY, INVALID\_INPUT, UPSTREAM\_FAILED, or CONFIG\_ERROR |

### Pricing

This Actor uses Pay per event plus Apify platform usage. Open the live Pricing tab for current event details, and use Apify's run cost controls to keep the workflow aligned with your budget.

| Event | Price | Charged when |
| --- | --- | --- |
| Actor start | $0.00005 | Once per run (scaled by memory) |
| `related-profile-found` | $0.005 | Each saved related-profile row |

| Run | Related rows | Event cost (approx.) |
| --- | --- | --- |
| 1 seed × 3 related | 3 | ~$0.015 |
| 10 seeds × 20 related | 200 | ~$1.00 |

`VALID_EMPTY` and `INVALID_INPUT` runs are not billed for related rows. Platform usage is billed on top at Apify's rates — the live Pricing tab is the current source of truth.

### API example

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~find-instagram-related-profiles-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"usernames":["gymshark"],"maxRelatedPerSeed":3}'
```

Then read the dataset and the `OUTPUT` record for outcome, row counts, and charged events.

### AI agent usage

> Find Instagram lookalike accounts from a public seed handle.
> Tool: `khadinakbar/find-instagram-related-profiles-scraper`
> Input: `{"usernames":["gymshark"],"maxRelatedPerSeed":3}`
> Read dataset rows for `username`, `profileUrl`, `seedUsername`, and `externalUrl`. Then optionally enrich with Instagram Profile Scraper. Cost is $0.005 per related row plus platform usage. Empty related lists are `VALID_EMPTY`, not billed.

### Best results

- Seed with **niche or brand** accounts. Mega-publishers sometimes expose few related profiles.
- Keep `maxRelatedPerSeed` at 3–20; Instagram rarely returns more than it already shows on the profile.
- Turn on `skipPrivateProfiles` when you need contactable public accounts.
- When `externalUrl` is present, pass it to contact extraction instead of guessing emails from the handle.

### Builder's note

I built this after live probes of native `web_profile_info` and two public-data vendors. Native Instagram often 429s without a residential crawler, while ScrapeCreators `/v1/instagram/profile` returned `edge_related_profiles.edges` (49 related handles for `gymshark` in the probe). SociaVault exposes the same nested user object. The first deploy stored the provider envelope instead of the user node, so related arrays looked empty even when the vendor had them — unwrapping `data.user` (and SociaVault `data.data.user`) is the contract that actually yields lookalike rows. I billed per saved related profile because empty seeds are a valid Instagram outcome, not a product failure.

### Responsible use

Use this Actor on public Instagram profiles you are authorized to research for legitimate competitor mapping, influencer discovery, or lead generation. It reads **public related-profile suggestions only**. Follow Instagram's terms of service, GDPR, CCPA, and applicable laws. Users are responsible for how they use the exported list.

### Changelog

- **0.1.11–0.1.12** — Recursive related-profile unwrap, flat OUTPUT/RUN\_SUMMARY contract, gymshark quality prefill, 512 MB defaults.
- **0.1** — Initial private related-profiles actor.

# Actor input Schema

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

Instagram handles (e.g. 'nike', '@adidas') or full profile URLs. Each seed will return up to maxRelatedPerSeed lookalike accounts that Instagram publicly recommends. Use these for influencer discovery, competitor mapping, and lead-gen prospecting.

## `maxRelatedPerSeed` (type: `integer`):

How many related/lookalike profiles to save per seed account. Instagram typically returns 6–20 per account. Higher values don't yield more than Instagram exposes.

## `maxTotalResults` (type: `integer`):

Hard cap on total rows written to the dataset. Useful for budget control in large batch runs.

## `deduplicateAcrossSeeds` (type: `boolean`):

When enabled (default), each unique username is written only once even if Instagram recommends it from multiple seed accounts. Disable to see which seeds share a lookalike audience.

## `skipPrivateProfiles` (type: `boolean`):

Filter out related profiles that Instagram flags as private. Useful for lead-gen workflows where you need contactable public accounts.

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

Only include related profiles with at least this many followers. Set to 0 (default) to include all. Note: follower count is returned only when the provider includes it in the related-profile stub.

## `providerOrder` (type: `string`):

Controls which API provider fetches Instagram data. ScrapeCreators is the primary (higher coverage); SociaVault is the fallback. Change only if you are experiencing rate limits.

## Actor input object example

```json
{
  "usernames": [
    "nike",
    "adidas",
    "https://www.instagram.com/patagonia/"
  ],
  "maxRelatedPerSeed": 3,
  "maxTotalResults": 10,
  "deduplicateAcrossSeeds": true,
  "skipPrivateProfiles": false,
  "minFollowers": 0,
  "providerOrder": "scrapecreators-first"
}
```

# Actor output Schema

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

One row per related Instagram profile with username, follower count, verification, business category, and seed attribution.

## `runSummary` (type: `string`):

Run diagnostics, provider telemetry, counts, stop reason, and estimated PPE cost.

## `output` (type: `string`):

Same summary under the OUTPUT key for stable agent readback evidence.

# 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": [
        "gymshark"
    ],
    "maxRelatedPerSeed": 3,
    "maxTotalResults": 10,
    "minFollowers": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/find-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": ["gymshark"],
    "maxRelatedPerSeed": 3,
    "maxTotalResults": 10,
    "minFollowers": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/find-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": [
    "gymshark"
  ],
  "maxRelatedPerSeed": 3,
  "maxTotalResults": 10,
  "minFollowers": 0
}' |
apify call khadinakbar/find-instagram-related-profiles-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/find-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/YKNmi5KSAAr0C8VM5/builds/f3dTfLif5QRlcPcXB/openapi.json
