# Instagram Comment Scraper (`dz_omar/instagram-comment-scraper`) Actor

Extract top-level comments from public Instagram Reels for free no login required. Get commenter usernames, text, likes, and timestamps, with pagination and a per-URL comment limit.

- **URL**: https://apify.com/dz\_omar/instagram-comment-scraper.md
- **Developed by:** [FlowExtract API](https://apify.com/dz_omar) (community)
- **Categories:** Social media, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 📷 Instagram Reel Comment Scraper — Extract Comments from Public Instagram Reels

**Instagram Reel Comment Scraper** extracts top-level comments from any public Instagram Reel — author, text, timestamp, likes. No login, no cookies, no Instagram account required.

Perfect for **social media analysts**, **brand monitoring teams**, and **researchers** who need Instagram Reel comment data without manually scrolling and copy-pasting.

---

### Why scrape Instagram Reel comments?

Instagram Reel comments are a direct read on audience sentiment, engagement quality, and what people actually say about a video — signal that likes and view counts don't capture. Common use cases:

- **Sentiment analysis**: pull comments on a product launch or campaign reel and run them through a sentiment model.
- **Competitor monitoring**: see what audiences are saying on a competitor's reels.
- **Influencer vetting**: check whether an influencer's comment section looks like real engagement.
- **Research datasets**: build a labeled dataset of public comment text for NLP work.
- **Community management**: export comments for review outside the Instagram app.

---

### What data can Instagram Reel Comment Scraper extract?

#### 💬 Comment content
- `text` — the comment body
- `created_at` — Unix timestamp the comment was posted
- `like_count` — likes on the comment

#### 👤 Author
- `user.username`, `user.id`, `user.is_verified`, `user.profile_pic_url`

#### 🆔 Identifiers
- `id` / `pk` — the comment's unique Instagram ID
- `child_comment_count` — number of replies (replies themselves aren't fetched yet — see Limitations)

#### 🔗 Source metadata
- `source_url` — the input URL this comment came from

---

### ⚙️ How to use Instagram Reel Comment Scraper

#### `urls` (Array, required)

One or more public Instagram Reel URLs. Instagram links to the same reel using several different URL shapes — all of them work here.

| Input value | What it extracts |
|---|---|
| `https://www.instagram.com/reels/<shortcode>/` or `/reel/<shortcode>/` | Comments on that reel |
| `https://www.instagram.com/p/<shortcode>/` | Also works — Instagram often serves reels under `/p/` links too |
| `https://www.instagram.com/<username>/reel/<shortcode>/` | Same, with a username prefix |

```json
{
    "urls": [
        { "url": "https://www.instagram.com/reels/DTvy2W3ErPl/" }
    ]
}
````

#### `maxCommentsPerUrl` (Integer)

- **Default**: `100`
- Maximum comments to collect per URL. Set to `0` to collect every available comment. The actor stops fetching as soon as this limit is reached — it never over-fetches then discards.

```json
{
    "urls": [{ "url": "https://www.instagram.com/reels/DTvy2W3ErPl/" }],
    "maxCommentsPerUrl": 0
}
```

#### 🔐 Authentication

None required. Works on public reels without an Instagram login.

***

### 💰 Pricing

This actor is **free to run** — every result is priced at $0. You only pay Apify's standard platform compute cost for the run itself.

***

### 📊 Sample Output

```json
{
    "id": "18416918653194028",
    "pk": "18416918653194028",
    "text": "كفو عليك يا بطل 😍",
    "created_at": 1783110883,
    "like_count": 0,
    "child_comment_count": null,
    "parent_comment_id": null,
    "user": {
        "id": "1448110168",
        "username": "_b97j",
        "is_verified": false,
        "profile_pic_url": "https://scontent.cdninstagram.com/..."
    },
    "source_url": "https://www.instagram.com/osama.azm5/reel/DaQSQ5hR7lv/",
    "_source": "instagram_comment_scraper"
}
```

***

### ❓ Frequently Asked Questions

**Do I need an Instagram account to use this actor?**
No — only public reels are supported, and no login is required.

**Can I scrape private reels?**
No — only publicly visible reels are supported.

**Can I scrape Instagram posts, not just reels?**
This actor is built and tested for Reels — `/reel/`, `/reels/`, and `/p/` links all work, since Instagram uses all three interchangeably for reels. Comment extraction isn't restricted by content type, so a link to a non-reel post will often work too, but Reels are the only officially supported and tested case.

**Can I scrape multiple reels in one run?**
Yes — add multiple entries to `urls`. Each is processed independently; if one fails (deleted, private, invalid URL) the others still run.

**Does this fetch comment replies?**
Not yet — only top-level comments are extracted in this version.

**What happens if a URL is invalid or the reel is gone?**
That URL is skipped with a logged error; the run continues with the remaining URLs.

**How many comments can I extract for free?**
As many as you configure via `maxCommentsPerUrl` — every result is $0. Apify's own compute cost for the run still applies.

***

### ⚠️ Limitations

- **Only Reels are supported.** Posts, photos, and other Instagram content types are out of scope.
- **Replies are not extracted.** Only top-level comments are returned; `child_comment_count` tells you how many replies exist, but they aren't fetched in this version.
- **Total comment counts** are best-effort — Instagram reports a total for most reels, but it isn't guaranteed present on every run.
- **Instagram changes over time.** If a run unexpectedly starts returning zero comments, it likely means Instagram changed something on their end — please report it.

***

### ⚖️ Legal & Ethical Use

This actor extracts **publicly visible data** from Instagram — the same comments any visitor can see without logging in.

**Please use this tool responsibly:**

- Only extract data from reels you are authorized to analyze.
- Comply with [Instagram's Terms of Use](https://help.instagram.com/581066165581870) and applicable data protection regulations (GDPR, CCPA, etc.).
- Do not use extracted data for spam, harassment, or unsolicited outreach.

***

### 🌐 Proxy Support

| User tier | Proxy used |
|---|---|
| 💎 Paying (dedicated proxy configured) | Dedicated residential proxy, with automatic fallback to Apify Proxy |
| 🆓 Free | Apify Proxy (residential) |

***

### 🚫 Error Handling

| Situation | What you see | What to do |
|---|---|---|
| URL isn't a valid instagram.com media URL | Rejected before the run starts, logged as a warning | Use a `/reel/`, `/reels/`, or `/p/` URL |
| Reel is deleted, private, or geo-blocked | `URL X/Y could not be loaded — skipping` | Confirm the reel is public and still exists |
| Instagram changed something on their end | `comments could not be retrieved` | Report the issue so the actor can be updated |

***

### 🌟 Related Actors

- **[Facebook Comment Scraper](https://apify.com/dz_omar/facebook-comment-scraper?fpr=smcx63)** — the same approach applied to Facebook reels, posts, photos, and videos.

# Actor input Schema

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

List of Instagram Reel URLs to scrape comments from.

**Supported formats:**

- `https://www.instagram.com/reels/xxxxxxx/`
- `https://www.instagram.com/reel/xxxxxxx/`
- `https://www.instagram.com/p/xxxxxxx/` (Instagram also serves reels under `/p/` links — these work too)
- `https://www.instagram.com/<username>/reel/xxxxxxx/`

Only public reels are supported — no login is used.

## `maxCommentsPerUrl` (type: `integer`):

Maximum number of comments to collect per URL. Set to 0 to collect all available comments. The actor stops fetching as soon as this limit is reached.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.instagram.com/reels/DTvy2W3ErPl/"
    }
  ],
  "maxCommentsPerUrl": 50
}
```

# Actor output Schema

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

All scraped comments. Each row is one top-level comment.

# 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": [
        {
            "url": "https://www.instagram.com/reels/DTvy2W3ErPl/"
        }
    ],
    "maxCommentsPerUrl": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("dz_omar/instagram-comment-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": [{ "url": "https://www.instagram.com/reels/DTvy2W3ErPl/" }],
    "maxCommentsPerUrl": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("dz_omar/instagram-comment-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    {
      "url": "https://www.instagram.com/reels/DTvy2W3ErPl/"
    }
  ],
  "maxCommentsPerUrl": 50
}' |
apify call dz_omar/instagram-comment-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dz_omar/instagram-comment-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Comment Scraper",
        "description": "Extract top-level comments from public Instagram Reels for free no login required. Get commenter usernames, text, likes, and timestamps, with pagination and a per-URL comment limit.",
        "version": "0.0",
        "x-build-id": "JW7BdA2lSP6miecs9"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dz_omar~instagram-comment-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dz_omar-instagram-comment-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/dz_omar~instagram-comment-scraper/runs": {
            "post": {
                "operationId": "runs-sync-dz_omar-instagram-comment-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/dz_omar~instagram-comment-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-dz_omar-instagram-comment-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "🔗 Instagram Reel URLs",
                        "type": "array",
                        "description": "List of Instagram Reel URLs to scrape comments from.\n\n**Supported formats:**\n- `https://www.instagram.com/reels/xxxxxxx/`\n- `https://www.instagram.com/reel/xxxxxxx/`\n- `https://www.instagram.com/p/xxxxxxx/` (Instagram also serves reels under `/p/` links — these work too)\n- `https://www.instagram.com/<username>/reel/xxxxxxx/`\n\nOnly public reels are supported — no login is used.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "url": {
                                    "title": "Instagram Reel URL",
                                    "description": "A public instagram.com Reel URL — `/reel/`, `/reels/`, `/p/`, or `/tv/` links are all accepted.",
                                    "type": "string",
                                    "pattern": "^https?:\\/\\/(www\\.)?instagram\\.com\\/(?:[^\\/?#]+\\/)?(?:p|reels?|tv)\\/[A-Za-z0-9_-]+\\/?(?:[?#].*)?$"
                                }
                            },
                            "required": [
                                "url"
                            ]
                        }
                    },
                    "maxCommentsPerUrl": {
                        "title": "📊 Max Comments Per URL",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of comments to collect per URL. Set to 0 to collect all available comments. The actor stops fetching as soon as this limit is reached."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
