# Instagram Comments Scraper (`automation-lab/instagram-comments-scraper`) Actor

Extract comments from any public Instagram post. Get usernames, text, timestamps, like counts, reply counts, and verified status. No login required. Export as JSON, CSV, or Excel.

- **URL**: https://apify.com/automation-lab/instagram-comments-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Social media
- **Stats:** 349 total users, 94 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 comment 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?

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

### What does Instagram Comments Scraper do?

**Instagram Comments Scraper** extracts the top comments from any public Instagram post or reel. Paste one or more post URLs and get structured data including the **comment text, username, timestamp, like count, reply count, and verified status**. No login or API key required.

The scraper starts with the comments embedded in the public post page, then follows Instagram's logged-out pagination cursor to collect more comments when one is available. Set a specific limit or use `0` to collect every comment Instagram exposes to logged-out visitors. Export results as **JSON, CSV, or Excel** with one click.

Unlike general-purpose Instagram scrapers, this tool is **purpose-built for comment extraction** with dedicated output fields, optimized pricing, and fast execution.

### Who is Instagram Comments Scraper for?

This section answers who is it for and where Instagram comment extraction fits into common social listening, research, and reporting workflows.

📊 **Brand managers and marketing teams**

- Monitor brand mentions and sentiment in post comments
- Track competitor engagement and audience reactions
- Collect user feedback on product launches and campaigns

🔬 **Researchers and data analysts**

- Analyze public discourse and opinion trends on Instagram
- Study engagement patterns across influencer content
- Build sentiment analysis datasets from comment text

📈 **Social media agencies**

- Generate engagement reports for clients
- Identify top commenters and brand advocates
- Monitor comment-based customer support conversations

🤖 **Developers and data engineers**

- Feed comment data into NLP pipelines and AI models
- Build custom monitoring dashboards via the API
- Integrate Instagram comment data with CRM or analytics tools

### Why use Instagram Comments Scraper?

✅ **No login required** — extracts comments from public posts without any Instagram account or session cookie

✅ **Dedicated comment tool** — purpose-built for comments with optimized output fields and pricing, not a general scraper with comments as an afterthought

✅ **Pay only for what you scrape** — pay-per-event pricing starting at $0.0023/comment (Free tier), with volume discounts on higher plans

✅ **Full comment data** — get usernames, text, timestamps, likes, reply counts, verified badges, and profile pictures

✅ **Reply thread support** — optionally include child comments (replies) alongside top-level comments

✅ **API access** — call programmatically from Node.js, Python, or any language via REST API

✅ **Scheduled runs** — set up recurring scrapes to monitor comments over time

✅ **Export anywhere** — download as JSON, CSV, or Excel, or push to Google Sheets, webhooks, and 5,000+ apps via Zapier/Make

### What data can you extract?

Each comment includes the following fields:

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique comment ID |
| `text` | string | Full comment text |
| `username` | string | Commenter's Instagram handle |
| `userId` | string | Commenter's user ID |
| `fullName` | string | Commenter's display name |
| `profilePicUrl` | string | URL to commenter's profile picture |
| `isVerified` | boolean | Whether the commenter has a verified badge |
| `likesCount` | number | Number of likes on the comment |
| `repliesCount` | number | Number of replies to the comment |
| `isReply` | boolean | Whether this is a reply to another comment |
| `parentCommentId` | string | ID of the parent comment (for replies) |
| `postShortCode` | string | Instagram post shortcode |
| `postUrl` | string | Full URL of the source post |
| `timestamp` | string | When the comment was posted (ISO 8601) |
| `scrapedAt` | string | When the data was collected |

### How much does it cost to scrape Instagram comments?

This Actor uses **pay-per-event** pricing — you pay only for what you scrape. No monthly subscription. All platform costs are **included**.

| | Free | Bronze ($49/mo) | Silver ($149/mo) | Gold ($499/mo) | Platinum | Diamond |
|---|---|---|---|---|---|---|
| **Per comment** | $0.0023 | $0.002 | $0.0015 | $0.001 | $0.0008 | $0.00056 |
| **1,000 comments** | $2.30 | $2.00 | $1.50 | $1.00 | $0.80 | $0.56 |
| **10,000 comments** | $23.00 | $20.00 | $15.00 | $10.00 | $8.00 | $5.60 |

Higher-tier plans get additional volume discounts. A one-time start fee of $0.005 applies per run.

**Real-world cost examples:**

| Scenario | Posts | Comments | Duration | Cost (Free tier) |
|---|---|---|---|---|
| Single post | 1 | ~15 | ~10s | ~$0.04 |
| Batch of 10 posts | 10 | ~150 | ~2min | ~$0.40 |
| Batch of 50 posts | 50 | ~750 | ~10min | ~$1.98 |

With the **free plan** ($5 in credits), you can scrape comments from approximately **150+ posts** at no cost.

### How to scrape Instagram comments

1. Go to [Instagram Comments Scraper](https://apify.com/automation-lab/instagram-comments-scraper) on the Apify Store
2. Click **Start for free** to open the Actor in Apify Console
3. Paste one or more Instagram post or reel URLs into the **Post URLs** field
4. Adjust the **Max comments per post** limit (default: 20)
5. Optionally enable **Include reply threads** to get child comments
6. Click **Start** and wait for the run to finish
7. Download your data as JSON, CSV, or Excel from the **Dataset** tab

**Example input for a single post:**

```json
{
    "postUrls": ["https://www.instagram.com/p/DVOyCluEVBg/"],
    "maxCommentsPerPost": 100
}
```

**Example input for multiple posts with replies:**

```json
{
    "postUrls": [
        "https://www.instagram.com/p/DVOyCluEVBg/",
        "https://www.instagram.com/reel/DU9NsLBvjPj/"
    ],
    "maxCommentsPerPost": 200,
    "includeReplies": true,
    "sortBy": "newest"
}
```

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `postUrls` | array | *required* | Instagram post or reel URLs to scrape comments from |
| `maxCommentsPerPost` | integer | 20 | Maximum comments to extract per post (`0` = every comment available without login) |
| `includeReplies` | boolean | false | Include reply threads (child comments) |
| `sortBy` | string | "popular" | Deterministic order for each post's collected comments: "popular" (most liked, then newest) or "newest" (most recent first) |
| `proxyCountry` | string | "US" | Proxy country code for geo-targeted results |

### Output example

```json
{
    "id": "18116832733656232",
    "text": "This is amazing! 🔥",
    "username": "johndoe",
    "userId": "53822734240",
    "fullName": "John Doe",
    "profilePicUrl": "https://scontent.cdninstagram.com/...",
    "isVerified": false,
    "likesCount": 42,
    "repliesCount": 3,
    "isReply": false,
    "parentCommentId": null,
    "postShortCode": "DVOyCluEVBg",
    "postUrl": "https://www.instagram.com/p/DVOyCluEVBg/",
    "timestamp": "2026-04-04T09:49:44.000Z",
    "scrapedAt": "2026-04-04T10:51:37.580Z"
}
```

### Tips for best results

💡 **Start small** — test with one post and a low comment limit before running large batches

💡 **Use popular sort** for sentiment analysis — the most-liked comments often represent the majority opinion

> Sorting is applied to the comments Instagram exposes publicly within your requested limit. When Instagram truncates its logged-out comment surface, `popular` cannot guarantee the globally most-liked comments from the full post.

💡 **Use newest sort** for monitoring — catch new comments as they come in with scheduled runs

💡 **Enable replies** only when needed — replies add to the total comment count and cost

💡 **Schedule recurring runs** for ongoing monitoring — set up daily or weekly scrapes to track comment trends on specific posts

💡 **Combine with other scrapers** — use [Instagram Scraper](https://apify.com/automation-lab/instagram-scraper) to find post URLs, then feed them into this actor for detailed comment extraction

### Integrations

📊 **Instagram Comments → Google Sheets**
Export comment data directly to a Google Sheet for collaborative analysis. Set up a scheduled run to append new comments daily.

🔔 **Instagram Comments → Slack/Discord**
Get notified when new comments appear on monitored posts. Use webhooks to push alerts to your team channel.

⚡ **Instagram Comments → Make/Zapier**
Build automated workflows: extract comments → run sentiment analysis → update CRM → alert team on negative feedback.

📅 **Scheduled monitoring**
Set up recurring runs to track comment activity over time. Compare comment volume and sentiment across posts, campaigns, or time periods.

🔗 **Webhooks**
Send results to any URL endpoint for real-time processing. Useful for feeding comment data into custom dashboards or ML pipelines.

### API usage with the Apify API

You can call Instagram Comments Scraper programmatically from any language.

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('automation-lab/instagram-comments-scraper').call({
    postUrls: ['https://www.instagram.com/p/DVOyCluEVBg/'],
    maxCommentsPerPost: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_APIFY_TOKEN')

run = client.actor('automation-lab/instagram-comments-scraper').call(run_input={
    'postUrls': ['https://www.instagram.com/p/DVOyCluEVBg/'],
    'maxCommentsPerPost': 100,
})

items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~instagram-comments-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "postUrls": ["https://www.instagram.com/p/DVOyCluEVBg/"],
    "maxCommentsPerPost": 100
  }'
```

### Use with AI agents via MCP

Instagram Comments Scraper is available as a tool for AI assistants that support the [Model Context Protocol (MCP)](https://docs.apify.com/platform/integrations/mcp).

Add the Apify MCP server to your AI client — this gives you access to all Apify actors, including this one:

#### Setup for Claude Code

```bash
claude mcp add --transport http instagram-comments-scraper "https://mcp.apify.com/?tools=automation-lab/instagram-comments-scraper"
```

The actor-scoped URL limits the MCP server to this scraper, so the tool list stays focused.

#### Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com/?tools=automation-lab/instagram-comments-scraper"
        }
    }
}
```

Your AI assistant will use OAuth to authenticate with your Apify account on first use.

#### Example prompts

Once connected, try asking your AI assistant:

- "Use automation-lab/instagram-comments-scraper to get all comments from https://www.instagram.com/p/DVOyCluEVBg/"
- "Scrape comments from these 5 Instagram posts and summarize the overall sentiment"
- "Extract the top 50 most-liked comments from this viral Instagram reel and identify common themes"

Learn more in the [Apify MCP documentation](https://docs.apify.com/platform/integrations/mcp).

### Legality: is it legal to scrape Instagram comments?

Web scraping of publicly available data is generally legal according to the [US Ninth Circuit Court ruling](https://www.eff.org/deeplinks/2022/04/scraping-public-websites-still-isnt-crime-appeals-court-confirms) (hiQ Labs v. LinkedIn, 2022). This scraper only accesses **public posts** — it does not bypass login walls, access private accounts, or use authentication tokens.

Always use scraped data responsibly:

- Respect Instagram's Terms of Service
- Do not use data for harassment, spam, or unauthorized profiling
- Comply with GDPR and other applicable data protection regulations
- Consider the privacy implications of processing personal data at scale

### FAQ

**How fast is Instagram Comments Scraper?**
The scraper typically processes each post in about 5-10 seconds. A batch of 10 posts completes in about 2 minutes including rate-limiting delays.

**How many comments does it return per post?**
The scraper returns up to `maxCommentsPerPost` comments. It reads the initial public comments and paginates through the logged-out comment connection when Instagram exposes a cursor. With `maxCommentsPerPost: 0`, it continues until that public connection is exhausted. Instagram can still hide moderated, deleted, gated, or reply-only comments from logged-out visitors, so the result may be lower than the count displayed on the post.

**How many comments can I scrape for free?**
With the free plan ($5 in credits), you can scrape comments from approximately 150+ posts at no cost.

**Does this work without an Instagram account?**
Yes! Instagram Comments Scraper works entirely without login. It extracts comments from public posts using Instagram's web interface -- no session cookie or API key needed.

**Why do I get fewer comments than the post shows?**
The displayed post count can include replies and comments that are deleted, moderated, covered, or unavailable to logged-out visitors. The Actor follows the public pagination cursor when Instagram provides one, but it does not use an authenticated Instagram account. If Instagram withholds the cursor or comments are disabled, only the comments available on the public page can be returned.

**Why do some fields show null values?**
Some fields like `fullName` or `profilePicUrl` may be null if the commenter has a minimal profile. The `parentCommentId` is null for top-level comments and only populated for replies when `includeReplies` is enabled.

**How is this different from the official Instagram API?**
The official Instagram Graph API requires a Facebook Business account, app review, and only allows access to your own posts' comments. This scraper works on any public post without any API credentials or account setup.

### Related social media scrapers

Explore more social media data extraction tools from automation-lab:

- 📸 [Instagram Scraper](https://apify.com/automation-lab/instagram-scraper) — Extract profiles, posts, reels, hashtags, and mentions
- 🎵 [TikTok Scraper](https://apify.com/automation-lab/tiktok-scraper) — Scrape TikTok videos, profiles, and hashtags
- 🎵 [TikTok Sound Scraper](https://apify.com/automation-lab/tiktok-sound-scraper) — Extract videos using specific TikTok sounds
- 🐦 [Twitter/X Scraper](https://apify.com/automation-lab/twitter-scraper) — Collect tweets, profiles, and search results
- ▶️ [YouTube Scraper](https://apify.com/automation-lab/youtube-scraper) — Extract video data, channels, and search results

# Actor input Schema

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

Add Instagram post or reel URLs. Accepts formats like https://www.instagram.com/p/CODE/ or https://www.instagram.com/reel/CODE/

## `maxCommentsPerPost` (type: `integer`):

Maximum number of comments to extract from each post. Set to 0 to collect every comment Instagram makes available to logged-out visitors. The Actor paginates beyond the initial ~15 comments when Instagram exposes a public cursor.

## `includeReplies` (type: `boolean`):

Extract replies (child comments) in addition to top-level comments. Each reply counts as a separate comment.

## `sortBy` (type: `string`):

Order the comments collected for each post. 'Popular' sorts by likes (then recency); 'Newest' sorts by timestamp. Sorting applies to the comments Instagram exposes publicly within your requested limit.

## `proxyCountry` (type: `string`):

Country code for the proxy (e.g., US, GB, DE). Instagram may return different results based on location.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.instagram.com/p/DVOyCluEVBg/"
  ],
  "maxCommentsPerPost": 5,
  "includeReplies": false,
  "sortBy": "popular",
  "proxyCountry": "US"
}
```

# Actor output Schema

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

Dataset containing the collected comments and engagement metadata.

# 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/DVOyCluEVBg/"
    ],
    "maxCommentsPerPost": 5,
    "includeReplies": false,
    "sortBy": "popular",
    "proxyCountry": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/instagram-comments-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 = {
    "postUrls": ["https://www.instagram.com/p/DVOyCluEVBg/"],
    "maxCommentsPerPost": 5,
    "includeReplies": False,
    "sortBy": "popular",
    "proxyCountry": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/instagram-comments-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 '{
  "postUrls": [
    "https://www.instagram.com/p/DVOyCluEVBg/"
  ],
  "maxCommentsPerPost": 5,
  "includeReplies": false,
  "sortBy": "popular",
  "proxyCountry": "US"
}' |
apify call automation-lab/instagram-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/instagram-comments-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/0uAqxoScwr5CvsDiS/builds/CbNm509BirOauBIzo/openapi.json
