Instagram Related Person Scraper: Connected Accounts Discovery avatar

Instagram Related Person Scraper: Connected Accounts Discovery

Pricing

$24.99/month + usage

Go to Apify Store
Instagram Related Person Scraper: Connected Accounts Discovery

Instagram Related Person Scraper: Connected Accounts Discovery

Discover and scrape related Instagram profiles with the Instagram Related Person Scraper. Extract usernames, full names, bios, follower counts, and engagement stats. Ideal for influencer research, competitor analysis, and audience insights. Fast, accurate, and scalable for bulk profile discovery.

Pricing

$24.99/month + usage

Rating

0.0

(0)

Developer

Scrapier

Scrapier

Maintained by Community

Actor stats

0

Bookmarked

28

Total users

0

Monthly active users

5 days ago

Last modified

Share

Instagram Related Person Scraper: Connected Accounts Discovery maps the related-accounts network across multiple Instagram seed profiles at once, returning each seed's suggested accounts alongside the shared connections that appear across two or more seeds and a centrality score ranking the most-connected accounts in a niche. Every response is structured JSON — ready to pass directly to an LLM, index into a vector store, or feed a monitoring pipeline. Point it at a set of competitors or creators and get back the audience overlap map, not just isolated lists.

Instagram Related Person Scraper: Connected Accounts Discovery is a Scrapier Actor that queries Instagram's "Similar accounts" (related/suggested accounts) endpoint for a list of seed profiles and computes the overlap between them. No Instagram account is required to start a run, but Instagram login-walls the related-accounts endpoint itself — most logged-out runs return an empty related list with an error field, so a fresh sessionid cookie is needed to reliably pull live data. The Actor returns three linked result types: per-seed related-profile lists, cross-seed shared connections, and a one-row network summary.

  • Fetches each seed profile's related/suggested accounts ("Similar accounts")
  • Detects shared connections — accounts that appear in two or more seeds' related lists
  • Builds directed network edges (seed → related) and a normalized centrality score per shared node
  • Surfaces the single most-connected account across the whole seed set in one summary row
  • Accepts seed profiles as full URLs, @handles, or plain usernames
  • Optional sessionId cookie to bypass Instagram's logged-out login wall

The Actor writes three row types to the dataset, distinguished by a rowType field:

Result TypeExtracted FieldsPrimary Use Case
Seed profile (rowType: "seed")username, limit, related_profiles_count, related_profiles[] (each: id, full_name, is_private, is_verified, profile_pic_url, username), errorPer-account related/suggested-accounts list
Shared connection (rowType: "shared")username, seedCount, seeds[], centralityScore, sharedConnections[]Accounts reached by 2+ seeds — the overlap layer
Network summary (rowType: "summary")username (=mostCentral), seedCount, totalRelated, sharedCount, mostCentral, centralityScore, sharedConnections[], networkEdges[]One-row snapshot of the whole run's network graph

Shared connections & centrality score

This is the layer a plain single-profile related-accounts lookup can't produce: instead of returning three disconnected suggestion lists for three seeds, the Actor cross-references them. Any account that shows up in two or more seeds' related lists becomes a shared row, carrying seedCount (how many seeds point to it), the actual seeds[] that point to it, and a centralityScoreseedCount normalized by the total number of seeds in the run (0–1). A final summary row rolls the whole run into one object: totalRelated (total seed→related edges), sharedCount (how many shared nodes were found), and mostCentral (the single most-connected username), plus the complete sharedConnections[] and networkEdges[] arrays for building a graph.

{
"rowType": "shared",
"username": "underarmour",
"seedCount": 3,
"seeds": ["adidas", "nike", "puma"],
"centralityScore": 1.0,
"sharedConnections": [
{ "username": "underarmour", "seedCount": 3, "seeds": ["adidas", "nike", "puma"], "centralityScore": 1.0 }
]
}

Every seed you supply also gets its own rowType: "seed" row with the raw related-accounts list Instagram serves for that one profile — related_profiles_count and the related_profiles[] array of {id, full_name, is_private, is_verified, profile_pic_url, username} objects. This is the base layer the network computation is built from, and it's useful on its own for expanding a single competitor's or creator's audience without needing the multi-seed overlap.

Why not build this yourself?

Instagram's related/suggested-accounts graph isn't exposed by any official, publicly documented Instagram API tier — there's no endpoint you can request an API key for that returns "similar accounts" for a given profile. Reaching it means calling Instagram's internal web endpoint directly, which requires a bootstrapped web session (app ID, CSRF token, and browser-shaped headers), Chrome TLS impersonation to avoid immediate blocks, and residential proxies to survive rate limiting. On top of that, the endpoint is login-walled for most logged-out requests, so unlocking live data also means handling session cookies correctly. Building and maintaining that pipeline — plus the overlap and centrality computation on top of it — is the ongoing work this Actor replaces.

  1. Open the Actor on its Scrapier store listing on Apify.
  2. Add two or more seedProfiles — full URLs, @handles, or plain usernames. No field is strictly required to start a run: leaving seedProfiles empty makes the Actor fall back to a demo pair (nike, adidas) so you can preview the output shape, but a real run needs your own seeds.
  3. Set relatedPerSeed (default 50) to control how many related accounts to pull per seed, and paste a sessionId cookie if you want to get past Instagram's logged-out login wall.
  4. Start the run.
  5. Read the per-seed, shared-connection, and summary rows from the dataset as JSON or CSV, or open the "Network Overlap & Centrality" dataset view for the overlap-focused columns.

Example run input:

{
"seedProfiles": ["https://www.instagram.com/nike/", "https://www.instagram.com/adidas/", "https://www.instagram.com/puma/"],
"relatedPerSeed": 50,
"proxyConfiguration": { "useApifyProxy": true }
}

How to run multiple queries in one job

seedProfiles is an array, so a single run maps as many seed profiles as you list in one job — the Actor fetches each seed's related accounts in sequence, then computes the overlap and centrality across all of them together. There's no separate batch endpoint or upload file; you just list every profile you want mapped as one niche or competitive set in the same input.

⬇️ Input

ParameterRequiredTypeDescriptionExample Value
seedProfilesNoarrayTwo or more Instagram profiles to map as a network. Each seed's related accounts are fetched, then overlaps across seeds are computed. Accepts full URLs, @handles, or plain usernames.["https://www.instagram.com/nike/", "https://www.instagram.com/adidas/"]
relatedPerSeedNointegerHow many related/suggested accounts to pull for each seed profile before computing overlaps (min 0, max 10000, default 50). Higher = a denser network graph.50
sessionIdNostring (secret)Optional Instagram sessionid cookie value. Instagram login-walls the related-accounts endpoint when logged out, so most public runs return no related data. Paste a fresh sessionid from a logged-in browser session to unlock live data."12345678%3AAbCd...%3A12"
proxyConfigurationNoobjectEnable Apify Proxy for reliable scraping. Residential proxies reduce blocks and rate limits. Strongly recommended.{"useApifyProxy": true}

Example JSON input:

{
"seedProfiles": [
"https://www.instagram.com/nike/",
"https://www.instagram.com/adidas/",
"https://www.instagram.com/puma/"
],
"relatedPerSeed": 50,
"sessionId": "",
"proxyConfiguration": { "useApifyProxy": true }
}

Common pitfall: leaving sessionId blank is a valid input, not a mistake — but Instagram's related-accounts endpoint is login-walled for logged-out requests, so most runs without a sessionId come back with empty related_profiles and an error per seed, which then means an empty overlap and summary layer too. If your shared connections and centrality scores are showing up empty, check the seed rows' error field before assuming the network computation is broken.

⬆️ Output

Output is typed, normalized JSON written to the run's default dataset, downloadable as JSON, CSV, Excel, or the other formats Apify datasets support. Two dataset views are provided: Related Profiles Results (the per-seed default view) and Network Overlap & Centrality (the shared-connections, edges, and centrality view).

Scraped results

[
{
"rowType": "seed",
"username": "nike",
"limit": 50,
"related_profiles_count": 3,
"related_profiles": [
{ "id": "173560420", "full_name": "adidas", "is_private": false, "is_verified": true, "profile_pic_url": "https://...", "username": "adidas" },
{ "id": "182312", "full_name": "Under Armour", "is_private": false, "is_verified": true, "profile_pic_url": "https://...", "username": "underarmour" },
{ "id": "445218", "full_name": "PUMA", "is_private": false, "is_verified": true, "profile_pic_url": "https://...", "username": "puma" }
]
},
{
"rowType": "seed",
"username": "adidas",
"limit": 50,
"related_profiles_count": 2,
"related_profiles": [
{ "id": "182312", "full_name": "Under Armour", "is_private": false, "is_verified": true, "profile_pic_url": "https://...", "username": "underarmour" },
{ "id": "445218", "full_name": "PUMA", "is_private": false, "is_verified": true, "profile_pic_url": "https://...", "username": "puma" }
]
},
{
"rowType": "seed",
"username": "puma",
"limit": 50,
"related_profiles_count": 2,
"related_profiles": [
{ "id": "182312", "full_name": "Under Armour", "is_private": false, "is_verified": true, "profile_pic_url": "https://...", "username": "underarmour" },
{ "id": "173560420", "full_name": "adidas", "is_private": false, "is_verified": true, "profile_pic_url": "https://...", "username": "adidas" }
]
},
{
"rowType": "shared",
"username": "underarmour",
"seedCount": 3,
"seeds": ["adidas", "nike", "puma"],
"centralityScore": 1.0,
"sharedConnections": [
{ "username": "underarmour", "seedCount": 3, "seeds": ["adidas", "nike", "puma"], "centralityScore": 1.0 }
]
},
{
"rowType": "summary",
"username": "underarmour",
"seedCount": 3,
"totalRelated": 7,
"sharedCount": 1,
"mostCentral": "underarmour",
"centralityScore": 1.0,
"sharedConnections": [
{ "username": "underarmour", "seedCount": 3, "seeds": ["adidas", "nike", "puma"], "centralityScore": 1.0 }
],
"networkEdges": [
{ "from": "nike", "to": "adidas" },
{ "from": "nike", "to": "underarmour" },
{ "from": "nike", "to": "puma" },
{ "from": "adidas", "to": "underarmour" },
{ "from": "adidas", "to": "puma" },
{ "from": "puma", "to": "underarmour" },
{ "from": "puma", "to": "adidas" }
]
}
]
  • Brand partnership and sponsorship sourcing teams: feed in the brands or creators you already work with as seeds, and use mostCentral and centralityScore to prioritize outreach to the accounts your existing partners already point at.
  • Niche audience research and growth marketers: use sharedConnections[] to find accounts that multiple competitors' audiences already overlap with, instead of guessing at adjacent niches from a single profile's suggestions.
  • Influencer and creator discovery teams: run each seed's related_profiles[] on its own to expand a shortlist beyond the handful of creators you started with.
  • AI engineers and LLM developers: ground an agent by having it call the Actor with a seed list, receive the structured seed / shared / summary JSON, and pass that directly into a model's context for a network-aware answer instead of a raw list.

How do you monitor Instagram network overlap over time?

Network overlap is a moving target — Instagram's related-accounts suggestions shift as accounts gain followers, post more, or get engaged with by new audiences, so the set of shared connections and the mostCentral account for a niche can change between runs. The monitoring discipline is straightforward: rerun the same seedProfiles set on a schedule and diff the summary row and sharedConnections[] array against the previous run. Specific fields worth tracking: mostCentral (has the most-connected account in the niche changed), centralityScore per shared username (is a given account becoming more or less central), sharedCount (is the overlap between your seeds growing or shrinking), and new entries appearing in networkEdges[] that weren't there before (a new account has entered a seed's suggestion list).

A concrete workflow: schedule a weekly run across your competitor or niche seed set using Apify's built-in Schedules, store each run's summary row, and alert when mostCentral changes or a new username appears in sharedConnections[] with a centralityScore above a threshold you care about. Because every run's dataset is addressable through the Apify API, comparing two runs is a matter of pulling both summary rows and diffing the fields above in your own script or pipeline.

Instagram Related Person Scraper: Connected Accounts Discovery works with any language or tool that can send an HTTP request, since every run and every dataset is reachable through the standard Apify API.

REST API with Python

import requests
TOKEN = "YOUR_APIFY_TOKEN"
ACTOR = "scrapier~instagram-related-person-scraper-connected-accounts-discovery"
url = f"https://api.apify.com/v2/acts/{ACTOR}/run-sync-get-dataset-items?token={TOKEN}"
payload = {
"seedProfiles": ["https://www.instagram.com/nike/", "https://www.instagram.com/adidas/"],
"relatedPerSeed": 50,
"proxyConfiguration": {"useApifyProxy": True},
}
resp = requests.post(url, json=payload)
rows = resp.json()
summary = next(r for r in rows if r["rowType"] == "summary")
print(summary["mostCentral"], summary["sharedCount"])

MCP for query-grounded AI agents

The Actor is reachable through Apify's official Actors MCP Server, which exposes any Apify Store Actor as a callable tool. Register it with:

APIFY_TOKEN=your_token npx -y @apify/actors-mcp-server --actors scrapier/instagram-related-person-scraper-connected-accounts-discovery

Once registered, an MCP-compatible client (Claude, or another MCP-aware agent framework) can call the Actor as a tool: the agent supplies a seed-profile list, receives the seed/shared/summary JSON back, and grounds its answer in the real network data instead of guessing.

Scheduled monitoring and delivery

Apify's Schedules feature runs this Actor on a recurring cron interval without any extra code, and each run's dataset is retrievable through the API immediately after it finishes or pushed onward via Apify's webhook integrations. There's no Actor-specific push-notification feature beyond that — polling the dataset or wiring a webhook to a run's completion event are the two real delivery paths.

Yes — scraping publicly accessible Instagram profile data is generally lawful in most jurisdictions, and Instagram Related Person Scraper: Connected Accounts Discovery only surfaces related-account suggestions that Instagram already serves to any visitor of a public profile. The usernames, names, and profile-picture URLs this Actor returns are personal data, so processing them for EU or California residents falls under GDPR and CCPA — you need a lawful basis and a legitimate purpose, and you should avoid retaining data on private accounts or individuals beyond what your purpose requires. Scraping for a one-off competitive or audience-research lookup carries a different risk profile than bulk collection for AI training or long-term storage; the latter deserves more legal scrutiny. Consult your legal team for commercial use cases involving bulk data storage.

Frequently asked questions

Which formats can I use for seed profiles? Full profile URLs (https://www.instagram.com/nike/), @handles (@nike), and plain usernames (nike) are all accepted and normalized to the same username internally.

How many related accounts does it return per seed? Up to the relatedPerSeed value you set (default 50, configurable 0–10000). That's a ceiling, not a guarantee — Instagram's own related-accounts endpoint returns a limited, fixed-size set of suggestions per profile, and requesting a higher relatedPerSeed can't produce more suggestions than Instagram actually serves for that profile.

How does the Actor handle Instagram's anti-bot measures? It bootstraps a real web session from the target profile's page, impersonates Chrome's TLS fingerprint via curl_cffi, retries with exponential backoff on blocked or error responses, and detects when Instagram returns an HTML login wall instead of JSON so the row surfaces a clear error rather than silently returning bad data.

Does it extract shared connections and a centrality score? Yes — every account reached by two or more seeds gets a rowType: "shared" row with seedCount, seeds[], and centralityScore, and the single rowType: "summary" row names the mostCentral account for the whole run. These are absent (empty arrays, null mostCentral) when fewer than two seeds resolve any related profiles, or when no account overlaps across seeds.

Do I need an Instagram account to run this? No account is required to start a run. Without a sessionId cookie, Instagram's login wall means most runs return empty related-profile lists with an error; supplying a fresh sessionid from a logged-in browser session unlocks live data.

How do I monitor a niche's network over time? Rerun the same seedProfiles set on a schedule (Apify Schedules), keep each run's summary row, and diff mostCentral, centralityScore, sharedCount, and networkEdges[] against the previous run to catch when the overlap structure of a niche shifts.

Does this work with Claude, ChatGPT, and AI agent frameworks? Yes — it's reachable through Apify's Actors MCP Server (npx -y @apify/actors-mcp-server --actors scrapier/instagram-related-person-scraper-connected-accounts-discovery) for MCP-aware clients, and callable as a plain HTTP endpoint by any agent framework that can make a request and parse JSON.

How does this compare to other Instagram related-accounts scrapers? Most single-profile related-accounts scrapers return one profile's suggestion list and stop there. This Actor is built for multi-seed runs and adds a computed layer on top — shared connections across seeds, directed network edges, and a per-node centrality score — none of which a single-profile lookup produces as structured output.

Can I use this without managing proxies or Instagram credentials myself? Proxies, yes — enable proxyConfiguration and the Actor routes requests through Apify's residential proxy pool with its own retry and Chrome-impersonation logic; you don't configure the proxy infrastructure directly. Credentials are different: if you want past Instagram's login wall you still need to supply your own sessionid cookie value, since that has to come from an actual logged-in Instagram session.

What happens if I don't provide any seed profiles? The run doesn't fail — it falls back to a demo pair (nike, adidas) so you can see the output shape, but you should supply your own seedProfiles for any real analysis.

Your feedback

Found a bug or a field that doesn't match what's documented here? Let us know through the Scrapier Actor's Issues tab on Apify or its support contact on the store listing — reports like these are what keep this README and the Actor's output in sync.