# Instagram Comments Scraper - No Login, No Cookies (`a.actors/instagram-comments-scraper`) Actor

Scrape every top-level comment from public Instagram posts and reels without an account or cookies. Comment text, author username, verified flag, timestamp, likes and a direct comment link, plus a per-post coverage report so a blocked post is never mistaken for an empty one.

- **URL**: https://apify.com/a.actors/instagram-comments-scraper.md
- **Developed by:** [ApifyActors](https://apify.com/a.actors) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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 — no login, no cookies

Pull every top-level comment from public Instagram posts and reels, without an account,
without cookies and without a browser. Paste post links, get one clean row per comment.

### What it does that the others don't

- **No account at risk.** It reads comments the way Instagram's own logged-out page does.
  There is no session to buy, rotate or get banned.
- **A blocked post is never an empty post.** Instagram sometimes throttles a reader, and
  sometimes ends a comment list early while looking finished. This actor resumes a throttled
  post from where it stopped, re-reads a list that ended suspiciously short, and if a post
  still yields nothing it comes back as an **error row, unbilled**, rather than as zero comments.
- **Coverage you can check.** For every post the run records the comment count Instagram
  shows, how many comments were collected, and why collection stopped (`COVERAGE` in the
  run's key-value store).
- **Failed posts cost nothing.** Deleted, private, age-gated or region-blocked posts and
  non-post links come back as free error rows.

### What it does not do

- **Replies are not included.** Instagram serves replies only to logged-in viewers, and this
  actor never logs in. You get every top-level comment. The count Instagram displays on a post
  includes replies, so expect the collected number to sit somewhat below it — on our test posts
  top-level comments were 77–95% of the displayed count.
- **Commenter display names are not included** — Instagram does not send them to logged-out
  viewers. You get the username, user id and verified flag.
- It reads **posts you give it**. It does not search, crawl profiles or discover posts.

### Input

| Field | What it does |
|---|---|
| `startUrls` | Post or reel links (`/p/…`, `/reel/…`, `/tv/…`, with or without the account name), or bare shortcodes |
| `maxCommentsPerPost` | `0` for every top-level comment, or a cap to control spend on viral posts (newest first) |

```json
{
  "startUrls": ["https://www.instagram.com/p/DeJ28eTxo4s/", "https://www.instagram.com/reel/DeAYvsnn4la/"],
  "maxCommentsPerPost": 0
}
```

### Output

One row per comment:

```json
{
  "post_url": "https://www.instagram.com/p/DeJ28eTxo4s/",
  "shortcode": "DeJ28eTxo4s",
  "comment_id": "18000000000000000",
  "comment_url": "https://www.instagram.com/p/DeJ28eTxo4s/c/18000000000000000/",
  "text": "Incredible shot!",
  "author_username": "example_user",
  "author_url": "https://www.instagram.com/example_user/",
  "author_id": "1234567890",
  "author_is_verified": false,
  "is_post_owner": false,
  "created_at": "2026-10-20T14:03:11.000Z",
  "likes": 12,
  "has_gif": false,
  "post_comment_count": 2140
}
```

- `is_post_owner` — the comment was written by the account that published the post.
- `post_comment_count` — the count Instagram displays on the post (replies included).
- `has_gif` — a GIF-only comment has empty `text` and `has_gif: true`.

Error rows (free) look like `{"type": "error", "post_url": "…", "error": "post_not_found_404"}`.

### Pricing

You pay per comment collected. Error rows and posts with no comments cost nothing.

### Tips

- Comments arrive **newest first**. To sample a viral post cheaply, set `maxCommentsPerPost`.
- Links copied from the app with tracking parameters (`?igsh=…`) work as they are.
- Large posts take longer: Instagram serves 10–15 comments per page, so a post with 5,000
  comments needs a few hundred page reads. Several posts in one run are read in parallel.

# Actor input Schema

## `startUrls` (type: `array`):

One entry per post. Accepts instagram.com/p/<code>/, /reel/<code>/ and /tv/<code>/ links, with or without the account name in front, and bare shortcodes (the <code> part). Profile links are not posts and come back as an error row, unbilled.

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

0 = every top-level comment. Set a cap to control spend on viral posts; the newest comments come first.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.instagram.com/p/DeJ28eTxo4s/"
  ],
  "maxCommentsPerPost": 0
}
```

# Actor output Schema

## `comments` (type: `string`):

One item per top-level comment: text, author username, verified flag, timestamp, likes and a direct link. Posts that failed appear as error rows and are not charged.

## `coverage` (type: `string`):

For each post: the comment count Instagram shows (replies included), how many top-level comments were collected, and why collection stopped.

## `summary` (type: `string`):

Posts read, comments collected, posts that failed.

# 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 = {
    "startUrls": [
        "https://www.instagram.com/p/DeJ28eTxo4s/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("a.actors/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 = { "startUrls": ["https://www.instagram.com/p/DeJ28eTxo4s/"] }

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

```

## MCP server setup

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