# Instagram Profile Scraper + Emails & Contacts (`khadinakbar/instagram-profile-scraper`) Actor

Scrape public Instagram profiles by username or URL: name, bio, followers, posts, verification, business category, plus parsed email and phone. No login required. MCP-ready.

- **URL**: https://apify.com/khadinakbar/instagram-profile-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, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 profile scrapeds

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Profile Scraper + Emails & Contacts

Scrape **public Instagram profiles** at scale by username or profile URL. Get full profile metadata plus **parsed email and phone** for lead generation — in clean, flat JSON built for spreadsheets, CRMs, and AI agents. **No login or cookies required.**

### What it does

Give it Instagram usernames (or profile URLs) and it returns one structured record per profile: display name, bio, follower / following / post counts, verification status, business category, profile pictures, every external link in the bio, Instagram-suggested related accounts, and the most recent posts. For business and creator accounts it also surfaces the public **contact email and phone number**, and it parses emails/phones out of the bio text for everyone else.

It runs over Instagram's public web profile endpoint through residential proxies, so there is no login wall, no cookie export, and no browser automation to babysit. That makes it fast, cheap to run, and stable.

### When to use it

- **Lead generation** — turn a list of creator/business handles into emails, phones, and follower metrics.
- **Influencer marketing** — qualify creators by follower count, verification, category, and posting activity.
- **Market & competitor research** — track accounts, bios, links, and recent content over time.
- **Audience mapping** — follow `relatedProfiles` to map a niche or competitor network.
- **AI agents / MCP** — a clean `username → JSON` tool with predictable per-profile cost.

> Not for hashtags or single post URLs. Use a hashtag scraper or post scraper for those.

### Output

One record per profile (null/unknown fields are omitted):

| Field | Type | Description |
|---|---|---|
| `username` | string | Instagram handle |
| `fullName` | string | Display name |
| `userId` | string | Numeric Instagram ID |
| `biography` | string | Bio text |
| `followersCount` | integer | Followers |
| `followingCount` | integer | Following |
| `postsCount` | integer | Total posts |
| `isVerified` | boolean | Blue-tick verified |
| `isPrivate` | boolean | Private account (metadata only) |
| `isBusinessAccount` | boolean | Business / professional account |
| `businessCategory` | string | Category label |
| `email` | string | Contact email (business field or parsed from bio) |
| `phone` | string | Contact phone (business field or parsed from bio) |
| `externalUrl` | string | Primary bio link |
| `bioLinks` | string[] | All bio links |
| `relatedProfiles` | string[] | Suggested related accounts |
| `profilePicUrl` / `profilePicUrlHd` | string | Profile picture URLs |
| `highlightReelCount` | integer | Story highlights |
| `igtvVideoCount` | integer | IGTV / long-form videos |
| `recentPosts` | object[] | Up to 12 recent posts (see below) |
| `profileUrl` | string | Canonical profile URL |
| `scrapedAt` | string | ISO 8601 scrape timestamp |

Each item in `recentPosts`: `postId`, `shortCode`, `postUrl`, `caption`, `likeCount`, `commentCount`, `isVideo`, `videoViewCount`, `thumbnailUrl`, `postedAt`.

#### Example record

```json
{
  "username": "natgeo",
  "fullName": "National Geographic",
  "userId": "787132",
  "biography": "Inspiring the explorer in everyone 🌎 Stories from @natgeo photographers.",
  "followersCount": 281000000,
  "followingCount": 167,
  "postsCount": 29850,
  "isVerified": true,
  "isPrivate": false,
  "isBusinessAccount": true,
  "businessCategory": "Publisher",
  "email": "press@natgeo.com",
  "externalUrl": "https://on.natgeo.com/instagram",
  "bioLinks": ["https://on.natgeo.com/instagram"],
  "relatedProfiles": ["nasa", "natgeotravel"],
  "profilePicUrl": "https://instagram.com/.../natgeo.jpg",
  "recentPosts": [
    {
      "shortCode": "C1abcDEf",
      "postUrl": "https://www.instagram.com/p/C1abcDEf/",
      "caption": "Photo by @example…",
      "likeCount": 412000,
      "commentCount": 1820,
      "isVideo": false,
      "postedAt": "2026-05-30T14:21:00.000Z"
    }
  ],
  "profileUrl": "https://www.instagram.com/natgeo/",
  "scrapedAt": "2026-06-01T18:51:00.000Z"
}
````

### Pricing

Pay-per-event — you pay only for what you get:

| Event | Price |
|---|---|
| Actor start | $0.00005 |
| Profile scraped | **$0.004 / profile** |

A 1,000-profile run costs about **$4**. Each profile includes metadata, contacts, and recent posts in a single charge — no hidden add-on fees. Pay-per-usage (compute + proxy) billing is also available for very large jobs.

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `usernames` | string\[] | — (required) | Usernames, @handles, or profile URLs |
| `scrapeRecentPosts` | boolean | `true` | Include up to 12 recent posts |
| `maxRecentPosts` | integer | `12` | 0–12 recent posts per profile |
| `proxyConfiguration` | object | RESIDENTIAL | Residential strongly recommended |

```json
{
  "usernames": ["nasa", "https://www.instagram.com/nike/", "@natgeo"],
  "scrapeRecentPosts": true,
  "maxRecentPosts": 12
}
```

#### Run via API

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~instagram-profile-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "usernames": ["nasa", "natgeo"] }'
```

### Use with AI agents (MCP)

This actor is MCP-ready. Connect it through the [Apify MCP server](https://mcp.apify.com) and an AI agent can call it with a single username and receive structured JSON back. Input descriptions and output keys are written for LLM consumption, and per-profile cost is predictable, so agents can budget calls reliably.

### How it works & reliability

- Reads Instagram's public web profile endpoint — **no login, no cookies, no browser**.
- Residential proxies + session pool with automatic rotation on `403` / `429`.
- Honest failure: if Instagram blocks every request and nothing is scraped, the run fails clearly and you are **not charged** for blocked requests.
- Cost cap is printed at the start of every run; the actual billed amount is printed at the end.
- Private accounts return metadata only (no posts), flagged with `isPrivate: true`.

### Related actors

- **Instagram Hashtag Scraper** — posts + engagement by hashtag: `khadinakbar/instagram-hashtag-scraper`
- **B2B Lead Finder & Enrichment** — Google Maps leads + emails: `khadinakbar/b2b-lead-finder-enrichment`
- **Contact Details Scraper** — emails, phones, socials from any website: `khadinakbar/contact-details-scraper`

### FAQ

**Do I need an Instagram account or cookies?** No. It only reads public profile data through a public endpoint.

**Does it work on private accounts?** It returns public metadata (name, bio, counts, category) and flags `isPrivate: true`. Posts are not available for private accounts.

**Where does the email come from?** Business/creator accounts expose a public contact email and phone, which are returned directly. For other accounts, the actor parses emails/phones from the bio text when present.

**Can I pass profile URLs instead of usernames?** Yes — full URLs, @handles, and bare usernames all work in the `usernames` field.

**How many profiles can I scrape?** As many as you provide. Cost scales linearly at $0.004 per profile.

### Legal & compliance

This actor collects only **public** information that any logged-out visitor can view, and is intended for lawful uses such as lead generation, research, and analytics. It does not bypass authentication or access private content. You are responsible for using the data in compliance with Instagram's Terms of Service, the GDPR/CCPA, and any other applicable laws and regulations. Do not use scraped personal data for spam or unlawful purposes. Instagram is a trademark of Meta Platforms, Inc.; this actor is not affiliated with, endorsed by, or sponsored by Meta.

# Actor input Schema

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

One or more Instagram accounts to scrape. Accepts bare usernames ('natgeo'), @-handles ('@nasa'), or full profile URLs ('https://instagram.com/nike'). Returns one record per profile; private accounts return metadata only (no posts). NOT for hashtags or post URLs — use a hashtag/post scraper for those.

## `scrapeRecentPosts` (type: `boolean`):

Whether to include the profile's most recent posts (up to 12) in each record, with caption, like and comment counts, media type, thumbnail, and timestamp. Defaults to true. Set to false for lighter, profile-only records when you only need follower and contact data.

## `maxRecentPosts` (type: `integer`):

Maximum recent posts to include per profile. Instagram's public profile endpoint returns at most 12 per request, so larger values are automatically capped at 12 (no error). Set 0, or turn off 'Include recent posts', for none. Defaults to 12.

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

Proxy settings used to reach Instagram. Residential proxies are strongly recommended — Instagram blocks datacenter IPs. Defaults to Apify Proxy with the RESIDENTIAL group. Leave as default unless you have a specific proxy requirement.

## Actor input object example

```json
{
  "usernames": [
    "nasa",
    "https://www.instagram.com/nike/"
  ],
  "scrapeRecentPosts": true,
  "maxRecentPosts": 12,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Array of profile objects with metrics, contact data, and recent posts.

# 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": [
        "humansofny",
        "natgeo"
    ],
    "maxRecentPosts": 12,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/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": [
        "humansofny",
        "natgeo",
    ],
    "maxRecentPosts": 12,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "humansofny",
    "natgeo"
  ],
  "maxRecentPosts": 12,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call khadinakbar/instagram-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=khadinakbar/instagram-profile-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Profile Scraper + Emails & Contacts",
        "description": "Scrape public Instagram profiles by username or URL: name, bio, followers, posts, verification, business category, plus parsed email and phone. No login required. MCP-ready.",
        "version": "1.0",
        "x-build-id": "OoGBElhCxWWtDdlfE"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/khadinakbar~instagram-profile-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-khadinakbar-instagram-profile-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/khadinakbar~instagram-profile-scraper/runs": {
            "post": {
                "operationId": "runs-sync-khadinakbar-instagram-profile-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/khadinakbar~instagram-profile-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-khadinakbar-instagram-profile-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "usernames"
                ],
                "properties": {
                    "usernames": {
                        "title": "Instagram usernames or profile URLs",
                        "type": "array",
                        "description": "One or more Instagram accounts to scrape. Accepts bare usernames ('natgeo'), @-handles ('@nasa'), or full profile URLs ('https://instagram.com/nike'). Returns one record per profile; private accounts return metadata only (no posts). NOT for hashtags or post URLs — use a hashtag/post scraper for those.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "scrapeRecentPosts": {
                        "title": "Include recent posts",
                        "type": "boolean",
                        "description": "Whether to include the profile's most recent posts (up to 12) in each record, with caption, like and comment counts, media type, thumbnail, and timestamp. Defaults to true. Set to false for lighter, profile-only records when you only need follower and contact data.",
                        "default": true
                    },
                    "maxRecentPosts": {
                        "title": "Max recent posts per profile",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum recent posts to include per profile. Instagram's public profile endpoint returns at most 12 per request, so larger values are automatically capped at 12 (no error). Set 0, or turn off 'Include recent posts', for none. Defaults to 12.",
                        "default": 12
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings used to reach Instagram. Residential proxies are strongly recommended — Instagram blocks datacenter IPs. Defaults to Apify Proxy with the RESIDENTIAL group. Leave as default unless you have a specific proxy requirement.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
