# Instagram Comments & Replies | $0.4/1K + Page Fees on Starter (`publicsignallabs/instagram-comments-replies`) Actor

Scrape public Instagram comments and optional nested replies from posts and Reels. Preserve thread relationships, public author details, timestamps, likes, and source media with bounded pagination. No login or proxy setup.

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

## Pricing

from $0.40 / 1,000 comment or reply results

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?

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 & Replies

Scrape public Instagram comments and optional nested replies from known posts and Reels. Preserve thread relationships, public author details, timestamps, likes, child counts, and source media for audience research, moderation workflows, and engagement analysis. Bound every run by media item, comment, reply, and page limits. No Instagram login, cookies, browser, or proxy setup.

### What this Actor does

- Accepts Instagram post/Reel URLs, shortcodes, and numeric media IDs
- Fetches cursor-paginated top-level comments
- Optionally traverses reply pages only for comments that report children
- Deduplicates comment and reply IDs
- Preserves parent/child relationships and per-source rank
- Uses the same media identifiers and normalized contracts as the portfolio's media Actors

### Input

```json
{
  "media": ["https://www.instagram.com/p/CxOWiQNP2MO/"],
  "resultsLimit": 100,
  "includeReplies": true,
  "repliesLimit": 100,
  "maxPages": 10
}
```

Paying runs accept up to 50 unique media items, 1,000 top-level comments and 1,000 replies per item, and 100 top-level pages per item. The combined worst-case bound is 500 comment/reply page requests per run; reduce sources or limits when a cross-product exceeds it. Reply pagination stops on the reply limit, repeated cursors, or a page with no new rows.

### Output

Top-level comments and replies share one stable dataset schema:

| Field group | Fields | Description |
|---|---|---|
| Source and rank | `source_input`, `source_shortcode`, `source_url`, `input_index`, `rank` | Requested media, resolved post/Reel identity, deterministic input position, and per-source result rank. |
| Thread identity | `record_type`, `id`, `media_id`, `parent_comment_id` | Distinguishes comments from replies and preserves parent/child relationships. |
| Comment | `text`, `created_at`, `like_count`, `child_comment_count` | Public comment text, timestamp, engagement, and reported reply count. |
| Author | `author_id`, `author_username`, `author_full_name`, `author_is_verified`, `author_profile_pic_url` | Public author identity, account flag, and profile image. |

`OUTPUT` contains sanitized per-media status, delivered totals, and exact charge reconciliation. `AUDIT` contains aggregate request, response, charge, storage, and FREE admission metrics without media inputs, cursors, comment text, or credentials.

### Pricing

- completed valid top-level or reply page request, including an unavailable/empty response: exactly **$0.0015**
- saved top-level comment or reply: exactly **$0.0004** ($0.40 per 1,000)

A thread can require one or many comment and reply page requests, including completed empty or unavailable responses, while each page can yield a different number of saved rows. Separate page and result events keep charges aligned with the work performed; a single result event would not account for empty, low-yield, or deeply paginated threads.

The title's **$0.4/1K** is the exact saved-result event, not the all-in total; page fees always apply. Exact examples:

| Work completed | Exact charge |
|---|---:|
| 1 page + 1 result | $0.0019 |
| 1 page + 20 results | $0.0095 |
| 82 pages + 1,005 results | $0.5250 |

Every total is computed as `pages × $0.0015 + results × $0.0004`. Top-level and reply pages use the same page event; comments and replies use the same result event. The Actor refuses remote execution if configured prices differ from these displayed rates.

### FREE demo

Five runs per account per UTC month. Each FREE run accepts exactly one media item, fetches one top-level page, saves up to 20 comments, and disables reply retrieval. The shared quota is enforced before upstream work and fails closed if identity or quota storage is unavailable.

### Limits and responsible use

- Public comments only; unavailable or disabled comment surfaces can return no rows
- A completed page request with a valid empty or unavailable response is billable
- Deleted comments and replies may disappear between pages or runs
- Cursor and count signals can change while a thread is active
- No continuation token is exposed in this version

Use responsibly and comply with applicable laws, platform terms, and privacy obligations. Comment text and usernames are public personal data; collect only what you need. This Actor is not affiliated with or endorsed by Instagram or Meta.

# Actor input Schema

## `media` (type: `array`):

Post/Reel URLs, shortcodes, or numeric media IDs. Paying runs accept up to 50 unique values.

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

Maximum saved top-level comments per media item. FREE runs save up to 20.

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

Fetch replies for comments that report child comments. Disabled for FREE runs.

## `repliesLimit` (type: `integer`):

Maximum saved replies across the selected top-level comments.

## `maxPages` (type: `integer`):

Hard bound for top-level pagination. Reply pages are separately bounded by reply progress and repliesLimit.

## Actor input object example

```json
{
  "media": [
    "https://www.instagram.com/p/CxOWiQNP2MO/"
  ],
  "resultsLimit": 100,
  "includeReplies": false,
  "repliesLimit": 100,
  "maxPages": 10
}
```

# Actor output Schema

## `comments` (type: `string`):

Normalized public Instagram comments and replies from the default dataset.

## `summary` (type: `string`):

Run status, delivered totals, pricing, and sanitized per-media outcomes.

## `audit` (type: `string`):

Aggregate request, usage, storage, charge, and FREE admission metrics without input values or credentials.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("publicsignallabs/instagram-comments-replies").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("publicsignallabs/instagram-comments-replies").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 '{}' |
apify call publicsignallabs/instagram-comments-replies --silent --output-dataset

```

## MCP server setup

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

```

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/U8TGeRBLSXWWj9Kt0/builds/AvenZwdN3Z59rGqj3/openapi.json
