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

Instagram comments scraper: export the comments of public Instagram posts and reels with text, date, likes, commenter and post author. No login or cookies needed.

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

## Pricing

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

This **Instagram comments scraper** lets you **scrape the comments of public Instagram posts and reels** and export them to JSON, CSV or Excel. Paste a few post or reel links, press Start, and get **one row per comment**: the text, date, likes, the commenter's username and profile, and the post's author. **No Instagram account, no login and no cookies** are needed.

### What data can you extract from Instagram comments?

Each comment comes back as one row with 23 fields.

| Group | Fields |
|---|---|
| **Comment** | Comment ID, comment link, text, date (Unix seconds and ISO 8601 in UTC), number of likes, edited flag, hidden-as-offensive flag |
| **GIF comments** | GIPHY ID and GIF image link |
| **Commenter** | User ID, username, verified badge, profile picture, profile link |
| **Post** | Post link, author's user ID, username, display name and verified badge, the comment count Instagram shows on the post |
| **Run details** | The input the comment came from, and when the row was scraped |

### Use cases

- **Brand and social listening**: read what people say under your posts, a competitor's posts or a campaign, and spot complaints, questions and praise early.
- **Sentiment analysis and research**: export thousands of comments as a dataset for sentiment, topic or language analysis, or for academic studies of online conversation.
- **Influencer marketing**: check whether an influencer's comment section is real engagement, see who comments, and how many of them are verified accounts.
- **Giveaways and contests**: collect every comment on a giveaway post, with usernames and dates, to pick winners fairly.
- **Lead generation and community building**: find the people who engage with posts in your niche and see who keeps coming back.
- **Content strategy**: learn which posts start conversations and what your audience asks about.

### How to scrape Instagram comments

1. Open **Instagram Comments Scraper** in Apify Console and go to the Input tab.
2. In **Posts or reels**, paste one Instagram post or reel URL per line. A bare shortcode such as `DeTUk4sDSp-` works too.
3. Set **Max comments per post** to cap how many comments each post gives you, or leave it empty to get every comment.
4. Optionally set **Newer than** (for example `7d` or `2026-01-31`) to keep only recent comments, and **Max results** to cap the whole run.
5. Click **Start** and watch the comments appear in the Output tab.
6. Download the data as JSON, CSV, Excel, XML or HTML, or read it through the Apify API.

### Input

| Field | What it does |
|---|---|
| **Posts or reels** | One per line: a post or reel URL (`https://www.instagram.com/p/DeTUk4sDSp-/`, `https://www.instagram.com/reel/DeTUk4sDSp-/`) or its shortcode (`DeTUk4sDSp-`). Duplicates are scraped once. |
| **Max comments per post** | Stops each post after this many comments, newest first. Leave empty for every comment. |
| **Newer than** | Only comments written after a date in UTC (`2026-01-31` or `2026-01-31 18:00`) or within a duration back from now (`24h`, `7d`, `2w`). |
| **Max results** | Stops the whole run after this many comments. Leave empty for no limit. |

```json
{
    "urls": ["https://www.instagram.com/p/DeTUk4sDSp-/", "DehZj9wggt0"],
    "maxCommentsPerPost": 500,
    "newerThan": "7d"
}
```

### Output

Comments come newest first within each post. Here is a row from a real run, with the commenter's details replaced by placeholders:

```json
{
    "comment_id": "18118174273994291",
    "comment_url": "https://www.instagram.com/p/DehZj9wggt0/c/18118174273994291/",
    "post_url": "https://www.instagram.com/p/DehZj9wggt0/",
    "text": "beautiful place!!!",
    "timestamp": 1792102581,
    "timestamp_datetime": "2026-10-15T22:16:21+00:00",
    "likes_count": 1,
    "is_edited": false,
    "is_covered": false,
    "giphy_id": null,
    "giphy_url": null,
    "owner_id": "<commenter's user ID>",
    "owner_username": "<commenter's username>",
    "owner_is_verified": true,
    "owner_profile_pic_url": "<commenter's profile picture URL>",
    "owner_profile_url": "https://www.instagram.com/<commenter's username>/",
    "post_owner_id": "787132",
    "post_owner_username": "natgeo",
    "post_owner_full_name": "National Geographic",
    "post_owner_is_verified": true,
    "post_comments_count": 262,
    "source_url": "https://www.instagram.com/reel/DehZj9wggt0/",
    "scraping_time": "2026-10-16T11:43:39+00:00"
}
```

You can export the results to **JSON, CSV, Excel, XML and HTML** from the Output tab, or fetch them with the API. Profile picture links come from Instagram and expire after a while, so download the images soon if you need them.

### How much does it cost to scrape Instagram comments?

This Actor uses pay-per-event pricing: you pay only for the comments you get.

- **$1.00 per 1,000 comments** on the Apify Free plan.&#x20;
- Bronze, Silver and Gold Apify plans pay less: $0.90, $0.80 and $0.70 per 1,000 comments.&#x20;
- Proxies are included. There is no separate charge per post or per run.

Inputs that fail (see the FAQ) give no rows, so they cost nothing. Use **Max comments per post**, **Newer than** and **Max results** to keep a run within budget.

### Integrations and API

Everything you can do in Apify Console you can also do through the **Apify API**: start runs, pass input, and read the comments as JSON, CSV or Excel.

Python, with the `apify-client` package:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("kekliktech/instagram-comments-scraper").call(run_input={
    "urls": ["https://www.instagram.com/p/DeTUk4sDSp-/"],
    "maxCommentsPerPost": 100,
})
for comment in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(comment["owner_username"], comment["text"])
```

Node.js, with the `apify-client` package:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('kekliktech/instagram-comments-scraper').call({
    urls: ['https://www.instagram.com/p/DeTUk4sDSp-/'],
    maxCommentsPerPost: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

You can also:

- **Schedule** runs, for example every day with **Newer than** set to `24h`, to collect only the new comments on a post.
- Use **webhooks** to get notified, or start another process, when a run finishes.
- Send the data to **Google Sheets, Make, Zapier, Slack** and other apps with Apify integrations.
- Let **AI agents** run the scraper through the **Apify MCP server**, from Claude, ChatGPT, Cursor and other MCP clients.

### FAQ

#### Is it legal to scrape Instagram comments?

The scraper reads only what Instagram shows publicly to visitors who are not logged in. Comments are still **personal data** of the people who wrote them: their usernames, user IDs, profile pictures and words. If you are in the EU or handle data of people there, the GDPR applies, and other countries have similar laws. Make sure you have a lawful reason to collect and use the data, keep only what you need, and ask a lawyer if you are unsure.

#### Do I need an Instagram account?

No. You don't need an Instagram account, a login or cookies, and there is no proxy to set up.

#### Can I scrape replies to comments?

No. Instagram shows replies only to logged-in users, so you get **top-level comments only**. Instagram counts replies in the comment total it shows on the post, which is why you usually get fewer rows than `post_comments_count`. On one reel showing 6,790 comments, the scraper returned 5,225 top-level comments.

#### Can I sort comments by "most relevant"?

No. "Most relevant" ordering is available only when logged in. Comments always come **newest first**. That is why **Newer than** is a cheap way to collect only recent comments: each post stops at the first comment older than your cutoff.

#### How many comments can I get from one post?

Every top-level comment Instagram shows. In our tests the scraper went back to the very first comment of a reel with 6,790 comments in about 7 minutes. Instagram leaves out comments it has hidden or restricted, so those don't appear.

#### Why did some inputs fail?

Failed inputs give no rows. They are listed with a reason in the **`FAILED`** record of the run's key-value store (Storage tab), not in the dataset:

- `invalid_input`: not a post or reel URL or shortcode.
- `not_found`: the post doesn't exist, was removed, or belongs to a private account.
- `comments_disabled`: the author turned comments off.
- `no_comments`: the post has no comments yet.
- `blocked`: Instagram refused every attempt. Run it again later.

If no input returns a single comment, the run ends with the status Failed.

#### Can I scrape comments from private accounts?

No. Posts of private accounts are not public, so they are reported as `not_found`.

#### Can I get comments together with post data?

Yes. The Instagram Post Scraper and Instagram Reels Scraper can add a few of each post's newest comments to their own rows with their **Comments per post** setting. Use this Instagram comments scraper when you want many comments per post, or each comment as a row of its own.

### Related scrapers

- [Instagram Profile Scraper](https://apify.com/kekliktech/instagram-profile-scraper): get the profile details of the accounts that post or comment.
- [Instagram Post Scraper](https://apify.com/kekliktech/instagram-post-scraper): collect a profile's posts, then feed their links into this Actor for every comment.
- [Instagram Reels Scraper](https://apify.com/kekliktech/instagram-reels-scraper): collect reels with their view counts, then scrape the comments on them here.

### Support

Found a bug or missing a field? Open an issue in the **Issues** tab of this Actor and we'll look into it. Need a custom scraper for another website, or a different output format? Get in touch through the Issues tab and tell us what you need.

# Actor input Schema

## `urls` (type: `array`):

Instagram posts or reels to scrape comments from, one per line: a post or reel URL (https://www.instagram.com/p/DeTUk4sDSp-/, https://www.instagram.com/reel/DeTUk4sDSp-/) or its shortcode (DeTUk4sDSp-). Posts must be public.

## `maxCommentsPerPost` (type: `integer`):

Stop each post after this many comments, newest first. Leave empty to get every top-level comment Instagram shows.

## `newerThan` (type: `string`):

Only comments written after this point: a date in UTC (2026-01-31 or 2026-01-31 18:00) or a duration back from now (24h, 7d, 2w). Leave empty for comments of any age.

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

Stop the whole run after this many comments, across all posts. Leave empty for no limit.

## Actor input object example

```json
{
  "urls": [
    "https://www.instagram.com/p/DeTUk4sDSp-/"
  ],
  "maxCommentsPerPost": 100
}
```

# Actor output Schema

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

One row per comment: text, date, likes, commenter and post author.

# 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 = {
    "urls": [
        "https://www.instagram.com/p/DeTUk4sDSp-/"
    ],
    "maxCommentsPerPost": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("keklik/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 = {
    "urls": ["https://www.instagram.com/p/DeTUk4sDSp-/"],
    "maxCommentsPerPost": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("keklik/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 '{
  "urls": [
    "https://www.instagram.com/p/DeTUk4sDSp-/"
  ],
  "maxCommentsPerPost": 100
}' |
apify call keklik/instagram-comments-scraper --silent --output-dataset

```

## MCP server setup

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