# Instagram Profile Scraper (`upadhyay.labs/instagram-profile-scraper`) Actor

Extract public Instagram profile data at scale. Get bios, follower counts, contact details, business information, and latest posts in structured JSON, CSV, and more. Fast, pure HTTP-based scraping with no browser overhead. Built for AI agents, LLM workflows, and data pipelines.

- **URL**: https://apify.com/upadhyay.labs/instagram-profile-scraper.md
- **Developed by:** [Upadhyay Labs](https://apify.com/upadhyay.labs) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.80 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Instagram Profile Scraper do?

**Instagram Profile Scraper** extracts complete public profile data from Instagram. Provide usernames, @handles, or profile URLs and get structured JSON with bio, follower counts, contact info, business details, latest posts, and more.

This scraper uses pure HTTP requests with no browser overhead, making it **10-20x faster** than browser-based alternatives. It handles proxy rotation, automatic retries, and multiple extraction strategies to deliver reliable results at scale.

https://www.youtube.com/watch?v=A7vSBWX6gcU

#### Key features

- **40+ profile fields** — bio, followers, following, posts count, business category, contact email, phone, address, pronouns, bio links, and more
- **Rich post data** — likes, comments, timestamps, captions, hashtags, mentions, video URLs, carousel media, and image versions
- **Pinned post detection** — automatically identifies and flags pinned posts
- **No browser needed** — pure HTTP-based, handles 20 profiles concurrently
- **5 fallback strategies** — reliable extraction even when Instagram changes page structure
- **Pay-per-result** — you only pay for successfully scraped profiles

### How to scrape Instagram profiles

1. Create a free [Apify account](https://console.apify.com/sign-up)
2. Go to [Instagram Profile Scraper](https://apify.com/upadhyay.labs/instagram-profile-scraper)
3. Add Instagram usernames, profile URLs, or @handles to the input
4. Click **Start** and wait for results
5. Download your data as JSON, CSV, Excel, or connect via API

#### Input example

```json
{
    "usernames": [
        "instagram",
        "@cristiano",
        "https://www.instagram.com/leomessi/",
        "selenagomez"
    ],
    "includeLatestPosts": true,
    "includePinnedPosts": true
}
```

#### Accepted input formats

| Format | Example |
|--------|---------|
| Username | `instagram` |
| With @ | `@cristiano` |
| Profile URL | `https://www.instagram.com/leomessi/` |
| Short URL | `instagram.com/selenagomez` |

### Output

Each scraped Instagram profile returns a structured JSON object. Here are the key fields:

| Field | Type | Description |
|-------|------|-------------|
| `username` | string | Instagram username |
| `fullName` | string | Display name |
| `biography` | string | Bio text |
| `followersCount` | number | Number of followers |
| `followingCount` | number | Number following |
| `postsCount` | number | Total post count |
| `isVerified` | boolean | Verified badge status |
| `isPrivate` | boolean | Whether account is private |
| `isBusinessAccount` | boolean | Business account flag |
| `businessCategory` | string | Business category name |
| `contactEmail` | string | Public contact email |
| `contactPhoneNumber` | string | Public phone number |
| `externalUrl` | string | Website link in bio |
| `bioLinks` | array | All links in bio |
| `profilePicUrl` | string | Profile picture URL |
| `latestPosts` | array | Up to 12 latest posts |

#### Latest posts data

Each post in `latestPosts` includes:

| Field | Type | Description |
|-------|------|-------------|
| `shortcode` | string | Post shortcode |
| `url` | string | Direct post URL |
| `type` | string | Image, Video, Reel, or Sidecar |
| `caption` | string | Post caption text |
| `likesCount` | number | Number of likes |
| `commentsCount` | number | Number of comments |
| `timestamp` | string | ISO 8601 timestamp |
| `isPinned` | boolean | Whether post is pinned |
| `hashtags` | array | Extracted hashtags |
| `mentions` | array | Mentioned usernames |
| `videoUrl` | string | Video URL (for video/reel posts) |
| `videoDuration` | number | Duration in seconds |
| `childPosts` | array | Carousel slides (for sidecar posts) |
| `images` | array | Image versions with dimensions |

#### Output example

```json
{
    "username": "instagram",
    "fullName": "Instagram",
    "biography": "Bringing you closer to the people and things you love.",
    "followersCount": 676000000,
    "followingCount": 75,
    "postsCount": 7800,
    "isVerified": true,
    "isPrivate": false,
    "isBusinessAccount": true,
    "profilePicUrl": "https://...",
    "latestPosts": [
        {
            "shortcode": "ABC123",
            "url": "https://www.instagram.com/p/ABC123/",
            "type": "Reel",
            "caption": "Check out this new feature!",
            "likesCount": 150000,
            "commentsCount": 2500,
            "isPinned": false,
            "timestamp": "2026-11-01T12:00:00.000Z",
            "hashtags": ["instagram", "newfeature"],
            "mentions": ["creators"]
        }
    ],
    "scrapedAt": "2026-11-12T10:30:00.000Z"
}
```

### Input options

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `usernames` | array | required | Instagram usernames, URLs, or @handles |
| `includeLatestPosts` | boolean | `true` | Include up to 12 latest posts with engagement data |
| `includePinnedPosts` | boolean | `true` | Show pinned posts at top of results |
| `includeRelatedProfiles` | boolean | `false` | Include suggested profiles (requires auth) |
| `includeAboutSection` | boolean | `false` | Include join date, country info (requires auth) |
| `maxProfiles` | integer | unlimited | Cap on number of profiles to scrape |
| `proxyConfig` | object | Apify residential | Proxy settings for IP rotation |

### Integrations and API access

Instagram Profile Scraper integrates with the Apify platform. You can:

- **Call via API** — trigger runs and retrieve data programmatically
- **Schedule runs** — set up recurring scrapes on a cron schedule
- **Connect webhooks** — get notified when a scrape completes
- **Export data** — download results as JSON, CSV, XML, Excel, or HTML
- **Integrate with tools** — connect to Google Sheets, Slack, Zapier, Make, and more

### Limitations

- Only **public profiles** can be fully scraped. Private profiles return limited data (username, profile pic, private flag)
- Latest posts are limited to the most recent **~12 posts** visible on the profile grid
- Some fields like `profilePicUrlHd`, `relatedProfiles`, `reelsCount`, and `about` details require Instagram authentication and may return null without login cookies
- Instagram rate limits apply — residential proxies are recommended for batches over 50 profiles

### FAQ

**How many Instagram profiles can I scrape?**
There is no hard limit. The scraper handles batches of any size with automatic proxy rotation and retry logic. Large batches (1,000+) are recommended with residential proxies.

**How fast is the scraper?**
It processes up to 20 profiles concurrently using pure HTTP requests. A batch of 1,000 profiles typically completes in minutes.

**What happens if a profile doesn't exist?**
The scraper returns an error record with `"error": "Profile not found"` so you can identify invalid usernames.

**Can I scrape private profiles?**
Only publicly available information is extracted. Private profiles return basic data: username, full name, profile picture, and the private flag.

**What are pinned posts?**
Instagram lets users pin up to 3 posts to the top of their profile grid. This scraper detects pinned posts and marks them with `isPinned: true`. You can exclude them by setting `includePinnedPosts` to `false`.

**Why are some fields null?**
Fields like `profilePicUrlHd`, `reelsCount`, `relatedProfiles`, and `about` section details require an authenticated Instagram session. Without login cookies, these fields return null.

**Can I use this with the Apify API?**
Yes. You can start runs, retrieve datasets, and manage the scraper programmatically using the [Apify API](https://docs.apify.com/api/v2) or the [Apify client libraries](https://docs.apify.com/api/client/js) for JavaScript and Python.

**Does it work without proxies?**
For small batches (under 50 profiles), it may work without proxies. For larger batches, residential proxies are strongly recommended to avoid rate limiting.

# Actor input Schema

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

List of Instagram usernames, profile URLs, or @handles to scrape. Example formats: 'instagram', '@cristiano', 'https://www.instagram.com/leomessi/'.

## `includeLatestPosts` (type: `boolean`):

Include up to 12 latest posts with likes, comments, timestamps, captions, hashtags, and media URLs. Disabling this speeds up scraping.

## `includePinnedPosts` (type: `boolean`):

Show pinned posts at the top of the latest posts list. If disabled, only non-pinned posts are returned sorted by date.

## `includeRelatedProfiles` (type: `boolean`):

Include suggested or related profiles. Requires authenticated session data (may return empty without login cookies).

## `includeAboutSection` (type: `boolean`):

Include about info such as join date, country, and former usernames. Requires authenticated session data (may return empty without login cookies).

## `maxProfiles` (type: `integer`):

Maximum number of profiles to scrape. Leave empty or set to 0 for no limit.

## `proxyConfig` (type: `object`):

Proxy settings for IP rotation. Residential proxies are recommended for reliable results.

## Actor input object example

```json
{
  "usernames": [
    "instagram"
  ],
  "includeLatestPosts": true,
  "includePinnedPosts": true,
  "includeRelatedProfiles": false,
  "includeAboutSection": false,
  "maxProfiles": 0,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `detailed` (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": [
        "instagram"
    ],
    "maxProfiles": 0,
    "proxyConfig": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("upadhyay.labs/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": ["instagram"],
    "maxProfiles": 0,
    "proxyConfig": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("upadhyay.labs/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": [
    "instagram"
  ],
  "maxProfiles": 0,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call upadhyay.labs/instagram-profile-scraper --silent --output-dataset

```

## MCP server setup

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