# Instagram Comment Scraper: $0.40 per 1,000 Comments (`rowfinch/instagram-comment-scraper`) Actor

Scrape comments from Instagram posts and reels: text, author, likes, date and reply count, with replies optional. Same input and output fields as Apify's Instagram Comments Scraper. $0.40 per 1,000 comments.

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

## Pricing

from $0.40 / 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 Comment Scraper

Get the comments of any public Instagram post or reel: text, author, likes, date and reply count, with every reply when you want them.

**$0.40 per 1,000 comments.**

### What it's for

- **Audience and sentiment research**: what people say under your posts, a competitor's or a creator's.
- **Giveaways**: everyone who commented, with their username and profile link.
- **Campaign reports**: questions, complaints and mentions under sponsored posts.
- **Data for AI agents and dashboards**: clean JSON, CSV or Excel, or straight from the API.

### Input

| Field | What it does |
|---|---|
| `directUrls` | Post or reel URLs, one per line |
| `resultsLimit` | Comments per post (default 50) |
| `includeNestedComments` | Adds every reply to those comments |

Coming from Apify's Instagram Comments Scraper? These are its input field names, and the output keeps its fields too (`postUrl`, `commentUrl`, `text`, `ownerUsername`, `likesCount`, `repliesCount`, `owner`…).

### Output

One row per comment, and per reply when they're on:

```json
{
  "postUrl": "https://www.instagram.com/p/DWm0UOZgVVf/",
  "commentUrl": "https://www.instagram.com/p/DWm0UOZgVVf/c/18121456654545228/",
  "id": "18121456654545228",
  "text": "we are moon bound 🥹",
  "ownerUsername": "youtube",
  "ownerProfilePicUrl": "https://scontent-lax7-1.cdninstagram.com/v/...",
  "timestamp": "2026-04-01T22:59:03.000Z",
  "likesCount": 43921,
  "repliesCount": 134,
  "parentCommentId": null,
  "parentCommentUrl": null,
  "owner": {
    "id": "1337343",
    "username": "youtube",
    "full_name": "YouTube",
    "is_verified": true,
    "is_private": false,
    "profile_pic_url": "https://scontent-lax7-1.cdninstagram.com/v/..."
  }
}
```

Replies carry `parentCommentId` and `parentCommentUrl`, and come right after the comment they answer.

URLs that can't be read get a row with the reason, free of charge:

```json
{ "input": "https://www.instagram.com/p/some_private_post/", "error": "Private post" }
```

### Price

- **$0.40 per 1,000 comments**, replies included
- **$0.002 per post or reel** that returns comments
- **$0.002 per comment with replies**, when replies are on
- Private, missing or invalid URLs: free

| Run | Cost |
|---|---|
| 100 posts, 50 comments each | $2.20 |
| 1 post, 5,000 comments | $2.00 |

A run stops at the maximum cost you set for it. On Apify's free plan, a run returns up to 100 comments.

### FAQ

**In what order do comments come?**
Instagram's own order, the most relevant first, as the app shows them.

**Can it get all the comments of a post?**
Raise *Comments per post* above the post's comment count. That count includes replies and comments Instagram hides as spam, so without replies the total comes out lower.

**Does it work with private accounts?**
No. Only public posts and reels.

**Is it legal?**
It reads only public comments. Usernames and comment text are personal data under GDPR and similar laws: use them for a legitimate purpose and honor deletion requests.

# Actor input Schema

## `directUrls` (type: `array`):

One per line.

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

In Instagram's order: the most relevant first.

## `includeNestedComments` (type: `boolean`):

Every reply to the comments above, on top of the limit. Adds $0.002 per comment with replies.

## Actor input object example

```json
{
  "directUrls": [
    "https://www.instagram.com/p/DepFSEJAl_l/"
  ],
  "resultsLimit": 20,
  "includeNestedComments": false
}
```

# Actor output Schema

## `comments` (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 = {
    "directUrls": [
        "https://www.instagram.com/p/DepFSEJAl_l/"
    ],
    "resultsLimit": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("rowfinch/instagram-comment-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 = {
    "directUrls": ["https://www.instagram.com/p/DepFSEJAl_l/"],
    "resultsLimit": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("rowfinch/instagram-comment-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 '{
  "directUrls": [
    "https://www.instagram.com/p/DepFSEJAl_l/"
  ],
  "resultsLimit": 20
}' |
apify call rowfinch/instagram-comment-scraper --silent --output-dataset

```

## MCP server setup

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