# Instagram Comments (`igview-owner/instagram-comments`) Actor

Scrape and export unlimited comments from any public Instagram Post or Reel! Extract comment text, likes, reply counts, timestamps, and author profiles (usernames, user IDs, avatars, verified status). Export to Excel, CSV, or JSON in seconds — no Instagram login required.

- **URL**: https://apify.com/igview-owner/instagram-comments.md
- **Developed by:** [Sachin Kumar Yadav](https://apify.com/igview-owner) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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 Comments Scraper

Scrape and export complete **Instagram post and reel comments** from any public Instagram publication. Extract comment text, comment IDs, timestamps, like counts, reply counts, and author profile details with automated cursor pagination and configurable results limits.

This actor is built for:

- Sentiment analysis & brand feedback tracking
- Social media engagement monitoring & audience intelligence
- Influencer campaign comment audits & giveaway/contest extraction
- Customer feedback, inquiries, and FAQ mining
- Market research and competitor reaction analysis

***

### Table of Contents

- [Features](#features)
- [Use Cases](#use-cases)
- [Quick Start](#quick-start)
- [Input Parameters](#input-parameters)
- [Output](#output)
- [Output Fields](#output-fields)
- [Dataset Views](#dataset-views)
- [FAQ](#faq)
- [SEO Keywords](#seo-keywords)
- [Related Actors](#related-actors)

***

### Features

| Feature | Description |
|---------|-------------|
| **Single Post Focus** | Fast and dedicated extraction for any target Instagram post or reel |
| **URL & Shortcode Flexibility** | Accepts full Instagram post/reel URLs or raw shortcodes directly |
| **Automatic Cursor Pagination** | Seamlessly navigates through paginated comment lists using server cursors |
| **Comprehensive Author Details** | Captures commenter user ID, username, full name, avatar URL, and verification status |
| **Engagement & Interaction Metrics** | Tracks comment like counts and child reply counts |
| **ISO Timestamps** | Formats comment publication dates into both Unix timestamp and standard ISO 8601 strings |
| **Configurable Limits** | Scrape a specific number of comments or set to `0` for unlimited extraction |
| **High Performance Batching** | Comments are streamed and saved in batches of 25 for optimal memory and storage speed |
| **Smart Key Rotation** | Built-in key rotation and error recovery ensures uninterrupted execution |

***

### Use Cases

| Use Case | What You Can Do | Why It Helps |
|----------|-----------------|--------------|
| **Giveaways & Contests** | Export all comments on giveaway posts to pick winners transparently | Eliminates manual sorting and detects verified/unverified participants |
| **Sentiment & Brand Analysis** | Analyze audience feedback on product launches and announcements | Gain direct qualitative customer feedback and sentiment trends |
| **Competitor Ad & Post Research** | Monitor user discussions and complaints on competitor campaigns | Spot product gaps, customer pain points, and buyer intent |
| **Influencer Campaign Audits** | Evaluate genuine audience engagement vs bot spam on sponsored posts | Verify quality and authenticity of creator audience interactions |
| **Customer Support & Lead Mining** | Spot questions, inquiries, and leads asking about pricing or availability | Convert engaged commenters into prospective buyers |

***

### Quick Start

#### 1. Basic Run (Extract Recent Comments)

Scrape the top 50 comments from an Instagram post or reel:

```json
{
  "postUrl": "https://www.instagram.com/p/DfyUQyPlOSf/",
  "resultsLimit": 50
}
```

#### 2. Unlimited Scraping (All Comments)

Set `resultsLimit` to `0` to extract all available comments until the very end:

```json
{
  "postUrl": "https://www.instagram.com/p/DfyUQyPlOSf/",
  "resultsLimit": 0
}
```

#### 3. Using Post Shortcode

You can also pass the raw shortcode directly:

```json
{
  "postUrl": "DfyUQyPlOSf",
  "resultsLimit": 100
}
```

***

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|:--------:|---------|-------------|
| `postUrl` | String | **Yes** | `"https://www.instagram.com/p/DfyUQyPlOSf/"` | The target Instagram post URL, reel URL, or shortcode whose comments will be scraped. |
| `resultsLimit` | Integer | No | `50` | Maximum number of comments to scrape. Set to `0` for unlimited (fetches all pages). |

***

### Output

Each item in the dataset represents a single **Instagram comment**.

#### Example Output Record

```json
{
  "id": "18087033263370556",
  "text": "Beautiful ❤️",
  "createdAt": 1794841068,
  "createdAtISO": "2026-11-17T02:04:28.000Z",
  "likeCount": 12,
  "childCommentCount": 2,
  "replyCount": 2,
  "ownerId": "63991960774",
  "ownerUsername": "omgfactstube",
  "ownerFullName": "OMG FactsTube",
  "ownerAvatarUrl": "https://scontent-waw2-2.cdninstagram.com/v/t51.82787-19/...",
  "ownerIsPrivate": false,
  "ownerIsVerified": false,
  "postUrl": "https://www.instagram.com/p/DfyUQyPlOSf/",
  "postShortcode": "DfyUQyPlOSf"
}
```

***

### Output Fields

| Category | Field Name | Data Type | Description |
|----------|------------|-----------|-------------|
| **Comment** | `id` | String | Unique numerical ID of the comment |
| **Comment** | `text` | String | The comment text message content |
| **Comment** | `createdAt` | Integer | Timestamp in seconds (Unix epoch) |
| **Comment** | `createdAtISO` | String | Human-readable ISO 8601 UTC timestamp |
| **Engagement** | `likeCount` | Integer | Number of likes received by this comment |
| **Engagement** | `childCommentCount` | Integer | Number of replies under this comment |
| **Engagement** | `replyCount` | Integer | Alias for childCommentCount |
| **Author** | `ownerId` | String | Unique Instagram user ID of the commenter |
| **Author** | `ownerUsername` | String | Instagram handle (@username) of the commenter |
| **Author** | `ownerFullName` | String | Full name displayed on the commenter's profile |
| **Author** | `ownerAvatarUrl` | String | Direct CDN image URL of commenter's avatar |
| **Author** | `ownerIsVerified` | Boolean | True if the commenter holds a verified badge |
| **Author** | `ownerIsPrivate` | Boolean | True if the commenter's account is private |
| **Source** | `postUrl` | String | Canonical URL of the scraped Instagram post |
| **Source** | `postShortcode` | String | Shortcode identifying the post |

***

### Dataset Views

This actor comes configured with an **Overview** table view in the Apify Console:

- Visual preview of comment text, author username, full name, likes, replies, and avatar images.
- Ready to export directly to **JSON, CSV, Excel (XLSX), XML, or HTML**.

***

### FAQ

#### Can I scrape comments from private Instagram accounts?

No. Only public Instagram posts and reels can be scraped. Posts on private accounts are protected by Instagram permissions.

#### Does it work on Instagram Reels?

Yes! Instagram Reels use the same shortcode format (e.g., `https://www.instagram.com/reel/SHORTCODE/`). Just paste the reel URL or shortcode into `postUrl`.

#### How do I export all comments without any limits?

Set `"resultsLimit": 0`. The actor will automatically traverse all pages using cursor tokens until every comment is collected.

#### What export formats are supported?

You can download your data from Apify in:

- JSON / JSONL
- CSV
- Microsoft Excel (XLSX)
- XML
- HTML Table

***

### SEO Keywords

Instagram comments scraper, scrape Instagram comments, Instagram post comments exporter, Instagram reel comments downloader, export Instagram comments to CSV, download Instagram comments Excel, Instagram giveaway comment picker, Instagram comment sentiment analysis, Instagram API comments, extract Instagram comments with replies, Instagram comment engagement metrics.

***

### Related Actors

- [Instagram Followers Scraper](https://apify.com/igview-owner/instagram-followers-scraper) - Scrape public Instagram follower lists
- [Instagram Following Scraper](https://apify.com/igview-owner/instagram-following-scraper) - Scrape public Instagram following lists
- [Instagram Tagged Posts Scraper](https://apify.com/igview-owner/instagram-tagged-posts) - Extract tagged photos and videos
- [Instagram Post Viewer](https://apify.com/igview-owner/instagram-post-viewer) - Extract Instagram posts with media and metrics
- [Instagram Reels Downloader](https://apify.com/igview-owner/instagram-video-downloader) - Download Instagram reels & videos in HD
- [Instagram Story Viewer](https://apify.com/igview-owner/instagram-story-viewer) - View and extract Instagram stories anonymously

***

### **Get Started Now**

**Ready to download Instagram Post Comments?**

1. Click ["Try for free"](https://apify.com?fpr=ykgg9c) to test the actor
2. Enter an Instagram post url or shortcode
3. Get comprehensive comment data instantly

**If this actor helps your workflow, please give it a star!**

***

*Built with ❤️ by Sachin Kumar Yadav using Apify Platform*

# Actor input Schema

## `postUrl` (type: `string`):

Enter an Instagram post or reel URL or shortcode (e.g. https://www.instagram.com/p/DfyUQyPlOSf/ or DfyUQyPlOSf).

## `resultsLimit` (type: `integer`):

Maximum number of comments to scrape. Set to 0 for unlimited (all available comments). Default is 50.

## Actor input object example

```json
{
  "postUrl": "https://www.instagram.com/p/DfyUQyPlOSf/",
  "resultsLimit": 20
}
```

# Actor output Schema

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

Open the dataset view with an overview of scraped Instagram post comments.

# 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 = {
    "postUrl": "https://www.instagram.com/p/DfyUQyPlOSf/",
    "resultsLimit": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("igview-owner/instagram-comments").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 = {
    "postUrl": "https://www.instagram.com/p/DfyUQyPlOSf/",
    "resultsLimit": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("igview-owner/instagram-comments").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 '{
  "postUrl": "https://www.instagram.com/p/DfyUQyPlOSf/",
  "resultsLimit": 20
}' |
apify call igview-owner/instagram-comments --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,igview-owner/instagram-comments"
        }
    }
}
```

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/DChSZxFd6Wdomjdva/builds/pVguBLyKhDLAHwEp8/openapi.json
