# Instagram Profile Scraper| No Login | No Cookie (`rexreus/instagram-profile-scraper`) Actor

Extract complete Instagram profile metadata, public business emails/phones, engagement rates, and recent posts without cookies or browser overhead.

- **URL**: https://apify.com/rexreus/instagram-profile-scraper.md
- **Developed by:** [REXREUS D.O](https://apify.com/rexreus) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.

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

<p align="center">
  <h1 align="center">Instagram Profile Scraper</h1>
  <img src="https://api.apify.com/v2/key-value-stores/06XtAnxPDRIXwrVmt/records/instagram-profile-scraper-banner.png" alt="Fast, Zero-Cookie Instagram Profile Scraper with Business Leads and Analytics" align="center" width="100%" />
  <p align="center"><strong>Extract complete Instagram profile metadata, public business emails/phones, engagement rates, and recent posts without cookies or browser overhead.</strong></p>
  <p align="center"><em>Native HTTP-First · TypeScript Node 20 · 256MB RAM · Zero-Cookie Architecture</em></p>
  <p align="center">
    <a href="#quick-start"><img src="https://img.shields.io/badge/Quick_Start-Apify_Console-green?style=flat-square" alt="Quick Start"></a>
    <a href="https://apify.com"><img src="https://img.shields.io/badge/Runs_on-Apify-ff443e?style=flat-square" alt="Apify"></a>
    <a href="https://nodejs.org"><img src="https://img.shields.io/badge/Node.js-≥20-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node.js"></a>
    <img src="https://img.shields.io/badge/Memory-256MB-blue?style=flat-square" alt="Memory Footprint">
    <img src="https://img.shields.io/badge/Cookies-Zero_Required-orange?style=flat-square" alt="No Cookies">
  </p>
</p>

***

### Why this Actor?

| Feature | What you get |
|---|---|
| **Zero-Cookie Architecture** | 100% cookie-free. No account credentials or exported session cookies required. Zero ban risk for your personal Instagram accounts. |
| **Ultra-Low Memory (256MB)** | Built with a native HTTP-first engine using `got-scraping`. Strictly zero Playwright/Puppeteer overhead, saving ~90% in compute unit costs compared to browser scrapers. |
| **High-Value B2B Lead Contact** | Extracts official `businessEmail` and `businessPhoneNumber`, and applies intelligent regex extraction on biography text for buried emails. |
| **Influencer Analytics & ER** | Computes the average Engagement Rate percentage across recent posts: $\frac{\text{Likes} + \text{Comments}}{\text{Posts} \times \text{Followers}} \times 100%$. |
| **Recent 12 Posts Summary** | Retrieves shortcodes, post URLs, timestamps, captions, like counts, and comment counts for immediate content analysis. |
| **Dual Target Normalization** | Accepts raw usernames (`@natgeo`, `natgeo`) or full profile URLs (`https://instagram.com/natgeo/`) with automatic URL cleaning and deduplication. |
| **Threads & Social Badging** | Extracts Threads account presence (`hasThreads`, `threadsProfile`), verified status (`isVerified`), and professional category. |

***

### Quick Start

#### Apify Console

1. Open the Actor on Apify Console and click **Start**.
2. Enter target usernames (e.g. `["natgeo", "cristiano"]`) or paste profile URLs.
3. Click **Save & Run**. Results will stream in real-time to **Storage → Default Dataset**.
4. Export your dataset as JSON, CSV, Excel, or consume via API.

***

### How It Works

```
User Input (Usernames / URLs)
        │
        ▼
[Target Normalizer] ── Clean handles, strip slashes, deduplicate
        │
        ▼
[Instagram HTTP Client] ── got-scraping + Residential Proxy + Anti-Bot Headers
        │                (x-ig-app-id: 936619743392459)
        │
        ├──► Web API: /api/v1/users/web_profile_info/?username={handle}
        └──► Fallback: Mobile API endpoint / GraphQL query
        │
        ▼
[Domain Parsers & Analytics Engine]
        ├── Profile Metadata & Social Graph
        ├── Contact Parser (Business fields + Bio Email Regex)
        └── Engagement Calculator (12 Recent Posts + ER %)
        │
        ▼
[Apify Dataset Storage] ── Push typed record + update KVS summary
```

***

### Input

```json
{
  "usernames": ["natgeo"],
  "profileUrls": ["https://www.instagram.com/instagram/"],
  "includeRecentPosts": true,
  "calculateEngagementRate": true,
  "maxRequestRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `usernames` | `array` | No | `["natgeo"]` | Array of Instagram handles to scrape. |
| `profileUrls` | `array` | No | `[]` | Array of full Instagram profile URLs. |
| `includeRecentPosts` | `boolean` | No | `true` | Include metadata summaries for up to 12 recent posts. |
| `calculateEngagementRate` | `boolean` | No | `true` | Compute influencer engagement rate percentage. |
| `proxyConfiguration` | `object` | No | `{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}` | Apify Proxy configuration (Residential proxy strongly recommended). |
| `maxRequestRetries` | `integer` | No | `3` | Maximum retry attempts on rate limits or transient errors. |

***

### Output

Each scraped profile generates one structured record in the default dataset:

```json
{
  "id": "787132",
  "username": "natgeo",
  "fullName": "National Geographic",
  "biography": "Inspiring people to care about the planet since 1888. Contact: press@natgeo.com",
  "biographyLinks": [
    {
      "title": "National Geographic Expeditions",
      "url": "https://www.nationalgeographic.com/expeditions",
      "linkType": "external"
    }
  ],
  "externalUrl": "https://linkin.bio/nationalgeographic",
  "isVerified": true,
  "isPrivate": false,
  "hasThreads": true,
  "threadsProfile": "https://www.threads.net/@natgeo",
  "isBusinessAccount": true,
  "isProfessionalAccount": true,
  "businessCategoryName": "Media/News Company",
  "businessEmail": "press@natgeo.com",
  "businessPhoneNumber": null,
  "followersCount": 281000000,
  "followsCount": 160,
  "mediaCount": 29480,
  "profilePicUrl": "https://scontent.cdninstagram.com/...",
  "engagementRate": 0.14,
  "recentPosts": [
    {
      "id": "314592837192",
      "shortcode": "C9X8qZaL9",
      "type": "GraphImage",
      "caption": "Photo by Joel Sartore. A stunning look at...",
      "likesCount": 42000,
      "commentsCount": 380,
      "timestamp": "2026-09-05T12:00:00.000Z",
      "url": "https://www.instagram.com/p/C9X8qZaL9/"
    }
  ],
  "scrapedAt": "2026-09-06T05:30:00.000Z"
}
```

***

### Cost, Limits & Performance

- **Memory Allocation**: 256MB - 512MB RAM.
- **Compute Unit (CU) Cost**: ~$0.0013 per 100 profiles (90x cheaper than 2GB Playwright browser scrapers).
- **Network Bandwidth**: ~15 KB per profile (JSON API) vs ~2.1 MB per profile (Browser full page render).
- **Concurrency**: Adaptive 1-3 requests with 1000ms - 2500ms jittered delays to respect platform rate limits.
- **Proxy Recommendation**: Apify Residential Proxies (`RESIDENTIAL` group) are strongly recommended for seamless zero-cookie scraping. Datacenter IPs are aggressively challenged with 429 / login redirects by Instagram.

***

### Recipes

#### 1. High-Speed Influencer Lead Discovery

Extract emails, follower counts, and engagement rates for prospective brand partners:

```json
{
  "usernames": ["mkbhd", "mrbeast", "peter McKinnon"],
  "includeRecentPosts": true,
  "calculateEngagementRate": true
}
```

#### 2. URL Batch Ingestion from Spreadsheets

Paste raw URLs exported from Google Sheets or CRM:

```json
{
  "profileUrls": [
    "https://www.instagram.com/nike/",
    "https://www.instagram.com/adidas/",
    "https://www.instagram.com/puma/"
  ],
  "includeRecentPosts": false
}
```

***

### Architecture & Design Decisions

#### Key Architectural Decisions

1. **HTTP-First over Browser**: Zero Playwright/Puppeteer ensures minimal memory usage (256MB), instant startup, and zero container crash risks.
2. **Zero User Cookies**: Eliminates credential exposure, account ban risks, and tedious cookie export steps for users.
3. **Resilient Dual Endpoints**: Automatically falls back between web API (`www.instagram.com`) and mobile API (`i.instagram.com`) when transient platform errors occur.

***

### Troubleshooting

| Symptom | Probable Cause | Recommended Fix |
|---|---|---|
| `RateLimitError (429 / 302)` | Datacenter IP blocked or rate-limited by Instagram. | Enable Apify Residential Proxy (`RESIDENTIAL` group) in input configuration. |
| `NotFoundError (404)` | Username does not exist or account was deactivated/renamed. | Verify the username handle or URL spelling on Instagram. |
| `PrivateProfileError` | The account is private (`isPrivate: true`). | The Actor returns profile metadata and flags `engagementRate: null` as posts are hidden. |
| `0 items in dataset` | Input list is empty or inputs are invalid. | Ensure `usernames` or `profileUrls` contains valid handles. |

***

### FAQ

**Q: Does this Actor require my Instagram login or password?**\
A: No. It operates 100% cookie-free and never requests, requires, or stores user credentials.

**Q: Can it scrape private Instagram profiles?**\
A: No. Private profile timelines cannot be viewed without an authenticated follower account. The Actor extracts public bio/follower metrics and marks the record as private.

**Q: How many profiles can I scrape in a single run?**\
A: You can scrape hundreds to thousands of profiles per run when using Apify Residential Proxies with adaptive concurrency.

**Q: Does it scrape Instagram Stories or Direct Messages?**\
A: No. Stories and DMs require private authenticated session cookies, which is explicitly out of scope for this zero-cookie public scraper.

**Q: Is it safe for commercial B2B lead generation?**\
A: Yes. It extracts only publicly accessible business contact information and public bios adhering to standard public data collection practices.

***

### Limitations

- Scrapes publicly accessible profile and media information only.
- Historical post pagination beyond the first 12 timeline posts is omitted to ensure fast, low-cost execution.
- Users are responsible for complying with Instagram Terms of Service and applicable privacy regulations (such as GDPR/CCPA).

***

### Run It

Ready to start scraping? Open the Actor in the Apify Console and launch your first run!

# Actor input Schema

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

List of Instagram usernames to scrape (e.g. \['natgeo', 'cristiano']).

## `profileUrls` (type: `array`):

List of full Instagram profile URLs (e.g. \['https://www.instagram.com/natgeo/']).

## `includeRecentPosts` (type: `boolean`):

Whether to extract summaries of the latest 12 posts (likes, comments, timestamps, caption).

## `calculateEngagementRate` (type: `boolean`):

Calculate average engagement rate percentage based on recent post interactions and follower count.

## `proxyConfiguration` (type: `object`):

Apify Residential Proxy is strongly recommended to avoid Instagram rate-limits and blocks.

## `maxRequestRetries` (type: `integer`):

Maximum number of retries per profile when hitting transient network or rate-limit issues.

## Actor input object example

```json
{
  "usernames": [
    "natgeo"
  ],
  "includeRecentPosts": true,
  "calculateEngagementRate": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxRequestRetries": 3
}
```

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rexreus/instagram-profile-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"] }

# Run the Actor and wait for it to finish
run = client.actor("rexreus/instagram-profile-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"
  ]
}' |
apify call rexreus/instagram-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rexreus/instagram-profile-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/widdkP8EESERjCCJW/builds/hyzNJGodXuI3f0bao/openapi.json
