Instagram Related Person Scraper With Similar Audience Builder avatar

Instagram Related Person Scraper With Similar Audience Builder

Pricing

Pay per usage

Go to Apify Store
Instagram Related Person Scraper With Similar Audience Builder

Instagram Related Person Scraper With Similar Audience Builder

Instagram Related Person Scraper finds related profiles connected to any public Instagram account. Capture usernames, bios, follower data, relevance signals, and metadata. Ideal for research, influencer discovery, audience mapping, and workflows needing structured related-profile insights.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

API Empire

API Empire

Maintained by Community

Actor stats

1

Bookmarked

85

Total users

7

Monthly active users

8 days ago

Last modified

Share

This Instagram scraper expands one or more seed profiles into a ranked lookalike audience, walking Instagram's related/suggested-accounts graph multiple hops deep, then deduplicating and ranking every discovered account by how many distinct paths reach it. It returns two entity types — each seed's direct related profiles, and the full expanded audience — as typed, normalized JSON, no HTML or selectors to parse. Add several seeds to build one combined, cross-seed audience. You'll know which accounts look like your seeds, and how strongly, before you build an outreach or research list.

Instagram Related Person Scraper With Similar Audience Builder is an Apify Actor that turns Instagram's own "related accounts" suggestions into a structured, ranked lookalike audience. Starting from one or more seed profiles, it fetches direct related accounts, then (optionally) the related accounts of those accounts, up to three hops deep, deduplicating everything it finds and scoring each discovered account by how many distinct paths reached it. No Instagram account is required to start a run, though an optional session cookie unlocks fuller coverage. It does not require you to manage rendering, HTML parsing, or pagination logic yourself.

  • Scrape a seed profile's direct related accounts
  • Expand outward across multiple hops into a broader lookalike audience
  • Deduplicate accounts reached from multiple seeds or paths and rank them by co-occurrence frequency
  • Combine several seeds into one cross-seed audience
  • Export results as JSON, CSV, or any other Apify-supported dataset format

The Actor returns three real data types in the same dataset, distinguished by a type field: a per-seed summary row, the seed's direct related profiles (nested inside that row), and the deduplicated, ranked lookalike audience.

Data TypeKey FieldsJSON Field Names
Seed profile summaryseed username, direct-related count, total audience size, total cap usedusername, related_profiles_count, audienceSize, limit
Direct related profilesid, username, full name, private/verified status, profile picturerelated_profiles (array of id, username, full_name, is_private, is_verified, profile_pic_url)
Lookalike audience (ranked)discovery path, hop discovered at, co-occurrence frequency, rankusername, discoveredVia, hop, frequency, rank

Need more Instagram data?

If you also need follower/following lists with email and phone enrichment for the accounts this Actor discovers, pair it with Instagram Followers And Following Scrapper With Profile Emails. To gauge how active a discovered lookalike account actually is before you reach out, Instagram Profile Scraper: Per-Post Likes & Comments turns any of those usernames into a follower count, average likes/comments, and an engagement-rate estimate.

Why not build this yourself?

Instagram's related/suggested-accounts graph is not exposed through Meta's official Graph API at any verification tier — it is only reachable through Instagram's internal web endpoints, which are undocumented, unversioned, and login-walled for logged-out traffic. Building this yourself means reverse-engineering that endpoint, maintaining Chrome-TLS impersonation to avoid fingerprint blocks, handling session-cookie bootstrapping, and re-solving login-wall changes every time Instagram adjusts its web client — on top of writing and maintaining the multi-hop graph walk, dedup, and frequency-ranking logic itself. This Actor already does all of that and ships the result as stable, typed JSON.

Why do developers and teams scrape Instagram?

For AI engineers and agent builders

A ranked lookalike audience is a ready-made candidate set for recommendation or agent tools: pass username, frequency, and rank from the audience rows into a vector store or an agent's tool-call output to power a "find accounts similar to X" feature, without writing any graph-walking or ranking logic in the agent itself. Because every field is typed JSON, it can be indexed or passed to an LLM context window directly.

For marketers and influencer teams

Start from a handful of known creators in a niche as seedProfiles, set hopDepth to 2, and the resulting audience surfaces accounts that Instagram's own suggestion graph treats as similar — a fast way to grow a creator shortlist beyond the accounts you already know, with frequency showing which candidates were reached from more than one seed.

For researchers and analysts

The frequency and rank fields make this Actor useful for mapping which accounts sit at the center of a niche's public suggestion graph — a lightweight network-analysis input built entirely from Instagram's own publicly reachable related-accounts data, with no private or restricted content involved.

For developers building data products

Because the output schema is stable across runs, the Actor can be scheduled to periodically rebuild a lookalike audience around a set of tracked seed accounts, feeding a prospecting list, a CRM enrichment pipeline, or a monitoring dashboard without custom scraping code.

How to scrape Instagram (step by step)

  1. Open API-Empire/instagram-related-person-scraper-with-similar-audience-builder on Apify.
  2. Add one or more accounts to seedProfiles — a full URL, an @handle, or a plain username.
  3. Set hopDepth, maxAudienceSize, and minFrequency to control how far the audience expands and how tight the resulting list is.
  4. Start the run. Add a fresh sessionId cookie first if you need fuller coverage than a logged-out request returns.
  5. Download the seed and audience rows as JSON or CSV, or open the Seeds & Related Profiles and Lookalike Audience dataset views in the Apify Console.

What to do when Instagram changes its structure

This Actor is maintained, and its output schema — the same field names and types on every seed and audience row — stays stable across maintenance updates, so downstream integrations keep working without changes on your end.

⬇️ Input

ParameterRequiredTypeDescriptionExample Value
seedProfilesNoarrayInstagram profiles to grow a lookalike audience from. Accepts a full URL, @handle, or plain username. Add several seeds for a broader, cross-seed audience.["https://www.instagram.com/natgeo/"]
hopDepthNointeger (1-3, default 2)How many hops to expand outward. 1 = only the seed's direct related accounts. 2 = also fetches related-of-related. 3 = one layer further.2
maxAudienceSizeNointeger (0-10000, default 200)Hard cap on the total number of unique lookalike accounts collected across all hops and seeds. Stops the graph walk once reached.300
minFrequencyNointeger (1-1000, default 1)Only keep lookalike accounts reached by at least this many distinct paths. 1 keeps everything; 2+ keeps a tighter, stronger core.1
concurrencyNointeger (1-8, default 3)How many related-account fetches run in parallel per hop. Higher is faster but more likely to be rate-limited.3
sessionIdNostring (secret)Optional Instagram sessionid cookie. Instagram login-walls the related-accounts endpoint when logged out, so a fresh sessionid improves coverage."123456789%3A..."
proxyConfigurationNoobjectApify Proxy configuration. Residential proxies reduce blocks and rate limits.{"useApifyProxy": true}

Example input:

{
"seedProfiles": ["https://www.instagram.com/natgeo/"],
"hopDepth": 2,
"maxAudienceSize": 300,
"minFrequency": 1,
"concurrency": 3,
"sessionId": "",
"proxyConfiguration": { "useApifyProxy": true }
}

No parameter is marked required by the schema, but leaving seedProfiles empty doesn't fail silently — the run pushes a single error row and exits, and that row is still billed as one row_result event, so always supply at least one seed before starting a run.

⬆️ Output

Every response is typed, normalized JSON with a stable schema across runs, exportable as JSON, CSV, or any other Apify dataset format. Two structurally different row types share one dataset, distinguished by the type field.

Scraped seed profile row (type: "seed")

{
"type": "seed",
"username": "natgeo",
"limit": 300,
"related_profiles_count": 5,
"related_profiles": [
{
"id": "1234567890",
"full_name": "BBC Earth",
"is_private": false,
"is_verified": true,
"profile_pic_url": "https://instagram.example/bbcearth.jpg",
"username": "bbcearth"
}
],
"discoveredVia": "natgeo",
"hop": 0,
"frequency": null,
"rank": null,
"audienceSize": 214,
"lookalikeAudience": [
{
"username": "bbcearth",
"discoveredVia": ["natgeo"],
"hop": 1,
"frequency": 2,
"rank": 1
}
]
}

limit mirrors the maxAudienceSize input value (kept as a base-compatible field name). discoveredVia, hop, frequency, and rank are placeholder values on seed rows (a seed's own hop is always 0); the same full lookalikeAudience array is embedded on every seed row in a run, not filtered per seed. error is added to a seed row only if that seed's fetch failed.

Scraped lookalike audience row (type: "audience")

{
"type": "audience",
"username": "bbcearth",
"discoveredVia": "natgeo",
"hop": 1,
"frequency": 2,
"rank": 1,
"full_name": "BBC Earth",
"is_private": false,
"is_verified": true,
"profile_pic_url": "https://instagram.example/bbcearth.jpg",
"id": "1234567890"
}

One row is pushed per unique account remaining after deduplication and the minFrequency filter, sorted by frequency (descending), then earliest hop, then username. Both dataset views (Seeds & Related Profiles and Lookalike Audience) read from this same underlying dataset without filtering by type, so filter on type when you want only one row kind.

maxAudienceSize is the real ceiling — 0 to 10,000 unique lookalike accounts across the whole run, default 200. The graph walk stops as soon as that cap is reached, even mid-hop. hopDepth (1-3) controls how many expansion layers run before the cap is checked, and concurrency (1-8) controls how many related-account fetches run in parallel per hop. Each fetch returns whatever related-accounts edges Instagram's own response includes for that one profile — there is no per-profile pagination knob, so audience breadth comes from expanding across more hops and more seeds, not from asking for more results per profile. minFrequency then trims the final list to accounts reached by enough distinct paths. There is no other Actor-side cap beyond maxAudienceSize, and no published benchmark for maximum achievable audience size.

Instagram Related Person Scraper With Similar Audience Builder works with any language or tool that can send an HTTP request, using the standard Apify API.

REST API integration

import requests
TOKEN = "YOUR_APIFY_TOKEN"
ACTOR = "API-Empire~instagram-related-person-scraper-with-similar-audience-builder"
run = requests.post(
f"https://api.apify.com/v2/acts/{ACTOR}/run-sync-get-dataset-items",
params={"token": TOKEN},
json={
"seedProfiles": ["https://www.instagram.com/natgeo/"],
"hopDepth": 2,
"maxAudienceSize": 300,
},
)
for row in run.json():
if row.get("type") == "audience":
print(row["username"], row["frequency"], row["rank"])

Works in Python, Node.js, Go, Ruby, cURL.

MCP for AI agents

The Actor can be exposed to an MCP-compatible client through Apify's Actors MCP Server by adding its ID to the server's actor list, for example running npx @apify/actors-mcp-server --actors API-Empire/instagram-related-person-scraper-with-similar-audience-builder. Compatible with Claude, Cursor, and other MCP clients.

Automation platforms (n8n, Make)

In n8n, the Apify node's "Run Actor" operation can call this Actor by ID and pass seedProfiles, hopDepth, and maxAudienceSize directly from an upstream node. In Make, the Apify app's "Run an Actor" module takes the same actor ID and input JSON, letting you route the resulting audience rows into a CRM, Google Sheets, or outreach-automation module without custom code.

Scraping publicly accessible Instagram data is generally lawful; this Actor returns only publicly reachable profile data — usernames, full names, and public verified/private/profile-picture flags — surfaced through Instagram's own related-accounts suggestions. Because discovered profiles are personal data, storing or using them at scale falls under regimes like GDPR and CCPA, which require a lawful basis for processing and give individuals rights over their data. Consult legal counsel for commercial use cases involving bulk personal data.

Frequently asked questions

Yes. No Instagram account or login is required to start a run. An optional sessionId cookie from a logged-in session improves coverage, because Instagram login-walls the related-accounts endpoint for logged-out requests.

How often is the scraped data updated?

Every run performs a live fetch against Instagram's related-accounts endpoint at the moment it executes — there is no caching layer, so each run reflects Instagram's current suggestion graph for the given seeds.

That seed's row still gets pushed, with related_profiles_count: 0, an empty related_profiles array, and an error field describing the failure (for example a login-wall or HTTP error). Other seeds in the same run are unaffected.

Can I scrape private Instagram accounts with this Actor?

No. Only accounts Instagram's own related-accounts suggestions surface are collected, and each discovered account's is_private flag is reported as-is — the Actor does not attempt to access private-account content.

It's a distinct processing layer on top of related-profile discovery, not a rename. Related-profile fetching alone only returns a seed's direct suggestions; the audience builder adds multi-hop expansion (hopDepth), cross-seed deduplication, and co-occurrence frequency ranking (minFrequency) on top of that raw data to produce the ranked lookalike list.

Does this Actor work for AI agent workflows and LLM pipelines?

Yes. It's callable as a standard HTTP API endpoint from any agent framework, and it's also reachable through Apify's Actors MCP Server for MCP-compatible clients. Every response is typed JSON with stable field names — no HTML or parsing step before passing rows to an LLM.

How does this Actor handle Instagram's anti-bot system?

It uses Chrome-TLS impersonation (via curl_cffi) to bootstrap a web session and issue related-accounts requests, retries failed requests with backoff, and falls back to a residential proxy when one is configured and a block or login-wall response is detected. A sessionId cookie further reduces the chance of hitting the logged-out login wall.

Yes. Every row is typed, normalized JSON with stable field names — no HTML, no selectors. Pass it directly into an LLM context window, a vector store, or an agent tool call.

Can I use this Actor without managing proxies?

Yes. proxyConfiguration is optional and defaults to Apify Proxy enabled; the Actor also works with no proxy configured, falling back to a direct Chrome-impersonating connection.

What happens when Instagram changes its structure or blocks the scraper?

The Actor is maintained, and its output schema — field names and types on seed and audience rows — stays stable, so integrations built against it keep working without changes on your end.

Your feedback

Found a bug or missing a field? We want to know. Reach out through API-Empire's Apify Store support channel or issue tracker so it can be fixed — active maintenance is what keeps this Actor's output schema reliable.