# Instagram Profile Scraper (`herus13/instagram-profile-scraper`) Actor

Scrape public Instagram profiles anonymously — full name, bio, followers/following, posts count, verified/business flags, category, external link, profile picture, plus a best-effort list of recent posts (caption, likes, comments, media URLs). No login required. HTTP-only.

- **URL**: https://apify.com/herus13/instagram-profile-scraper.md
- **Developed by:** [bootforge](https://apify.com/herus13) (community)
- **Categories:** Automation, Lead generation, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 post scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## Instagram Profile Scraper

The Instagram Profile Scraper is an Apify actor that extracts **public** Instagram profile data — no login, no account, no cookies. Pass any username, @handle, profile URL, **or post URL** and get one structured record per profile: full name, biography, follower/following counts, post count, verified/business flags, category, external link, and profile picture — plus a best-effort list of recent posts (caption, likes, comments, media URLs).

Use it for influencer research, lead generation, competitor tracking, or social-media analytics — exported to JSON, CSV, or Excel, or pulled from the [Apify API](https://docs.apify.com/api/v2).

### Table of contents

- [What the Instagram profile scraper does](#what-the-instagram-profile-scraper-does)
- [How to scrape Instagram profiles](#how-to-scrape-instagram-profiles)
- [Instagram profile scraper input](#instagram-profile-scraper-input)
- [Instagram profile data output](#instagram-profile-data-output)
- [How much it costs](#how-much-it-costs)
- [Recommended proxies for Instagram](#recommended-proxies-for-instagram)
- [Why this Instagram profile scraper](#why-this-instagram-profile-scraper)
- [FAQ](#faq)
- [Rate this actor](#rate-this-actor-)
- [Related actors](#related-actors)

### What the Instagram profile scraper does

- 🔓 **No login required** — anonymous HTTP extraction; no Instagram account, password, or session cookie.
- 🧾 **Username, handle, URL, or post URL** — accepts `nasa`, `@nasa`, `https://instagram.com/nasa/`, or a `https://instagram.com/p/ABC123/` post URL (returns the profile that owns the post).
- 👥 **Full profile metadata** — full name, bio, follower/following counts, post count, verified/business flags, category, external link, and profile picture.
- 🖼️ **Recent posts** — best-effort list of recent posts (caption, likes, comments, media URLs), controlled by `max_posts` (`0` = metadata only).
- 📄 **Two output shapes** — `post` (one flat row per post, profile fields denormalized — CSV-friendly) or `profile` (posts nested as JSON).
- 💳 **Pay only for what you get** — private accounts return metadata and are charged; not-found, blocked, or errored profiles are never charged.

### How to scrape Instagram profiles

1. Click **Try for free** and open the actor.
2. Add one or more `targets` — usernames, @handles, profile URLs, or post URLs.
3. Set `max_posts` (default 12; use `0` for metadata only).
4. Choose `output_mode` — `post` for spreadsheets, `profile` for JSON pipelines.
5. Select a **residential** proxy (Apify Proxy residential is prefilled).
6. Click **Start**, then export as **JSON, CSV, or Excel**.

Scrape profiles with recent posts:

```json
{
  "targets": ["nasa", "@natgeo", "https://instagram.com/bbcearth/"],
  "max_posts": 12,
  "output_mode": "post",
  "proxy": {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}
}
```

Metadata only (cheapest — no posts):

```json
{
  "targets": ["nasa"],
  "max_posts": 0,
  "proxy": {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}
}
```

### Instagram profile scraper input

| Field | Description |
|---|---|
| `targets` | Usernames, @handles, profile URLs, or **post URLs** (`nasa`, `@nasa`, `https://instagram.com/nasa/`, `https://instagram.com/p/ABC123/`). A post URL returns the profile that owns it. Required. |
| `max_posts` | Best-effort cap on recent posts per profile (default 12, max 500). `0` = metadata only. Anonymous pagination may stop early and return a `partial` result — that is normal, not an error. |
| `output_mode` | `post` (default) — one row per post, profile fields denormalized (clean CSV). `profile` — one row per profile with posts nested as JSON. |
| `proxy` | **Required.** Instagram blocks datacenter IPs — use a **residential** proxy (Apify Proxy residential, prefilled) or your own via a provider object. |

### Instagram profile data output

Each row is one post with the profile denormalized onto it (`output_mode: post`). Sample:

```json
{
  "username": "nasa",
  "full_name": "NASA",
  "biography": "Explore the universe and discover our home planet with NASA.",
  "followers": 97800000,
  "following": 78,
  "posts_count": 4120,
  "is_verified": true,
  "is_private": false,
  "is_business": true,
  "category": "Science, Technology & Engineering",
  "external_url": "https://www.nasa.gov/",
  "profile_pic_url": "https://instagram.fxyz1-1.fna.fbcdn.net/v/...",
  "user_id": "528817151",
  "posts_collected": 12,
  "partial": false,
  "post_shortcode": "C8xAbC1DefG",
  "post_url": "https://www.instagram.com/p/C8xAbC1DefG/",
  "post_caption": "A new view of the Pillars of Creation from the James Webb Space Telescope.",
  "post_likes": 1240533,
  "post_comments": 8821,
  "post_taken_at": "2026-06-10T14:02:11+00:00",
  "post_display_url": "https://instagram.fxyz1-1.fna.fbcdn.net/v/...",
  "scraped_at": "2026-06-19T08:30:00+00:00",
  "error": null
}
```

| Field group | Fields |
|---|---|
| Profile (every row) | `username`, `full_name`, `biography`, `followers`, `following`, `posts_count`, `is_verified`, `is_private`, `is_business`, `category`, `external_url`, `profile_pic_url`, `user_id`, `posts_collected`, `partial`, `scraped_at`, `error` |
| Per post (`post` mode) | `post_shortcode`, `post_url`, `post_caption`, `post_likes`, `post_comments`, `post_taken_at`, `post_display_url` |

Profiles with no posts (private / not-found / `max_posts=0`) emit a single metadata row. In `profile` mode, posts are nested in a `posts` array instead of being flattened.

### How much it costs

This actor uses **pay-per-event** pricing — you pay for what you scrape, not for time.

| Event | USD |
|---|---|
| Actor start (per GB memory) | $0.005 |
| Profile scraped | $0.008 |
| Post scraped | $0.002 |

Default memory is 1 GB, so the start event is **$0.005 per run**.

| Typical run | Profiles | Posts each | Cost |
|---|---|---|---|
| Single profile, metadata only | 1 | 0 | ~$0.01 |
| 100 influencers, 12 posts each | 100 | 12 | ~$3.21 |
| 1,000 profiles, metadata only | 1,000 | 0 | ~$8.01 |
| 1,000 profiles + 5 posts each | 1,000 | 5 | ~$18.01 |

You only pay for profiles actually delivered. Not-found, blocked, or errored profiles are **not** charged. Private accounts return metadata and are charged.

### Recommended proxies for Instagram

A **residential** proxy is required — Instagram blocks datacenter IPs (including Apify's servers). The easiest option is Apify's managed residential proxy, which this actor prefills:

```json
{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}
```

You can also plug in your own residential provider (Bright Data, Oxylabs, SmartProxy, or any `raw_urls` proxy). If you run your own scrapers — on or off Apify — and need reliable residential IPs for Instagram or other social sites, we use and recommend **[DataImpulse](https://dataimpulse.com/?aff=404588\&utm_source=apify)**: pay-as-you-go, per-country targeting, no monthly minimum.

👉 **[Get DataImpulse residential proxies](https://dataimpulse.com/?aff=404588\&utm_source=apify)** (referral link)

### Why this Instagram profile scraper

- **No login, no cookies** — pure anonymous HTTP extraction; nothing to get your account flagged or banned.
- **Flexible targets** — mix usernames, handles, profile URLs, and post URLs in one run.
- **CSV-ready or JSON-ready** — `post` mode flattens for spreadsheets; `profile` mode nests for pipelines.
- **Honest billing** — only delivered profiles and posts are charged; failures cost nothing.
- **Open source** — the underlying `instagram-scraper` Python package ships a Typer CLI and a FastAPI server; the Apify wrapper is a thin layer.

### FAQ

**Do I need an Instagram account or login?** No. The actor extracts only publicly visible profile data anonymously over HTTP — no account, password, or session cookie. It cannot access private content, so private posts are never returned.

**Which proxies work best for Instagram?** Residential proxies. Instagram blocks datacenter IPs, so Apify's residential group (prefilled) is the easiest choice. For your own scrapers we recommend [DataImpulse](https://dataimpulse.com/?aff=404588\&utm_source=apify) residential IPs (referral link).

**Can I scrape private profiles?** Only their public metadata — name, follower count, bio, category, and picture. Posts of private accounts are not accessible anonymously, so the profile row is returned without posts, still charged as one profile.

**How many recent posts can I get?** Set `max_posts` up to 500. Pagination is best-effort under anonymous access; for large back-catalogs the `partial` flag marks profiles where collection stopped early. That is expected behavior, not an error.

**Am I charged for profiles that don't exist or are blocked?** No. Not-found, blocked, and errored profiles are never charged. Private accounts are charged because metadata is still delivered.

**Is scraping Instagram legal?** This actor collects only publicly available profile data. You are responsible for complying with Instagram's terms and applicable laws, and for not collecting personal data without a lawful basis.

### Rate this actor ⭐

If the Instagram Profile Scraper saved you time, please **leave a review on its Apify Store page** — ratings help other people find it and tell us what to build next. Hit a bug or missing field? Open an issue through the actor's **Issues** tab and we'll fix it fast — recency and reliability are what keep this actor ranking.

### Related actors

Building a broader social or lead pipeline? These actors use the same proxy config format and Pydantic-validated output.

- **[Instagram Post Scraper](https://apify.com/herus13/instagram-post-scraper)** — scrape posts by username or direct post/reel URL: caption, likes, comments, media URLs, owner. No login.
- **[Instagram Comment Scraper](https://apify.com/herus13/instagram-comment-scraper)** — pull comments from any public post or reel: author, text, likes, timestamp. No login.
- **[Google Maps Scraper](https://apify.com/herus13/google-maps-scraper)** — extract business leads with emails, phone numbers, reviews, and social links.
- **[LinkedIn Profile Scraper](https://apify.com/herus13/linkedin-profile-scraper)** — scrape LinkedIn profiles via your `li_at` cookie: structured fields, full experience history, optional contact enrichment.

# Actor input Schema

## `targets` (type: `array`):

<p>Instagram usernames, @handles, profile URLs, or <strong>post URLs</strong> (a post URL returns the profile that owns it). Examples: <code>nasa</code>, <code>https://instagram.com/nasa/</code>, <code>https://instagram.com/p/ABC123/</code>.</p>
## `max_posts` (type: `integer`):

<p>Best-effort maximum number of recent posts to return per profile. Set <code>0</code> for profile metadata only (no posts). Anonymous pagination is best-effort — deep pagination may stop early and return a <code>partial</code> result; that is normal, not an error.</p>
## `output_mode` (type: `string`):

<p><strong>post</strong> (default): one dataset row per post, with profile fields denormalized onto each row (clean CSV). Profiles with no posts emit a single metadata row.</p><p><strong>profile</strong>: one row per profile with the posts nested as JSON (better for JSON consumers, harder to read as CSV).</p>
## `proxy` (type: `object`):

<p><strong>Required.</strong> Instagram blocks datacenter IPs. Use Apify <strong>residential</strong> proxy (any country) or your own residential proxy (BrightData / Oxylabs / SmartProxy via raw_urls).</p>

## Actor input object example

```json
{
  "targets": [
    "nasa"
  ],
  "max_posts": 12,
  "output_mode": "post",
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Instagram profile metadata and recent posts (post-centric or profile-centric per output mode)

# 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 = {
    "targets": [
        "nasa"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("herus13/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 = {
    "targets": ["nasa"],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/nBm8QyV8fwMTBWnPS/builds/mKf9qcf91kTposZAR/openapi.json
