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

Scrape comments from public Instagram posts and reels: comment text, author username and ID, verified badge, profile picture, like count, GIF link and date. Newest first, many post URLs per run, no login. Export to JSON, CSV or Excel for sentiment analysis and audience research.

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

## Pricing

from $0.50 / 1,000 comments

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

Scrape **comments from any public Instagram post or reel**. The **Instagram Comments Scraper** collects each comment's text, author (username, ID, verified badge, avatar), like count, GIF link and exact date, newest first. Paste many post links in one run; no Instagram account is needed. Use it for sentiment analysis, giveaway draws, audience and competitor research, community moderation or training data.

### ✨ Features

- 💬 **Comment Data**: Text, likes, exact date (ISO and Unix) and a GIF link for GIF comments.
- 👤 **Author Details**: Username, user ID, verified badge and profile picture.
- 🕒 **Newest First**: Comments come in the order Instagram shows them to visitors, newest first.
- 📦 **Bulk Posts**: Many posts and reels per run, each with its own comment limit.

### 🛠️ How It Works

1. **Paste post or reel URLs** – `instagram.com/p/…`, `/reel/…` or bare shortcodes, one per line.
2. **Set how many comments per post** – the default is 50.
3. **Run the Scraper** – download the comments as JSON, CSV or Excel or pull them through the API.

### ⚙️ Input

| Field                       | What it does                                                   |
| --------------------------- | -------------------------------------------------------------- |
| **Post or reel URLs**       | Instagram post or reel links (or shortcodes), one per line.    |
| **Max comments per post**   | Stop after this many comments for each post. Default 50.       |

```json
{
    "posts": ["https://www.instagram.com/p/DeTUk4sDSp-/"],
    "maxItems": 500
}
```

### 💰 Pricing

Pay only for the comments you get. No monthly rental.

| Event           | Price                                    | What you get                                |
| --------------- | ---------------------------------------- | ------------------------------------------- |
| **Comment**     | $0.0005 per comment ($0.50 per 1,000)    | One comment with all fields below           |
| **Actor start** | $0.00005 per run                         | Charged once when the run starts.           |

Examples: 1,000 comments = $0.50 · 10,000 comments = $5.00. Posts that are private, removed or have no comments are listed in the run's status message and not charged.

### 📊 Sample Output Data

```json
{
    "id": "18152576047556748",
    "postShortcode": "Dehl7Xohfah",
    "postUrl": "https://www.instagram.com/p/Dehl7Xohfah/",
    "text": "🔥🔥🔥",
    "gifUrl": null,
    "ownerUsername": "big_fortynine",
    "ownerId": "2127685920",
    "ownerIsVerified": false,
    "ownerProfilePicUrl": "https://scontent-lga3-1.cdninstagram.com/v/t51.82787-19/754142594_18568165339069921_5216430746404818058_n.jpg?…",
    "likesCount": 0,
    "timestamp": "2026-10-19T06:50:05.000Z",
    "createdAt": 1792392605,
    "scrapedAt": "2026-10-19T11:39:09.378Z"
}
```

### ❓ FAQ

**Do I need an Instagram account or cookies?** No. Only public posts are available.

**Are replies included?** No, this Actor saves the top-level comments of each post.

**Can I get every comment of a post?** You get the comments Instagram shows to visitors who are not logged in, newest first. Raise "Max comments per post" to go deeper.

**What about private or deleted posts?** They are named in the run's status message and not charged.

### 🔗 More Instagram Actors

- [Instagram Post Scraper](https://apify.com/piotrv1001/instagram-post-scraper): full details of any post or reel by URL.
- [Instagram Profile Posts Scraper](https://apify.com/piotrv1001/instagram-profile-posts-scraper): the latest posts and reels of any public profile.

# Actor input Schema

## `posts` (type: `array`):

Instagram post or reel links (instagram.com/p/…, /reel/…) or shortcodes, one per line.

## `maxItems` (type: `integer`):

Stop after this many comments for each post.

## Actor input object example

```json
{
  "posts": [
    "https://www.instagram.com/p/DeTUk4sDSp-/"
  ],
  "maxItems": 50
}
```

# Actor output Schema

## `results` (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 = {
    "posts": [
        "https://www.instagram.com/p/DeTUk4sDSp-/"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/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 = {
    "posts": ["https://www.instagram.com/p/DeTUk4sDSp-/"],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("piotrv1001/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 '{
  "posts": [
    "https://www.instagram.com/p/DeTUk4sDSp-/"
  ],
  "maxItems": 50
}' |
apify call piotrv1001/instagram-comments-scraper --silent --output-dataset

```

## MCP server setup

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