# Instagram Comments Scraper (`calm_builder/instagram-comments-scraper`) Actor

Scrape comments from public Instagram posts and reels. Get comment text, author username and ID, profile picture, verified badge, likes, time and GIF comments, newest first. Hundreds of comments per post, date filter, no login.

- **URL**: https://apify.com/calm\_builder/instagram-comments-scraper.md
- **Developed by:** [Coder](https://apify.com/calm_builder) (community)
- **Stats:** 14 total users, 13 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

Collect comments from public Instagram posts and reels: comment text, author, profile picture, verified badge, likes, time and GIF comments, newest first, in a clean, structured format.

Paste post or reel links, choose how many comments you need from each, and export the results as JSON, CSV or Excel, or pull them through the Apify API. No Instagram account or login needed.

### What This Actor Does

- Collects comments from public Instagram posts and reels by link
- Returns **hundreds of comments per post**, not just the first handful
- Returns the newest comments first
- Includes GIF and sticker comments, with a direct link to the GIF
- Filters by date, so scheduled runs pick up only new comments
- Supports many posts in one run and never returns the same comment twice

### Best For

- Sentiment analysis and brand monitoring
- Measuring audience reaction to campaigns, launches and influencer posts
- Finding customer questions, complaints and leads in comment sections
- Running giveaways and contests
- Building datasets for dashboards, NLP or AI workflows

### Input

Add one or more post or reel links and set how many comments to collect from each.

#### Main input fields

- `directUrls`
  One link per row. Accepts post links (`https://www.instagram.com/p/SHORTCODE/`) and reel links (`https://www.instagram.com/reel/SHORTCODE/`).
- `resultsLimit`
  How many comments to collect from each post, newest first.
- `onlyCommentsNewerThan`
  Only collects comments written after a date (`2026-01-31`) or a relative period (`1 day`, `7 days`, `2 weeks`, `3 months`).

#### Example input

```json
{
  "directUrls": [
    "https://www.instagram.com/p/DdtbP_rv0p2/",
    "https://www.instagram.com/reel/DbA_2A4uL5K/"
  ],
  "resultsLimit": 200,
  "onlyCommentsNewerThan": "7 days"
}
```

### Output

Each dataset item is one comment.

#### Fields

| Field                                        | Description                                                   |
| -------------------------------------------- | ------------------------------------------------------------- |
| `id`, `commentUrl`                           | Comment identifier and direct link                            |
| `text`                                       | Comment text (empty for GIF-only comments)                    |
| `timestamp`                                  | When the comment was written (ISO 8601, UTC)                  |
| `likesCount`                                 | Likes on the comment                                          |
| `ownerUsername`, `ownerId`                   | Who wrote the comment                                         |
| `ownerProfilePicUrl`, `ownerIsVerified`      | Author's profile picture and verified badge                   |
| `owner`                                      | The same author details as one object                         |
| `gifUrl`, `media`                            | GIF or sticker attached to the comment                        |
| `postUrl`, `postId`                          | The post or reel the comment belongs to                       |

#### Example output

```json
{
  "postUrl": "https://www.instagram.com/p/DdtbP_rv0p2/",
  "commentUrl": "https://www.instagram.com/p/DdtbP_rv0p2/c/17903495850589245/",
  "postId": "3993968290975140470",
  "id": "17903495850589245",
  "text": "Incredible shot!",
  "ownerUsername": "example_user",
  "ownerId": "2091941066",
  "ownerProfilePicUrl": "https://scontent.cdninstagram.com/v/t51.2885-19/...",
  "ownerIsVerified": false,
  "timestamp": "2026-09-28T09:29:08.000Z",
  "likesCount": 4,
  "repliesCount": null,
  "replies": [],
  "owner": {
    "id": "2091941066",
    "username": "example_user",
    "is_verified": false,
    "profile_pic_url": "https://scontent.cdninstagram.com/v/t51.2885-19/..."
  },
  "hasTranslation": null,
  "gifUrl": null,
  "media": null
}
```

Profile picture and GIF links are provided by Instagram and expire after a while, so download any files you need soon after the run.

### How To Use

1. Paste one or more Instagram post or reel links into `directUrls`.
2. Set `resultsLimit` to how many comments you need from each post.
3. Optionally set `onlyCommentsNewerThan` to collect recent comments only.
4. Run the actor and open the dataset, or export it as JSON, CSV or Excel, or read it through the Apify API.

### Pricing

This actor uses pay-per-event pricing, so you only pay for results you receive:

- **Comment** — charged once for each comment saved to your dataset.
- **Actor start** — a small fixed fee of $0.001 per run.

Links that cannot be collected (private, deleted or unavailable) and posts without comments are not charged. Platform usage is included in these prices. Current prices for each Apify plan are shown on the actor's Pricing tab.

#### Free plan

On the Apify free plan, each run processes up to **5** links and up to **20** comments per post. Upgrade to a paid Apify plan to remove these limits.

### Best Practices

- Start with a small `resultsLimit` to check the output quickly.
- For monitoring, schedule the actor with `onlyCommentsNewerThan` set to your schedule's interval (for example `1 day`), so each run collects only new comments.
- Need the post links first? Use the Instagram Post Scraper to list a profile's posts, then pass their links here.

### FAQ

#### Are replies to comments included?

No. Instagram shows replies only to logged-in users, so this actor collects top-level comments. The comment count on the post (`commentsCount` in the Post Scraper) includes replies, so it is usually higher than the number of comments you can collect.

#### Why did a post return fewer comments than I asked for?

The post may have fewer public comments, your date filter may exclude older ones, or Instagram hides some comments (for example ones filtered as offensive or spam). The run log names each link that returned nothing.

#### Why is `text` empty on some comments?

Those are GIF or sticker comments. The GIF is in `gifUrl`.

#### Can I collect comments from a whole profile?

Paste the post links here, or use the Instagram Post Scraper with comments turned on to get the latest comments on every post of a profile.

#### How long does a run take?

Around 600 comments from two posts typically finish in under a minute.

### Responsible Use

Use this actor only for publicly available content, and make sure your use complies with applicable laws (including data protection rules such as GDPR) and Instagram's terms. Comments contain personal data, so collect only what you need.

### Troubleshooting

- Open each link in a logged-out browser window to confirm the post is public.
- Check the run log: it names any link that was skipped and why.
- Make sure the links point to posts or reels, not profiles or hashtags.
- Test with a small `resultsLimit` before large runs.

# Actor input Schema

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

Enter one link per row.

Supported formats:

- Post — `https://www.instagram.com/p/SHORTCODE/`
- Reel — `https://www.instagram.com/reel/SHORTCODE/`

Only public posts can be collected. Profile and hashtag links are skipped; use the Instagram Post Scraper to find posts first.

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

How many comments to collect from **each post**, newest first. If a post has fewer comments, all public ones are returned.

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

Optional. Collect only comments written after this point. Use a date (`YYYY-MM-DD`) or a relative period such as `1 day`, `7 days`, `2 weeks` or `3 months`.

Great for scheduled runs that should pick up only new comments. Leave empty to collect comments of any age.

## Actor input object example

```json
{
  "directUrls": [
    "https://www.instagram.com/p/DdtbP_rv0p2/",
    "https://www.instagram.com/reel/DbA_2A4uL5K/"
  ],
  "resultsLimit": 50,
  "onlyCommentsNewerThan": ""
}
```

# Actor output Schema

## `results` (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/DdtbP_rv0p2/",
        "https://www.instagram.com/reel/DbA_2A4uL5K/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("calm_builder/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/DdtbP_rv0p2/",
        "https://www.instagram.com/reel/DbA_2A4uL5K/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("calm_builder/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/DdtbP_rv0p2/",
    "https://www.instagram.com/reel/DbA_2A4uL5K/"
  ]
}' |
apify call calm_builder/instagram-comments-scraper --silent --output-dataset

```

## MCP server setup

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