# Instagram Comments Scraper: Posts & Reels (`deepmine/instagram-comments-scraper`) Actor

Instagram comments scraper: paste post or reel URLs and get one row per comment with its text, likes, date, comment link and position, plus the commenter's username, user ID, verified badge and profile picture. Newest first, past the first page, with an optional date cut-off. No login, no cookies.

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

## Pricing

from $0.79 / 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.
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?

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: Posts & Reels

Instagram comments scraper for any public post or reel: paste post or reel URLs and get one row per comment with its text, likes, date, comment link and position, plus the commenter's username, user ID, verified badge and profile picture. Comments come newest first or most liked first, page after page, and it never logs in.

| 🏷️ Username | 💬 Comment | ❤️ Likes | 📅 Date | 🏅 Position | 🔤 Post |
|---|---|---|---|---|---|
| commenter_1 | It’s so cool seeing what people are interested in… | 0 | 2026-10-12 | 2 | DeSn0tZgHNS |
| commenter_2 | I will name this after my son 😍❤️🔥 | 0 | 2026-10-12 | 6 | DeSn0tZgHNS |
| commenter_3 | Dung beetles are wildly underrated: some species n… | 0 | 2026-10-11 | 13 | DeSn0tZgHNS |

<sub>Collected 2026-10-12 from Instagram's answer to the comments query this Actor sends, for a natgeo reel. Commenter names are hidden here.</sub>

**$0.99 per 1,000 comments** on the Starter plan ($1.09 Free, $0.89 Scale, $0.79 Business). The prefilled run (100 comments) costs about $0.099 ($0.109 on Free). No start fee, no free-plan cap: the Free plan gets as many comments per post as paid plans.

### What it does

- **Every comment Instagram shows on a post or reel**: newest first, page after page (12-15 comments a page) up to your `resultsLimit` per post, or back to a date with `onlyCommentsNewerThan`.
- **Top comments**: set 🔝 **Sort comments** to Most liked first (`sortCommentsBy: "MOST_LIKED"`) to get each post's most liked comments, best first, with `isRanked: true`.
- **Posts, reels and carousels**: `/p/`, `/reel/` and `/tv/` links, any number per run, read 8 at a time.
- **One flat row per comment**: text (or the GIF of a GIF comment), likes, date, a direct comment link, its position in the post's comments, and the commenter's username, user ID, profile link, verified badge and picture.
- **Same input as apify/instagram-comment-scraper**: `directUrls`, `resultsLimit` and `includeNestedComments` are read as they are, so a saved input or API call runs here unchanged. apidojo's `startUrls`, `postIds` (post codes like `DeSn0tZgHNS`, or media ids) and `maxItems` work too. The rows carry its field names (`ownerUsername`, `likesCount`, `owner`, `commentUrl`, `media`...); replies aren't included (see Good to know), and owner keys Instagram doesn't show logged out are null.
- **Every comment once**: the same post listed twice (as `/p/` and `/reel/`) is read once, and each comment is charged once per run.

### How to use it

1. Paste post or reel URLs into 🔗 **Instagram post or reel URLs** (copy the link from Instagram's share menu).
2. Set 💯 **Comments per post** (50 in the prefill, 100 by default).
3. Optional: 📅 **Comments newer than** (`2026-09-01`, `7 days`, `3 months`) to read only recent comments, and 🔝 **Sort comments** = Most liked first for the top comments.
4. Press Start. Rows land as each page is read; download them as CSV, Excel or JSON, or call the Actor from the API.

Example input:

```json
{
  "directUrls": [
    "https://www.instagram.com/p/DN8-GjPkgjS/",
    "https://www.instagram.com/reel/DDIJAfeyemG/"
  ],
  "resultsLimit": 50,
  "onlyCommentsNewerThan": "30 days"
}
```

### Output

Each row is one comment. The Console shows two views: 💬 Comments (commenter, text, GIF, likes, date, position and links) and 👥 Commenters (profile link, user ID and verified badge, with what they wrote). Comments show as 50-character snippets there; the rows keep the full text. The run summary (OUTPUT) lists every URL with its status, comments delivered and pages read.

#### Output fields

- `postUrl`: The post's URL (https://www.instagram.com/p/<code>/; a reel opens there too).
- `commentUrl`: A link straight to the comment (https://www.instagram.com/p/<code>/c/<comment id>/).
- `id`: Instagram's id for the comment.
- `text`: The comment's text, emoji included (null for a comment that is only a GIF: its GIF is in `media`).
- `ownerUsername`: The commenter's username.
- `ownerProfilePicUrl`: The commenter's profile picture (an Instagram CDN link; it expires after a few days).
- `timestamp`: When the comment was written (UTC, ISO 8601).
- `likesCount`: Likes on the comment.
- `owner`: The commenter as apify/instagram-comment-scraper nests it: id, username, profile_pic_url, is_verified, plus full_name, is_private, is_mentionable, profile_pic_id, latest_reel_media and fbid_v2 (null unless Instagram shows them to visitors who aren't logged in).
- `url`: The post's URL (apify/instagram-comment-scraper's name for it).
- `parentCommentUrl`: Always null: every row is a top-level comment (Instagram shows replies to logged-in users only).
- `repliesCount`: Always null: Instagram sends no reply counts to visitors who aren't logged in.
- `replies`: Always null: Instagram shows replies to logged-in users only, and this Actor never logs in.
- `media`: A GIF comment's GIF (its image URL, as Instagram shows it on the post's page); null for text comments.
- `textSnippet`: The comment's first 50 characters (… when cut), for the table views.
- `position`: The comment's place among the post's comments: newest first (1 = the newest), or its like rank (1 = the most liked) with Sort comments = Most liked first.
- `isRanked`: true when the rows are in like order (Most liked first) and `position` is the like rank; false in Instagram's newest-first order.
- `postShortCode`: The post's code in its URL (instagram.com/p/<code>/).
- `postId`: Instagram's media id for the post.
- `ownerId`: The commenter's Instagram user id.
- `ownerIsVerified`: The commenter has the verified badge.
- `ownerProfileUrl`: The commenter's profile URL.
- `isGif`: The comment is a GIF from Instagram's GIF picker.
- `inputUrl`: The URL from your list this comment came from.
- `scrapedAt`: When the run read the comment (UTC).

#### Example row

A real row (2026-10-12, natgeo's reel DeSn0tZgHNS; the commenter's name, id and picture replaced):

```json
{
  "postUrl": "https://www.instagram.com/p/DeSn0tZgHNS/",
  "commentUrl": "https://www.instagram.com/p/DeSn0tZgHNS/c/18135213898659247/",
  "id": "18135213898659247",
  "text": "Dung beetles are wildly underrated: some species navigate by the Milky Way at night, the first animals known to do that. Glamorous work, honestly.",
  "ownerUsername": "commenter_3",
  "ownerProfilePicUrl": "https://scontent.cdninstagram.com/v/t51.2885-19/commenter.jpg",
  "timestamp": "2026-10-11T13:56:30.000Z",
  "likesCount": 0,
  "owner": {
    "id": "10000003",
    "username": "commenter_3",
    "profile_pic_url": "https://scontent.cdninstagram.com/v/t51.2885-19/commenter.jpg",
    "is_verified": false,
    "full_name": null,
    "is_private": null,
    "is_mentionable": null,
    "profile_pic_id": null,
    "latest_reel_media": null,
    "fbid_v2": null
  },
  "url": "https://www.instagram.com/p/DeSn0tZgHNS/",
  "parentCommentUrl": null,
  "repliesCount": null,
  "replies": null,
  "media": null,
  "textSnippet": "Dung beetles are wildly underrated: some species n…",
  "position": 13,
  "isRanked": false,
  "postShortCode": "DeSn0tZgHNS",
  "postId": "4004438164658746194",
  "ownerId": "10000003",
  "ownerIsVerified": false,
  "ownerProfileUrl": "https://www.instagram.com/commenter_3/",
  "isGif": false,
  "inputUrl": "https://www.instagram.com/reel/DeSn0tZgHNS/",
  "scrapedAt": "2026-10-12T18:04:49Z"
}
```

### Good to know

- The Actor never logs in and uses no cookies: it reads the comments Instagram shows any visitor on the post's page, the same set apify/instagram-comment-scraper reads. Open the post in a private browser window to see them.
- Replies aren't included. Instagram shows replies only to logged-in users and sends no reply counts to anyone else, so `repliesCount`, `replies` and `parentCommentUrl` stay null. `includeNestedComments` is accepted so existing inputs keep working.
- The comment count Instagram shows on a post includes replies and comments it hides from visitors, so a post's rows can be fewer than that count.
- **Most liked first** ranks the comments the run reads: Instagram shows visitors who aren't logged in no ranked order, so each post's newest `maxCommentsToRank` comments (2,000 by default, the whole list on most posts) are read and the `resultsLimit` most liked are delivered, best first. OUTPUT says which posts were read to the end. Reading more takes longer but costs nothing extra: you pay per comment delivered.
- GIF comments come with their GIF in `media` (and `isGif` true); their `text` is null.
- Profile picture URLs are Instagram's CDN links: they expire after a few days, so download what you need soon after the run.
- You pay per comment delivered, nothing for posts that are removed, private or not found (they're listed in OUTPUT). A spending limit stops the run cleanly at the comment it pays for.

### Feedback

Missing a field or a kind of input? Open an issue on the Actor's Issues tab and it gets looked at. If the Actor saved you time, a short review on its Store page helps other people find it.

# Actor input Schema

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

One per line: a post or reel URL (https://www.instagram.com/p/<code>/ or /reel/<code>/). You pay per comment delivered; posts that aren't found cost nothing.

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

Comments per post or reel: the newest, or the most liked with 🔝 Sort comments. You pay per comment, so this caps each post's cost.

## `onlyCommentsNewerThan` (type: `string`):

Optional. Only comments after this date (2026-01-31) or this long ago (7 days, 3 months), in UTC. Reading stops at the first older comment.

## `sortCommentsBy` (type: `string`):

Newest first is Instagram's own order. Most liked first reads each post's comments (up to Max comments to rank) and delivers the most liked ones, best first, with isRanked true.

## `maxResults` (type: `integer`):

Stop after this many comments in the whole run (empty: no limit). You pay per comment, so this caps the run's cost.

## `maxCommentsToRank` (type: `integer`):

With Most liked first: how many of each post's newest comments are read to find the most liked (2,000 is the whole list on most posts). More takes longer; you pay only for comments delivered.

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

apify/instagram-comment-scraper's replies option, read so its inputs run here unchanged. Instagram shows replies only to logged-in users and this Actor never logs in, so replies aren't included.

## `mode` (type: `string`):

comments = one row per comment (this listing's job).

## `proxyConfiguration` (type: `object`):

Leave as is: Apify Proxy (datacenter) reads everything this Actor needs.

## Actor input object example

```json
{
  "directUrls": [
    "https://www.instagram.com/p/DN8-GjPkgjS/",
    "https://www.instagram.com/reel/DDIJAfeyemG/"
  ],
  "resultsLimit": 50,
  "sortCommentsBy": "NEWEST_FIRST",
  "maxCommentsToRank": 2000,
  "includeNestedComments": false,
  "mode": "comments",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (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/DN8-GjPkgjS/",
        "https://www.instagram.com/reel/DDIJAfeyemG/"
    ],
    "resultsLimit": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/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 = {
    "directUrls": [
        "https://www.instagram.com/p/DN8-GjPkgjS/",
        "https://www.instagram.com/reel/DDIJAfeyemG/",
    ],
    "resultsLimit": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("deepmine/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 '{
  "directUrls": [
    "https://www.instagram.com/p/DN8-GjPkgjS/",
    "https://www.instagram.com/reel/DDIJAfeyemG/"
  ],
  "resultsLimit": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call deepmine/instagram-comments-scraper --silent --output-dataset

```

## MCP server setup

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