# Instagram Comments Scraper | Posts & Reels | No Login (`hridayrungta/instagram-comments-scraper`) Actor

Extract Instagram comments from any public post or reel, or from a profile's recent posts: text, author, verified badge, likes, timestamps, plus post likes/comment counts. No login. $0.60/1K comments.

- **URL**: https://apify.com/hridayrungta/instagram-comments-scraper.md
- **Developed by:** [Hriday Rungta](https://apify.com/hridayrungta) (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

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 | No Login

Extract comments from any public Instagram post or Reel — or from an account's most recent posts — without logging in. $0.60 per 1,000 comments.

### What you get

- **Comment**: id, text, timestamp, like count
- **Author**: username, user id, verified badge, profile picture URL
- **Parent post**: shortcode, URL, content type (post/reel), owner username, like count, comment count, posted time
- Rows from `usernames` mode also carry the source account, so datasets join cleanly

### How this works (honestly)

Each post page is fetched once and the comments Instagram embeds in that page are extracted — typically **10–40 comments per post**, the most relevant/recent ones Instagram shows logged-out visitors. This Actor does **not** page through a post's full comment history: Instagram only serves that to logged-in sessions. If you need every one of 50,000 comments on a viral post, this is not the tool; if you need the visible conversation on many posts, it is fast and cheap.

Instagram blocks datacenter IPs, so this Actor uses Apify's Unblocker proxy by default. That proxy cost is already included in the price below — nothing extra is billed to you.

### Input at a glance

| Field | Description |
|---|---|
| `postUrls` | Post or Reel URLs, or bare shortcodes |
| `usernames` | Accounts whose recent posts to pull comments from |
| `maxPostsPerUsername` | How many recent posts per account |
| `maxCommentsPerPost` | Cap per post (blank = keep all returned) |
| `maxItems` | Total comment-row cap for the run |

### Billing (pay-per-event)

| Event | Price |
|---|---|
| Actor started | $0.007 — once per run, covers startup and proxy |
| Comment scraped | $0.0006 ($0.60 / 1,000) |

# Actor input Schema

## `postUrls` (type: `array`):

Instagram post or Reel URLs, one per line. A full URL (`https://www.instagram.com/p/DdmGYEUl9xu/` or `.../reel/...`) or a bare shortcode both work. Each post costs one request and returns that post's own embedded preview comments (typically 10-40, see README).

## `usernames` (type: `array`):

Instead of (or in addition to) postUrls: Instagram usernames, @handles, or profile URLs. Each account's recent posts/Reels are discovered from its profile page (one extra unbilled request) and this Actor then pulls comments from up to "Max posts per username" of them.

## `maxPostsPerUsername` (type: `integer`):

Only used when "usernames" is set. How many of each account's most recent posts/Reels to pull comments from.

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

Leave blank to keep every comment in the preview batch this Actor's one request returns per post (typically 10-40). Set a lower number to cap it deliberately.

## `maxItems` (type: `integer`):

Stop after saving this many comment rows in total, across all posts and usernames.

## `maxConcurrency` (type: `integer`):

How many posts/profiles to fetch at the same time.

## `requestsPerSecond` (type: `integer`):

Courtesy throttle across all concurrent workers combined.

## `maxRetries` (type: `integer`):

Retries with exponential backoff for network errors, timeouts, 5xx and 429 responses.

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

Required in practice: Apify's own datacenter proxy and a bare connection are both blocked by Instagram (measured). Leave the default (Apify Proxy, UNBLOCKER group) - its cost is already covered by this Actor's per-comment price.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.instagram.com/p/DdmGYEUl9xu/"
  ],
  "maxPostsPerUsername": 5,
  "maxItems": 2000,
  "maxConcurrency": 5,
  "requestsPerSecond": 5,
  "maxRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ]
  }
}
```

# 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 = {
    "postUrls": [
        "https://www.instagram.com/p/DdmGYEUl9xu/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "UNBLOCKER"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("hridayrungta/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 = {
    "postUrls": ["https://www.instagram.com/p/DdmGYEUl9xu/"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["UNBLOCKER"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("hridayrungta/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 '{
  "postUrls": [
    "https://www.instagram.com/p/DdmGYEUl9xu/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ]
  }
}' |
apify call hridayrungta/instagram-comments-scraper --silent --output-dataset

```

## MCP server setup

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