# Instagram Comments (`deepmine/instagram-comments`) Actor

Instagram comments from any public post or reel: paste the links, get one row per comment with its text, likes, date, link and position, plus the commenter's username, user ID, verified badge and picture. Newest or most liked first, with a date filter. No login or cookies.

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

## Pricing

from $0.39 / 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

Instagram comments from any public post or reel, as a table: paste the links, press Start, and every comment arrives as its own row with the text, likes, date, a link to the comment and the commenter's username, without logging in.

| 🏷️ Username | 💬 Comment | ❤️ Likes | 📅 Date | 🏅 Position | 🔤 Post |
|---|---|---|---|---|---|
| commenter_1 | This is normal. Sometimes you need to watch it fo… | 0 | 2025-02-24 | 18 | DDIJAfeyemG |
| commenter_2 | I miss being apart of a gc like this 😢 | 0 | 2025-01-28 | 27 | DDIJAfeyemG |
| commenter_3 | Ok detective you got this I see 🔥 | 0 | 2025-01-23 | 31 | DDIJAfeyemG |

<sub>Collected 2026-11-16 from the prefilled reel (Instagram's own account). Commenter names are hidden here.</sub>

**$0.49 per 1,000 comments** on the Starter plan ($0.49 Free, $0.45 Scale, $0.39 Business). The prefilled run (100 comments) costs about $0.049. No start fee. On Apify's Free plan a run stops at 50 comments, enough to try it; paid plans have no limit.

### Why people pull Instagram comments

- **Brand and campaign monitoring**: read what people say under your posts, a launch reel or a creator's sponsored post, and keep the history in a spreadsheet.
- **Sentiment and research**: hundreds or thousands of comments per post as clean text, ready for a sentiment model, a word cloud or a survey of reactions.
- **Giveaways and contests**: list the people who commented on a giveaway post, with their username and profile link, and draw a winner from the sheet.
- **Competitor and creator checks**: compare how audiences react to rival brands' posts, or check that a creator's comments look like real fans.
- **Top comments**: the most liked comments on a viral post, best first.

### Getting comments

1. Copy the link of a post or reel from Instagram (Share, then Copy link) and paste it into 🔗 **Instagram post or reel URLs**. Add as many links as you like, one per line.
2. Choose 💯 **Comments per post** (100 in the prefill). It caps each post's cost, since you pay per comment.
3. If you only want recent comments, set 📅 **Comments newer than** (`2026-09-01`, `7 days` or `3 months`). For the top comments, set 🔝 **Sort comments** to Most liked first.
4. Press Start. Rows appear while the run reads; export them as CSV, Excel or JSON when it ends, or schedule the run to collect new comments every day.

The same run from the API (Python, with the `apify-client` package):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("deepmine/instagram-comments").call(run_input={
    "directUrls": ["https://www.instagram.com/reel/DDIJAfeyemG/"],
    "resultsLimit": 100,
    "sortCommentsBy": "MOST_LIKED",
})
for comment in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(comment["likesCount"], comment["ownerUsername"], comment["text"])
```

Inputs written for apify/instagram-comment-scraper (`directUrls`, `resultsLimit`, `includeNestedComments`) and apidojo's (`startUrls`, `postIds`, `maxItems`) run here as they are.

### What each row holds

One row is one top-level comment. Fields, in row order: `postUrl`, `commentUrl`, `id`, `text`, `ownerUsername`, `ownerProfilePicUrl`, `timestamp`, `likesCount`, `owner`, `url`, `parentCommentUrl`, `repliesCount`, `replies`, `media`, `textSnippet`, `position`, `isRanked`, `postShortCode`, `postId`, `ownerId`, `ownerFullName`, `ownerIsVerified`, `ownerIsPrivate`, `ownerProfileUrl`, `isGif`, `inputUrl`, `scrapedAt`.

`position` is the comment's place in the post (1 = the newest), or its like rank when Sort comments is Most liked first (then `isRanked` is true). `media` holds the GIF of a GIF comment. `ownerFullName` and `ownerIsPrivate` are filled when 🪪 **Commenter details** is on: the run then reads each commenter's profile once, at no extra charge. The Console shows three tables: 💬 Comments, 👥 Commenters and 🪪 Commenter details. The run summary (OUTPUT) lists each link with its status and the number of comments delivered.

#### Example row

A real row from the prefilled reel on 2026-11-16 (the commenter's name, id and picture replaced):

```json
{
  "postUrl": "https://www.instagram.com/p/DDIJAfeyemG/",
  "commentUrl": "https://www.instagram.com/p/DDIJAfeyemG/c/17922813890917161/",
  "id": "17922813890917161",
  "text": "I miss being apart of a gc like this 😢",
  "ownerUsername": "commenter_2",
  "ownerProfilePicUrl": "https://scontent.cdninstagram.com/v/t51.2885-19/commenter.jpg",
  "timestamp": "2025-01-28T18:56:46.000Z",
  "likesCount": 0,
  "owner": {
    "id": "10000002",
    "username": "commenter_2",
    "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/DDIJAfeyemG/",
  "parentCommentUrl": null,
  "repliesCount": null,
  "replies": null,
  "media": null,
  "textSnippet": "I miss being apart of a gc like this 😢",
  "position": 27,
  "isRanked": false,
  "postShortCode": "DDIJAfeyemG",
  "postId": "3515099125383817606",
  "ownerId": "10000002",
  "ownerFullName": null,
  "ownerIsVerified": false,
  "ownerIsPrivate": null,
  "ownerProfileUrl": "https://www.instagram.com/commenter_2/",
  "isGif": false,
  "inputUrl": "https://www.instagram.com/reel/DDIJAfeyemG/",
  "scrapedAt": "2026-11-16T18:07:59Z"
}
```

### Limits worth knowing

- The run never logs in and sends no cookies, so it sees what a visitor in a private browser window sees on the post.
- Replies aren't included: Instagram shows them only to logged-in users, so `replies`, `repliesCount` and `parentCommentUrl` are null. `includeNestedComments` is still accepted, so older inputs keep working.
- The count Instagram prints on a post also counts replies and comments it hides from visitors, so a post can give fewer rows than that number.
- Profile picture links come from Instagram's CDN and expire after a few days: save the pictures soon if you need them.
- Several posts are read at the same time, so rows of different posts can alternate in the dataset. Each post's rows keep their order (`position`): sort by `postUrl`, then `position`, to read them post by post.
- You pay per comment delivered. Posts that are private, removed or not found cost nothing and are listed in OUTPUT, and each comment is charged once per run even if the same post is pasted twice.

### Feedback

Something missing, or a post that didn't come through? Open an issue on the Issues tab and it gets looked at. If these comments saved you time, a short review on the Store page helps others find the Actor.

# 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.

## `includeCommenterDetails` (type: `boolean`):

Also read each commenter's profile once for their full name, private flag and fbid_v2 (ownerFullName, ownerIsPrivate, owner). No extra charge; rows take a little longer.

## `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 Actor'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/reel/DDIJAfeyemG/"
  ],
  "resultsLimit": 100,
  "sortCommentsBy": "NEWEST_FIRST",
  "includeCommenterDetails": false,
  "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/reel/DDIJAfeyemG/"
    ],
    "resultsLimit": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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