# Instagram Post Scraper Pro (`codenest/instagram-post-scraper-pro`) Actor

(Cheapest rate) Scrape thousands of Instagram posts in just minutes with full metadata - usernames, captions, reactions, comments, media URLs (images/videos/reels), thumbnails, and upload timestamps from any public profile.

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

## Pricing

from $2.50 / 1,000 scraped instagram posts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Post Scraper Pro - Ultimate Post & Profile Data Extractor

**Effortlessly scrape detailed Instagram post data with our powerful **Instagram Post Scraper Pro**! This Apify actor enables extraction of post details, engagement metrics, carousel media, tagged users, latest comments, and complete profile metadata.**

***

### 📋 Overview

Need to analyze Instagram posts, track engagement, or build content databases? This **Instagram Post Scraper Pro** delivers:

- 📱 **Direct Post Scraping** - Extract data from specific Instagram post URLs
- 👤 **Profile-Based Scraping** - Get posts from any public Instagram profile
- 📊 **Detailed Engagement Metrics** - Likes, comments, views, shares, and reposts
- 🎠 **Carousel Media Extraction** - Images and videos from multi-media posts
- 👥 **Tagged Users Detection** - Users tagged in posts with profile details
- 💬 **Latest Comments** - Recent comments with user info and timestamps
- 🏷️ **Hashtag & Mention Extraction** - Auto-detects hashtags and @mentions

Perfect for social media analysts 📈, content strategists 🎭, brand managers 📊, and researchers 🔬!

***

### ⭐ Core Capabilities of Instagram Post Scraper Pro

#### 🎯 Dual Scraping Modes

- **Post URL Mode** - Scrape specific posts by URL
- **Profile URL Mode** - Scrape latest posts from any public profile
- **Combined Mode** - Mix both post URLs and profile URLs
- **Username Support** - Accepts usernames or full URLs

#### 📊 Detailed Engagement Data

- **Reaction Counts** - Likes with raw and formatted numbers
- **Comment Counts** - Total comments with formatted display
- **View Counts** - Video views when available
- **Share Counts** - Share metrics when available
- **Repost Detection** - Identifies reposted content

#### 🎠 Complete Media Extraction

- **Post Type Detection** - Image, video, or carousel
- **Carousel Media** - Individual images and videos with URLs
- **Downloadable URLs** - Direct video download links
- **Thumbnail Extraction** - High-quality cover images
- **Media Count** - Number of carousel items

#### 👥 Social Intelligence

- **Tagged Users** - Users tagged with verification status and profile pics
- **Latest Comments** - Recent comments with user details
- **Hashtag Detection** - Extracted hashtags from captions
- **Mention Detection** - Extracted @mentions from captions

#### 📁 Profile Metadata

- **Complete Profile Info** - Username, full name, bio
- **Follower Statistics** - Followers, following, posts count
- **Verification Status** - Verified account detection
- **Profile Picture** - HD profile image URL

***

### ⚙️ Input Configuration

Simply enter post URLs, profile URLs, and configure options. Input looks like this:

```json
{
  "headless": true,
  "includeDetailedEngagement": true,
  "maxReels": 10,
  "postUrls": [
    "https://www.instagram.com/p/Dcl4SbSlNZA/",
    "https://www.instagram.com/p/Dc53Me7E9sO/"
  ],
  "profileUrls": [
    "nba"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  },
  "outputFile": "reels_data.json",
  "sessionId": ""
}
```

#### 📝 Input Specifications

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `postUrls` | Array | ❌ No | \[] | Specific Instagram post URLs to scrape |
| `profileUrls` | Array | ❌ No | \[] | Instagram usernames or profile URLs |
| `maxReels` | Integer | ❌ No | 10 | Maximum posts per profile to extract |
| `includeDetailedEngagement` | Boolean | ❌ No | true | Include detailed engagement metrics |
| `headless` | Boolean | ❌ No | true | Run browser in headless mode |
| `outputFile` | String | ❌ No | "reels\_data.json" | Output filename |
| `proxyConfiguration.useApifyProxy` | Boolean | ❌ No | true | Enable Apify proxy rotation |
| `proxyConfiguration.apifyProxyGroups` | Array | ❌ No | \["RESIDENTIAL"] | Proxy groups for scraping |
| `sessionId` | String | ❌ No | "" | Session ID for cookie persistence |

***

### 📤 Output Structure

Your **Instagram Post Scraper Pro** produces comprehensive post and profile data:

```json
[
  {
    "profile_url": "https://www.instagram.com/nba",
    "scraped_at": "2026-09-15T06:46:08.945159Z",
    "profile_metadata": {
      "username": "nba",
      "full_name": "NBA",
      "biography_clean": "The 2026-27 NBA season tips off Tuesday, Oct. 20...",
      "followers_count": 88010607,
      "following_count": 1302,
      "posts_count": 0,
      "profile_pic_url_hq": "https://scontent-mrs2-2.cdninstagram.com/...",
      "is_verified": true,
      "page_title": "NBA (@nba) • Instagram photos and videos"
    },
    "total_posts_scraped": 10,
    "posts": [
      {
        "posts num ": 1,
        "title": "OPENING WEEK IS MUST-SEE 🍿...",
        "author_name": "nba",
        "author_url": "https://www.instagram.com/nba/",
        "author_id": 20824486,
        "media_id": "3961358960653615413",
        "post_url": "https://www.instagram.com/p/Db5kvyNkcE1/",
        "shortcode": "Db5kvyNkcE1",
        "post_type": "carousel",
        "is_video": false,
        "thumbnail_url": "https://scontent-mrs2-3.cdninstagram.com/...",
        "carousel_images": ["https://scontent-mia3-3.cdninstagram.com/..."],
        "carousel_media_count": 4,
        "reactions": "143.1K",
        "like_count": 143106,
        "comments": "1.7K",
        "comment_count": 1654,
        "views": "",
        "views_count": null,
        "is_repost": false,
        "hashtags": [],
        "mentions": ["espn", "nbaonnbc"],
        "upload_time": "2026-08-11T12:20:09Z",
        "carousel_items": [
          {
            "id": "POLARIS_3961356626661134869",
            "type": "image",
            "display_url": "https://scontent-mia3-3.cdninstagram.com/...",
            "video_url": ""
          }
        ],
        "tagged_users": [
          {
            "username": "espn",
            "full_name": "ESPN",
            "is_verified": true,
            "profile_pic_url": "https://scontent-mia5-2.cdninstagram.com/..."
          }
        ],
        "latest_comments": [
          {
            "id": "18103544903189155",
            "text": "Ready",
            "owner_username": "emilialorenzon",
            "owner_profile_pic_url": "https://scontent-mia3-1.cdninstagram.com/...",
            "created_at": "2026-09-15T02:09:51Z",
            "like_count": 0,
            "child_comment_count": 0
          }
        ]
      }
    ]
  }
]
```

#### 📖 Output Field Documentation

**🔹 Profile Metadata**
| Field | Description |
|-------|-------------|
| `username` | Instagram username |
| `full_name` | Display name on profile |
| `biography_clean` | Profile bio/description |
| `followers_count` | Total followers (integer or string) |
| `following_count` | Total following count |
| `posts_count` | Total posts count |
| `profile_pic_url_hq` | HD profile picture URL |
| `is_verified` | Verification status |
| `page_title` | Full page title |

**🔹 Post Identification**
| Field | Description |
|-------|-------------|
| `posts num` | Sequential post number |
| `title` | Post caption/description |
| `author_name` | Content creator username |
| `author_id` | Instagram author ID |
| `media_id` | Unique media identifier |
| `post_url` | Direct post URL |
| `shortcode` | Unique post shortcode |
| `post_type` | Image, video, or carousel |
| `is_video` | Video post indicator |

**🔹 Engagement Metrics**
| Field | Description |
|-------|-------------|
| `reactions` | Formatted like count |
| `like_count` | Numeric like count |
| `comments` | Formatted comment count |
| `comment_count` | Numeric comment count |
| `views` | Formatted view count |
| `views_count` | Numeric view count |
| `is_repost` | Repost indicator |

**🔹 Media Assets**
| Field | Description |
|-------|-------------|
| `thumbnail_url` | Post thumbnail URL |
| `carousel_images` | Array of carousel image URLs |
| `carousel_media_count` | Number of carousel items |
| `post_downloadable_url` | Direct video download URL |
| `carousel_items` | Detailed carousel items with types |

**🔹 Carousel Items**
| Field | Description |
|-------|-------------|
| `id` | Carousel item ID |
| `type` | Item type (image/video) |
| `display_url` | Display image URL |
| `video_url` | Video URL (if video) |

**🔹 Social Data**
| Field | Description |
|-------|-------------|
| `tagged_users` | Users tagged in post |
| `tagged_users.username` | Tagged user handle |
| `tagged_users.is_verified` | Tagged user verification |
| `latest_comments` | Recent comments on post |
| `latest_comments.text` | Comment text |
| `latest_comments.owner_username` | Commenter username |
| `latest_comments.created_at` | Comment timestamp |
| `hashtags` | Extracted hashtags |
| `mentions` | Extracted @mentions |

**🔹 Temporal Data**
| Field | Description |
|-------|-------------|
| `upload_time` | Post upload timestamp (ISO 8601) |
| `scraped_at` | Data collection timestamp |

***

### 🎨 Key Features of This Instagram Post Scraper Pro

#### 📊 Detailed Engagement Analytics

- **Dual Format Metrics** - Both formatted (K/M) and numeric values
- **Cross-Post Comparison** - Analyze performance across posts
- **Engagement Rate Calculation** - Compare likes vs comments
- **Repost Detection** - Identify shared content

#### 🎠 Complete Carousel Support

- **Individual Item Extraction** - Every carousel item captured
- **Media Type Detection** - Distinguishes images from videos
- **Video URL Extraction** - Direct video links from carousels
- **Order Preservation** - Carousel items in original order

#### 👥 Social Graph Data

- **Tagged User Extraction** - All tagged accounts
- **User Verification Status** - Detect verified accounts
- **Profile Picture URLs** - Tagged user avatars
- **Latest Comments** - Recent engagement with user info

#### 🏷️ Content Intelligence

- **Hashtag Extraction** - All hashtags from captions
- **Mention Detection** - All @mentions from captions
- **Repost Detection** - Identifies reposted content
- **Post Type Classification** - Image, video, or carousel

#### 🚀 Smart Features

- **Dual Input Modes** - Post URLs and profile URLs
- **Username Support** - Accepts usernames or full URLs
- **Proxy Integration** - Built-in Apify proxy support
- **Output File Export** - JSON file output option

***

### 💡 Use Cases for Instagram Post Scraper Pro

- **📈 Influencer Marketing** - Analyze post performance and engagement
- **📊 Competitor Analysis** - Track competitor content strategies
- **🎭 Content Strategy** - Identify top-performing post formats
- **🔬 Research** - Study social media engagement patterns
- **💰 Brand Partnerships** - Evaluate influencer post quality
- **📱 Social Media Management** - Monitor client post performance
- **🎯 Audience Research** - Understand engagement drivers
- **📚 Content Curation** - Build content libraries for repurposing

***

### ✨ Why Choose Our Instagram Post Scraper Pro?

- **⚡ Fast & Efficient** - Quick post data extraction
- **🎯 100% Accurate** - Preserves all data without alteration
- **📦 Complete Data** - Everything from engagement to carousel items
- **🔄 Regular Updates** - Adapts to Instagram changes
- **🛡️ Production Ready** - Reliable with thousands of posts
- **💰 Cost Efficient** - Optimized for minimal compute time
- **🔒 Privacy Focused** - No personal data stored or shared

***

### ⚠️ Limitations

- Only works with public Instagram posts and profiles
- Private accounts and posts are not accessible
- Some engagement metrics may be limited based on privacy settings
- Rate limits may apply for high-volume scraping
- View counts available only for video content

***

### 📧 Need Custom Features for Your Instagram Post Scraper Pro?

Want **additional post fields**, **specific engagement filters**, **custom output formats**, **advanced analytics**, or **automated reporting**?

✉️ Email **<codenest2.0@gmail.com>** for tailored enterprise solutions!

***

# Actor input Schema

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

Enter one or more Instagram profile URLs or usernames to scrape. Example: nba or https://www.instagram.com/nba/

## `postUrls` (type: `array`):

Enter one or more specific Instagram post or reel URLs to scrape directly. Example: https://www.instagram.com/p/DdRhA8klE\_5/ or https://www.instagram.com/reel/DW1jJbtCMB8/

## `maxReels` (type: `integer`):

Maximum number of posts/reels to scrape per profile in chronological order (newest first). Default is 50.

## `includeDetailedEngagement` (type: `boolean`):

Toggle ON to include full latest comments, tagged users, and granular carousel items for each post. Toggle OFF to exclude them. NOTE: Enabling this option incurs an extra charge ('detailed-engagement-scraped' event). Default is false.

## `maxTotalChargeUsd` (type: `number`):

Optional spending limit in USD for Pay-Per-Event pricing (e.g. 5.00 for $5.00 USD).

## `headless` (type: `boolean`):

Run Playwright browser in headless mode (no visible window). Default is true.

## `outputFile` (type: `string`):

Name of the output JSON file. Default is reels\_data.json.

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

Select proxies to be used by the scraper.

## `sessionId` (type: `string`):

Optional: Your Instagram sessionid cookie value. Highly recommended to bypass login prompts.

## Actor input object example

```json
{
  "profileUrls": [],
  "postUrls": [
    "https://www.instagram.com/p/DdRhA8klE_5/?utm_source=ig_web_copy_link&stkn=NTc4MTIwNjQ2YQ==",
    "https://www.instagram.com/reel/DW1jJbtCMB8/?utm_source=ig_web_copy_link&stkn=NTc4MTIwNjQ2YQ=="
  ],
  "maxReels": 50,
  "includeDetailedEngagement": false,
  "headless": true,
  "outputFile": "reels_data.json",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "sessionId": ""
}
```

# Actor output Schema

## `posts` (type: `string`):

Tabular view of scraped Instagram posts and reels with profile metadata, media links, and engagement metrics.

## `allResults` (type: `string`):

Complete dataset containing full post metadata, high-resolution carousel photos, direct MP4 video downloads, metrics, and comments.

## `outputRecord` (type: `string`):

Consolidated JSON array of all scraped posts stored in the default Key-Value Store.

# 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 = {
    "postUrls": [
        "https://www.instagram.com/p/DdRhA8klE_5/?utm_source=ig_web_copy_link&stkn=NTc4MTIwNjQ2YQ==",
        "https://www.instagram.com/reel/DW1jJbtCMB8/?utm_source=ig_web_copy_link&stkn=NTc4MTIwNjQ2YQ=="
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("codenest/instagram-post-scraper-pro").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 = { "postUrls": [
        "https://www.instagram.com/p/DdRhA8klE_5/?utm_source=ig_web_copy_link&stkn=NTc4MTIwNjQ2YQ==",
        "https://www.instagram.com/reel/DW1jJbtCMB8/?utm_source=ig_web_copy_link&stkn=NTc4MTIwNjQ2YQ==",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("codenest/instagram-post-scraper-pro").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 '{
  "postUrls": [
    "https://www.instagram.com/p/DdRhA8klE_5/?utm_source=ig_web_copy_link&stkn=NTc4MTIwNjQ2YQ==",
    "https://www.instagram.com/reel/DW1jJbtCMB8/?utm_source=ig_web_copy_link&stkn=NTc4MTIwNjQ2YQ=="
  ]
}' |
apify call codenest/instagram-post-scraper-pro --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codenest/instagram-post-scraper-pro"
        }
    }
}
```

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/ePdF4sXK9MVBqJTNt/builds/nK7h2JQo7YlO65EyT/openapi.json
