# Instagram Post Comments Scraper – Data Export (`scrapingmonkey/instagram-post-comments`) Actor

Scrape public Instagram post and Reel comments with pagination. Export one row per comment with text, author, likes, reply counts, timestamps, and post context.

- **URL**: https://apify.com/scrapingmonkey/instagram-post-comments.md
- **Developed by:** [ScrapingMonkey](https://apify.com/scrapingmonkey) (community)
- **Categories:**
- **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. 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

Scrape public comments from Instagram posts and Reels with page-based pagination. **Instagram Comments Scraper** saves one dataset row per unique comment and includes comment text, author, likes, reply count, timestamps, and complete available context for the original post.

Add full Instagram media URLs, choose comment pages, and start. No Instagram login or cookies are required. Invalid links, unavailable posts, and exhausted pagination failures remain visible as `failed` dataset rows.

| At a glance | Details |
|---|---|
| 📥 Input | Full Instagram post or Reel URLs plus pages per post |
| 📤 Output | One row per comment with author and nested parent-post details |
| 📄 Pagination | Public embedded page 1; up to 15 comments per additional page |
| 🔐 Login required | No |
| ⚡ Processing | Up to 5 requests concurrently with automatic retries |
| 💾 Delivery | Apify dataset for JSON, CSV, Excel, XML, APIs, and integrations |

### What the Instagram comments scraper extracts 💬

The Actor is designed for public discussion research around selected posts and Reels. It first resolves the public media, reads the comments exposed on the initial page, and follows the comment cursor for the requested number of pages.

Each success row can include:

- Comment ID, PK, text, GIF URL, Unix timestamp, and ISO publication time
- Comment like count and the number of replies reported by Instagram
- Parent comment ID and reply flag when returned
- Translation, coverage, and restriction fields
- Comment author's ID, PK, username, profile URL, picture, verification, and unpublished state
- Parent post IDs, URL, caption, timestamps, engagement, image or video media, dimensions, and state flags
- Parent post author, location, audio, image variants, video variants, carousel children, tags, coauthors, and sponsors

`replies_count` reports child comments known to Instagram. This Actor does not open and paginate every reply thread separately, so it should not be described as a complete comment-replies scraper.

### How to scrape Instagram post comments 🚀

1. Copy full public Instagram post or Reel URLs.
2. Add them to `inputList`.
3. Set `pagesPerPost` to the total comment pages to attempt.
4. Start the Actor.
5. Open the Comments dataset view and export or integrate the rows.

```json
{
  "inputList": [
    "https://www.instagram.com/p/EXAMPLE_POST/",
    "https://www.instagram.com/reel/EXAMPLE_REEL/"
  ],
  "pagesPerPost": 3
}
```

Bare shortcodes and profile URLs are not accepted. Duplicate post shortcodes and duplicate comment IDs are removed within the run.

### Comment and parent-post output 📦

| Field group | Included data |
|---|---|
| Comment identity | `id`, `pk`, `type`, `post_url`, `post_code` |
| Content and time | `text`, `gif_url`, `timestamp`, `published_at` |
| Engagement and replies | `like_count`, `replies_count`, `parent_comment_id`, `is_reply` |
| Comment state | `is_covered`, `has_translation`, `restricted_status` |
| Comment author | Public IDs, username, URL, picture, verification, unpublished flag |
| Parent post | Identity, caption, engagement, media, author, location, audio, carousels, tags, collaborators |

Complete representative success item:

```json
{
  "input": "https://www.instagram.com/reel/EXAMPLE_REEL/",
  "status": "success",
  "type": "comment",
  "post_url": "https://www.instagram.com/reel/EXAMPLE_REEL/",
  "post_code": "EXAMPLE_REEL",
  "id": "18000000000000000",
  "pk": "18000000000000000",
  "text": "Great campaign!",
  "timestamp": 1787229000,
  "published_at": "2026-08-20T12:30:00Z",
  "like_count": 14,
  "replies_count": 2,
  "parent_comment_id": null,
  "is_reply": false,
  "is_covered": false,
  "has_translation": false,
  "restricted_status": null,
  "gif_url": null,
  "author": {
    "id": "2002",
    "pk": "2002",
    "username": "public_user",
    "profile_url": "https://www.instagram.com/public_user/",
    "profile_picture_url": "https://instagram.example/comment-author.jpg",
    "is_verified": false,
    "is_unpublished": false
  },
  "post": {
    "id": "1234567890123456789_13460080",
    "pk": "1234567890123456789",
    "code": "EXAMPLE_REEL",
    "url": "https://www.instagram.com/reel/EXAMPLE_REEL/",
    "type": "reel",
    "product_type": "clips",
    "media_type": 2,
    "caption": "Public Reel caption",
    "caption_id": "987654321",
    "caption_timestamp": 1787200000,
    "caption_published_at": "2026-08-20T04:26:40Z",
    "caption_is_edited": false,
    "timestamp": 1787200000,
    "published_at": "2026-08-20T04:26:40Z",
    "like_count": 12000,
    "comment_count": 420,
    "view_count": 180000,
    "play_count": 192000,
    "instagram_play_count": 190000,
    "facebook_play_count": 0,
    "facebook_like_count": 0,
    "facebook_comment_count": 0,
    "repost_count": 65,
    "image_url": "https://instagram.example/post-image.jpg",
    "thumbnail_url": "https://instagram.example/post-thumbnail.jpg",
    "video_url": "https://instagram.example/post-video.mp4",
    "video_duration": 15.2,
    "width": 1080,
    "height": 1920,
    "accessibility_caption": null,
    "has_audio": true,
    "comments_disabled": false,
    "counts_hidden": false,
    "is_paid_partnership": false,
    "can_reshare": true,
    "is_pinned": false,
    "author": {
      "id": "13460080",
      "pk": "13460080",
      "username": "nike",
      "name": "Nike",
      "profile_url": "https://www.instagram.com/nike/",
      "profile_picture_url": "https://instagram.example/nike.jpg",
      "profile_picture_url_hd": "https://instagram.example/nike-hd.jpg",
      "is_verified": true,
      "is_private": false
    },
    "location": null,
    "audio": {
      "id": "5005",
      "type": "music",
      "title": "Example Track",
      "artist": "Example Artist",
      "url": "https://instagram.example/audio.m4a",
      "duration_ms": 15200,
      "is_original_audio": false
    },
    "tagged_users": [],
    "coauthors": [],
    "sponsors": [],
    "image_versions": [
      {
        "url": "https://instagram.example/post-image-1080.jpg",
        "width": 1080,
        "height": 1920
      }
    ],
    "video_versions": [
      {
        "url": "https://instagram.example/post-video-1080.mp4",
        "width": 1080,
        "height": 1920,
        "type": 101
      }
    ],
    "carousel_media_count": 0,
    "carousel_media": []
  }
}
```

Complete failed dataset item:

```json
{
  "input": "https://www.instagram.com/p/DELETED_OR_INVALID/",
  "status": "failed",
  "type": null,
  "post_url": null,
  "post_code": null,
  "id": null,
  "pk": null,
  "text": null,
  "timestamp": null,
  "published_at": null,
  "like_count": null,
  "replies_count": null,
  "parent_comment_id": null,
  "is_reply": null,
  "is_covered": null,
  "has_translation": null,
  "restricted_status": null,
  "gif_url": null,
  "author": null,
  "post": null
}
```

Nested media and audio URLs come from Instagram's CDN and can expire. Download authorized assets promptly when permanent retention is required.

### Input and comment pagination ⚙️

| Parameter | Type | Required | Default | Rules |
|---|---|---|---|---|
| `inputList` | array of strings | Yes | None | Full Instagram `/p/`, `/reel/`, or `/tv/` media URLs |
| `pagesPerPost` | integer | No | `1` | Total comment pages to attempt; minimum `1` |

Page 1 contains however many comments Instagram exposes in the public post page. Each additional page requests up to 15 comments when a next cursor exists. Pagination stops early when Instagram reports no next page or no new cursor.

Pages are saved incrementally. If a later page exhausts its retries, earlier comment rows remain available and the failed page can add one visible `failed` row.

### Instagram comment data use cases 🎯

#### Sentiment and feedback analysis

Classify public reactions to products, campaigns, creators, releases, or events while retaining parent-post context.

#### Community research

Compare recurring questions, topics, language, engagement, and visible reply counts across posts.

#### Campaign monitoring

Connect comments with the post's caption, media type, author, audio, collaborators, sponsors, and visible performance.

#### Moderation support

Export public comments to an authorized human-review or policy-research workflow.

#### AI and retrieval datasets

Create structured comment-and-post pairs for lawful classification, summarization, search, or retrieval applications.

### Pricing and billable comment rows 💰

The Actor's **Pricing** tab shows the current charging model and rate. It is the authoritative source because Store pricing can change.

Under dataset-item pricing:

- Each unique comment saved as `success` is one billable result.
- An invalid URL, inaccessible post, post with no returned comments, or pagination page that exhausts retries can save one billable `failed` result.
- Duplicate comments returned on another page do not create additional rows.
- Retry attempts do not create rows by themselves.
- An empty later page after earlier comments can finish normally without adding a failed row.

A post with 100 saved comments therefore creates 100 result rows, plus any explicitly saved failed page rows.

### Instagram comments API 🔌

Replace `$ACTOR_ID` with the Actor ID from the API tab and `$APIFY_TOKEN` with your token.

```bash
curl -X POST "https://api.apify.com/v2/acts/$ACTOR_ID/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"inputList":["https://www.instagram.com/reel/EXAMPLE_REEL/"],"pagesPerPost":2}'
```

For large comment jobs, start the Actor asynchronously and retrieve the default dataset after completion. Use schedules, webhooks, Apify client libraries, Google Sheets, Make, Zapier, n8n, cloud storage, or custom data pipelines.

### Reliability, retries, and comment limits ⚠️

The Actor handles up to five requests concurrently. Temporary timeouts, transport failures, throttling, selected HTTP errors, and login redirects are retried automatically. Invalid URL syntax is classified without wasting network attempts.

One bad post does not intentionally stop other inputs. A whole Actor run can still fail because of startup problems, unavailable Apify dataset storage, or an unrecoverable error while saving results.

Instagram controls logged-out comment availability, order, and pagination. Private, deleted, restricted, age-gated, region-limited, or login-walled posts may fail. The public response may omit comments, authors, counts, or parent-post fields.

This Actor does not separately paginate every reply thread. `replies_count` can be larger than the number of reply rows present in the dataset.

### Frequently asked questions ❓

#### How many comments are returned per page?

The first page contains the comments embedded in public post data. Each additional request asks for up to 15 comments, but Instagram can return fewer.

#### Are comment replies included?

Reply identifiers and flags are preserved when replies appear in the returned data. The Actor does not issue separate pagination requests for every reply thread.

#### Can I submit a bare shortcode?

No. Submit the full Instagram post, Reel, or legacy TV URL.

#### Why does every comment contain a `post` object?

Keeping parent-post context on each row makes CSV exports, database ingestion, analytics, and AI pipelines usable without a separate join.

#### What happens when a post has zero public comments?

If processing ends with no saved comments, the Actor records one failed result for that input.

#### Does it require Instagram credentials?

No login, password, cookies, or session input is required.

### Support, responsible use, and related actors 🛟

For a reproducible issue, share the run ID, approximate time, requested page count, and a safe public post URL through the support channel. Never disclose tokens or proxy credentials.

Public comments can contain personal information. Use the Actor lawfully and proportionately, minimize stored data, and follow applicable privacy, data-protection, copyright, anti-spam, contractual, and platform requirements.

# Actor input Schema

## `inputList` (type: `array`):

Add one full Instagram post or Reel link per item, such as https://www.instagram.com/p/SHORTCODE/ or https://www.instagram.com/reel/SHORTCODE/. Only complete Instagram links are accepted; shortcodes are not supported.

## `pagesPerPost` (type: `integer`):

Comments embedded in the public post page count as page 1. Every additional page asks Instagram for up to 15 comments. Choose how many pages to collect from each post. Collection stops automatically when no more comments are available.

## Actor input object example

```json
{
  "inputList": [
    "https://www.instagram.com/reel/DctPchKOVcw/"
  ],
  "pagesPerPost": 1
}
```

# Actor output Schema

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

One Dataset row for every unique comment returned from an Instagram post or Reel. Failed input or page rows keep the original input and use failed status.

# 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 = {
    "inputList": [
        "https://www.instagram.com/reel/DctPchKOVcw/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingmonkey/instagram-post-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 = { "inputList": ["https://www.instagram.com/reel/DctPchKOVcw/"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapingmonkey/instagram-post-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 '{
  "inputList": [
    "https://www.instagram.com/reel/DctPchKOVcw/"
  ]
}' |
apify call scrapingmonkey/instagram-post-comments --silent --output-dataset

```

## MCP server setup

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