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

followers, following, post count, bio, website and bio links, verification, business category, email and phone where listed, and related accounts. It also collects each profile's recent posts and reels, with captions, hashtags, mentions, likes, comments and views, dates, locations and media links.

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

## Pricing

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

**Instagram Profile & Posts Scraper** extracts **public Instagram profiles in bulk**: followers, following, post count, bio, website and bio links, verification, **business category, email and phone** where listed, and related accounts. It also collects each profile's **recent posts and reels**, with captions, hashtags, mentions, **likes, comments and views**, dates, locations and media links.

### What does Instagram Profile & Posts Scraper do?

Give it [Instagram](https://www.instagram.com) usernames or profile links. For each one you get:

- **One profile row**: name, bio, website and all bio links, followers, following, total posts, highlights, verified and business status, category, business contact details (if the account publishes them), profile picture and related profiles.
- **Post rows**: the most recent posts and reels (up to your limit), with type (photo, carousel, video, reel), caption, hashtags and mentions, likes, comments, views, posting date, location, image and video links, and whether the post is pinned.

On the Apify platform you also get API access, scheduling, integrations (Google Sheets, Airtable, Zapier, Make, webhooks) and run monitoring.

### Why scrape Instagram profiles?

- **Influencer marketing**: vet creators by followers, engagement (likes, comments, views per post) and posting frequency before you reach out.
- **Competitor tracking**: monitor competitors' content, posting cadence and which posts perform best.
- **Lead generation**: collect business categories, websites, emails and phones listed by business accounts.
- **Brand monitoring & research**: track hashtags and mentions used by accounts in your niche.
- **Analytics & reporting**: schedule runs to build follower and engagement history over time.

### How to scrape Instagram profiles and posts

1. Open the Actor and go to the **Input** tab.
2. Add usernames or profile links to **Profiles**, one per line.
3. Set **Max posts per profile** (or `0` for profile details only).
4. Click **Start**.
5. Open the **Output** tab and switch between the **Profiles** and **Posts** views, or download as JSON, CSV, Excel or HTML.

### Input

| Field | Type | Description |
|---|---|---|
| `usernames` | array | Usernames (`natgeo`, `@nasa`) or profile links. **Required.** |
| `maxPostsPerProfile` | integer | Most recent posts and reels per profile (0–200). Default `12`. `0` = profile only. |

```json
{
    "usernames": ["nasa", "https://www.instagram.com/natgeo/"],
    "maxPostsPerProfile": 50
}
```

### Output

Two kinds of rows, marked by `entityType`. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

**Profile**

```json
{
    "entityType": "profile",
    "username": "nasa",
    "fullName": "NASA",
    "userId": "528817151",
    "url": "https://www.instagram.com/nasa/",
    "biography": "Making the seemingly impossible, possible. ✨",
    "externalUrl": "https://www.nasa.gov/",
    "bioLinks": ["https://www.nasa.gov", "http://intern.nasa.gov", "https://www.nasa.gov/maxpower"],
    "followers": 104337762,
    "following": 89,
    "postsCount": 4934,
    "highlightsCount": 6,
    "isVerified": true,
    "isPrivate": false,
    "isBusinessAccount": true,
    "isProfessionalAccount": true,
    "category": "Government Agencies",
    "businessEmail": null,
    "businessPhone": null,
    "businessAddress": null,
    "profilePicUrl": "https://scontent-lax3-1.cdninstagram.com/…",
    "relatedProfiles": ["sciencechannel", "natgeoyourshot", "unesco"],
    "error": null
}
```

**Post**

```json
{
    "entityType": "post",
    "ownerUsername": "nasa",
    "postId": "3990495229280545049",
    "shortcode": "DdhFkS7KGkZ",
    "url": "https://www.instagram.com/p/DdhFkS7KGkZ/",
    "type": "reel",
    "caption": "Our first Leader of the Uprising 🔥 …",
    "hashtags": [],
    "mentions": ["paramountplus", "nfloncbs"],
    "likes": 44771,
    "comments": 592,
    "views": 1698315,
    "postedAt": "2026-09-20T17:20:00+00:00",
    "location": "M&T Bank Stadium",
    "imageUrl": "https://scontent-lax3-2.cdninstagram.com/…",
    "videoUrl": "https://scontent-lax3-2.cdninstagram.com/…",
    "carouselCount": null,
    "isPinned": false
}
```

### Output data fields

| Field | Description |
|---|---|
| `followers` / `following` / `postsCount` | Audience size and activity. |
| `biography` / `externalUrl` / `bioLinks` | Bio text, website and every link in the bio. |
| `isVerified` / `isBusinessAccount` / `category` | Account type and category. |
| `businessEmail` / `businessPhone` / `businessAddress` | Contact details the account lists publicly (business accounts only, when provided). |
| `relatedProfiles` | Similar accounts suggested for this profile. |
| `type` | `photo`, `carousel`, `video` or `reel`. |
| `likes` / `comments` / `views` | Engagement (views for videos and reels). |
| `caption` / `hashtags` / `mentions` | Post text and what it tags. |
| `postedAt` / `location` / `isPinned` | When and where it was posted, and whether it's pinned. |
| `imageUrl` / `videoUrl` / `carouselCount` | Media links and number of items in a carousel. |

### How many results will I get?

One profile row per username, plus up to **Max posts per profile** post rows. 10 profiles × 50 posts = up to 510 rows. Private accounts return only their profile row.

### Tips

- **Engagement rate**: divide average `likes + comments` per post by `followers`.
- **Profile snapshots**: set **Max posts per profile** to `0` and schedule daily runs to track follower growth.
- **Large lists**: add hundreds of usernames in one run; they're processed in parallel.

### FAQ

**Can I scrape private accounts?** No. Only public information is available; private accounts return their public profile details without posts.

**Why is `businessEmail` empty for some business accounts?** Accounts choose whether to publish contact details, and some profile details can't be retrieved for every account. The rest of the profile is still returned.

**Why did I get fewer posts than I asked for?** Instagram sometimes limits how far back posts can be read in one run, and some accounts have fewer posts than your limit. Re-running usually fills the gap.

**Is scraping Instagram legal?** The Actor only collects publicly visible information. You're responsible for using it lawfully, especially personal data under GDPR and similar laws.

**Found a bug or need a custom feature?** Open an issue in the **Issues** tab. Custom solutions are available on request.

# Actor input Schema

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

Instagram usernames (natgeo, @nasa) or profile links (https://www.instagram.com/natgeo/), one per line.

## `maxPostsPerProfile` (type: `integer`):

How many of the most recent posts and reels to collect from each profile. 0 = profile details only.

## Actor input object example

```json
{
  "usernames": [
    "nasa",
    "natgeo"
  ],
  "maxPostsPerProfile": 12
}
```

# 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": [
        "nasa",
        "natgeo"
    ],
    "maxPostsPerProfile": 12
};

// Run the Actor and wait for it to finish
const run = await client.actor("maged120/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": [
        "nasa",
        "natgeo",
    ],
    "maxPostsPerProfile": 12,
}

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

```

## MCP server setup

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