# Instagram Comments Scraper Pro (`qaseemiqbal/instagram-comments-scraper-pro`) Actor

Unofficial tool to scrape public Instagram comments from posts, Reels, and TV URLs. Paste URLs, set cheap limits, include replies if needed, and export clean datasets with usernames, timestamps, likes, hashtags, mentions, and optional local analysis.

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

## Pricing

from $1.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## 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 Comments Scraper Pro 💬📸

Extract public Instagram comments from posts, Reels, and legacy TV links. Paste one or more Instagram URLs, choose how many comments you want, and download clean results in JSON, CSV, Excel, XML, HTML, or through the Apify API. 🚀

This Actor is built for people who want comment data they can actually use: marketers, agencies, researchers, social media teams, brand managers, analysts, and automation builders. 📊✨

> ⚠️ Important: This Actor works with public Instagram content only. It does not log in to Instagram, does not access private posts, and may return fewer comments than you see inside the Instagram app.

> ℹ️ Unofficial tool: Instagram Comments Scraper Pro is not affiliated with, endorsed by, or sponsored by Instagram, Meta, or any third-party service. It is an independent tool for collecting publicly available data.

### ✨ What Does Instagram Comments Scraper Pro Do?

Instagram Comments Scraper Pro collects publicly visible comments from:

- 📷 Instagram posts
- 🎞️ Instagram Reels
- 📺 Legacy Instagram TV URLs

For every comment or reply it finds, the Actor creates a clean dataset row with useful details such as the comment text, username, timestamp, likes, reply count, hashtags, mentions, and optional lightweight analysis fields. 🧾

Use it when you want to understand what people are saying under a public Instagram post without copying comments by hand. 🙌

### ✅ What Can You Scrape?

This Actor can extract:

- 💬 Top-level comments
- 🧵 Replies, when enabled
- 👤 Commenter usernames
- 🔗 Commenter profile URLs
- 🖼️ Profile picture URLs, when available
- 🆔 Public user IDs, when available
- ✅ Verification status, when available
- 🕒 Comment timestamps
- ❤️ Like counts
- ↩️ Reply counts
- #️⃣ Hashtags used in comments
- @️⃣ Mentioned usernames
- 🔍 Keyword matches
- 😊 Optional sentiment labels
- 🌍 Optional language hints
- ⚠️ Optional toxicity signals
- 🏷️ Optional topic keywords

### 🚀 How To Use It

1. 🔗 Paste one or more public Instagram post, Reel, TV, or profile Reels URLs.
2. 💸 Keep **Lowest cost** mode for a budget-friendly run, or choose **Balanced** for richer defaults.
3. 🧵 Decide whether you want replies included.
4. 🎚️ Set limits such as maximum comments per post or total results.
5. ▶️ Click **Save & Start**.
6. 📥 Download your results from the Dataset tab or send them to another tool using Apify integrations.

That is it. No Instagram login is required. ✅

### 🧭 Supported Instagram URLs

| Type | Example |
| --- | --- |
| 📷 Post | `https://www.instagram.com/p/SHORTCODE/` |
| 🎞️ Reel | `https://www.instagram.com/reel/SHORTCODE/` |
| 📺 TV | `https://www.instagram.com/tv/SHORTCODE/` |
| 🧭 Profile Reels tab | `https://www.instagram.com/username/reels/` |

Direct post, Reel, and TV URLs are the most reliable. Profile Reels tabs are discovery inputs: the Actor first tries to find public Reel links on that profile page, then scrapes comments from the discovered Reels. Instagram may hide those links from public pages, so profile discovery can return zero targets even when the Instagram app shows Reels. 🔍

### 💡 Popular Use Cases

| Use case | How this Actor helps |
| --- | --- |
| 📣 Brand monitoring | Collect public comments from campaign posts and product launches |
| 🤝 Influencer campaigns | Compare audience reactions across sponsored posts and Reels |
| 🛍️ Product feedback | Find complaints, praise, questions, and feature requests |
| 📊 Social listening | Export comments into spreadsheets, BI tools, or dashboards |
| 🧪 Research | Build datasets from public conversations for analysis |
| 🚨 Trust and safety | Detect spam, harassment, abuse signals, or risky keywords |
| 🤖 AI workflows | Send clean comment data to LLM, automation, or reporting pipelines |
| ⏰ Ongoing tracking | Schedule runs and compare comments over time |

### 🧪 Quick Start Input Example

Use this simple setup when you want a small, low-cost run. 💸

```json
{
  "startUrls": [
    { "url": "https://www.instagram.com/reel/SHORTCODE/" }
  ],
  "costMode": "lowestCost",
  "maxResults": 500,
  "maxCommentsPerPost": 100
}
````

### 🧰 Advanced Input Example

Use this when you want replies, filtering, analysis fields, and proxy support. 🧠

```json
{
  "costMode": "balanced",
  "startUrls": [
    { "url": "https://www.instagram.com/p/SHORTCODE/" }
  ],
  "includeReplies": true,
  "maxCommentsPerPost": 1000,
  "maxRepliesPerComment": 50,
  "keywordsAny": ["refund", "love", "broken"],
  "analysis": {
    "sentiment": true,
    "language": true,
    "toxicity": true,
    "topics": true,
    "keywordMatches": true
  },
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  }
}
```

### ⚙️ Main Input Settings

| Setting | What it does |
| --- | --- |
| 🔗 `startUrls` | Instagram post, Reel, TV, or profile Reels URLs you want to scrape |
| 💸 `costMode` | Choose `lowestCost` or `balanced` defaults |
| 🎯 `maxResults` | Maximum total comments and replies to save |
| 📌 `maxCommentsPerPost` | Maximum top-level comments to save per post |
| 🧵 `includeReplies` | Include public replies under comments |
| ↩️ `maxRepliesPerComment` | Limit replies per top-level comment |
| 🔎 `keywordsAny` | Keep comments containing at least one keyword |
| ✅ `keywordsAll` | Keep comments containing all selected keywords |
| 🚫 `excludeKeywords` | Remove comments containing unwanted words |
| ❤️ `minLikesCount` | Keep only comments with at least this many likes |
| 👤 `ownerUsernames` | Keep comments from specific usernames only |
| 🙅 `excludeOwnerUsernames` | Exclude comments from specific usernames |
| 🧠 `analysis` | Add optional local sentiment, language, toxicity, topic, or keyword fields |
| 🌐 `proxyConfiguration` | Use Apify Proxy when public access is inconsistent |
| ⚙️ `maxConcurrency` | Control how many posts are processed at once |
| 🛠️ `debugMode` | Save extra diagnostic information for troubleshooting |

### 💸 Lowest-Cost Mode

Lowest-cost mode is the default because most users want useful data without surprise spending. 💰

By default, it:

- ✅ Scrapes without browser fallback
- ✅ Keeps replies turned off
- ✅ Limits saved results to `500`
- ✅ Limits top-level comments to `100` per post
- ✅ Uses fewer retries
- ✅ Keeps optional analysis turned off
- ✅ Avoids debug snapshots
- ✅ Uses lower memory for small runs

Choose **Balanced** mode when you want richer extraction defaults, replies, browser fallback, and more retry attempts. Balanced mode can use more runtime, memory, proxy traffic, and result volume. ⚖️

### 📦 Output Data

Results are saved in the default Apify dataset. Each dataset item is one comment or one reply. This flat format is easy to use in spreadsheets, dashboards, APIs, databases, and AI workflows. 📈

Example output item:

```json
{
  "commentId": "17949788698583607",
  "shortcode": "SHORTCODE",
  "postUrl": "https://www.instagram.com/reel/SHORTCODE/",
  "inputUrl": "https://www.instagram.com/reel/SHORTCODE/",
  "contentType": "reel",
  "depth": 0,
  "parentCommentId": null,
  "threadRootCommentId": "17949788698583607",
  "text": "I love this launch! #excited @brand",
  "timestamp": "2026-06-15T11:45:00.000Z",
  "likesCount": 12,
  "repliesCount": 1,
  "position": 1,
  "ownerUsername": "example_user",
  "ownerProfileUrl": "https://www.instagram.com/example_user/",
  "ownerIsVerified": false,
  "commentUrl": "https://www.instagram.com/reel/SHORTCODE/c/17949788698583607/",
  "mentionedUsers": ["brand"],
  "hashtags": ["excited"],
  "keywordMatches": ["love"],
  "languageCode": "en",
  "sentimentLabel": "positive",
  "sentimentScore": 0.7,
  "toxicityScore": 0,
  "topicKeywords": ["launch", "excited"],
  "childRepliesFetched": false,
  "repliesTruncated": false,
  "extractionTime": "2026-06-15T11:45:00.000Z",
  "runId": "abc123"
}
```

### 🗂️ Extra Run Files

Along with the dataset, the Actor saves helpful run information in the key-value store:

- 📋 `RUN_SUMMARY`: overall run metrics, settings, and status
- 🧾 `POST_SUMMARIES`: per-post counts and success or failure status
- ⚠️ `ERRORS`: failed URLs or post-level issues
- 🧵 `THREADS`: optional nested comment snapshots when enabled
- 🛠️ `DEBUG`: optional troubleshooting data when debug mode is enabled

These files make it easier to understand what happened during the run, especially when Instagram returns limited public data. 🔍

### 📊 How Many Comments Can It Scrape?

The number of comments depends on what Instagram makes publicly visible at the time of the run. Instagram may show different comments depending on login status, region, post age, restrictions, or platform changes. 🌍

For a quick reality check, open the Instagram URL in an incognito browser window. If comments are not visible there, the Actor may not be able to access them either. 👀

Use these settings to control result size:

- 🎯 `maxResults`
- 📌 `maxCommentsPerPost`
- ↩️ `maxRepliesPerComment`
- 🧵 `includeReplies`

### 🔌 Integrations

You can connect Instagram comment data to many tools through the Apify platform. 🔗

Common options include:

- 📄 Google Sheets
- 💬 Slack
- ⚡ Zapier
- 🧩 Make
- 🔁 n8n
- 🗃️ Airbyte
- ☁️ Google Drive
- 🪝 Webhooks
- 🧑‍💻 Apify API
- 🧑‍💻 Python SDK
- 🟨 Node.js SDK
- 🤖 LLM and agent workflows

You can also create an Apify Task and schedule it to run daily, weekly, or hourly for ongoing monitoring. ⏰

### 🧠 Optional Analysis Fields

The Actor can add simple local analysis fields when you enable them:

- 😊 Sentiment: positive, neutral, or negative
- 🌍 Language hint
- ⚠️ Toxicity score and labels
- 🏷️ Topic keywords
- 🔎 Matched keywords from your filters

These are lightweight local signals, not a full human review and not a replacement for a dedicated AI moderation system. In this version, the Actor does not send comment text to an external AI service. 🔐

### 🛠️ Troubleshooting

| Problem | What to try |
| --- | --- |
| 😕 Zero comments returned | Check if comments are visible in an incognito browser |
| 🔐 Post unavailable | The post may be private, deleted, restricted, or login-only |
| 🧱 Blocked or login wall | Try Apify residential proxies and lower concurrency |
| 🧵 Missing replies | Enable `includeReplies` and increase `maxRepliesPerComment` |
| ⏳ Slow run | Lower reply limits, disable analysis, or reduce input size |
| 💸 Higher cost than expected | Set `maxResults`, keep replies off, and use `lowestCost` mode |
| 🧩 Missing fields | Some Instagram fields are not always publicly available |
| ⚠️ One post fails | Check `POST_SUMMARIES` and `ERRORS` in the key-value store |

### ❓ FAQ

#### 💬 Can I scrape comments from any Instagram post?

Only if the post and its comments are publicly visible to the Actor. Private, deleted, restricted, region-limited, or login-only content may not be available.

#### 👀 Why do I get fewer comments than I see in my Instagram app?

The Instagram app may show content that is visible only to logged-in users. This Actor runs without Instagram login, so it can only collect comments that are publicly accessible at run time.

#### 🔐 Can this Actor scrape private posts?

No. It is designed for public Instagram content only.

#### 🧵 Can it scrape replies?

Yes. Turn on `includeReplies`. You can also control reply volume with `maxRepliesPerComment`.

#### 🔎 Can I filter comments?

Yes. You can filter by keywords, excluded words, minimum likes, date range, allowed usernames, and excluded usernames.

#### 📥 What formats can I export?

Apify datasets can be downloaded as JSON, CSV, Excel, XML, HTML, and other formats. You can also access results through the Apify API.

#### 🤖 Does it use external AI?

No. The optional analysis fields in this version are lightweight local signals. Comment text is not sent to an external AI service by this Actor.

#### 🧾 Does it collect emails, phone numbers, or private profile data?

No. It extracts public comment data and public metadata that Instagram makes available with the comments.

#### ⏰ Can I monitor comments over time?

Yes. Save your settings as an Apify Task, schedule repeated runs, and compare comment IDs or timestamps between datasets.

#### 🌐 Should I use proxies?

For the lowest cost, start without proxies. If Instagram returns inconsistent public data, login walls, or blocks, try Apify residential proxies and keep concurrency low.

#### 🧑‍💻 Can developers use it through an API?

Yes. You can run the Actor with the Apify API, use webhooks, or fetch dataset items from the default dataset URL after the run finishes.

### ⚖️ Legal And Privacy Notes

This Actor extracts public Instagram data only. Public comments can still contain personal data, so you are responsible for using the data lawfully and respecting applicable privacy rules, platform terms, and data retention requirements. ⚖️

Do not use this Actor to collect private, login-only, or restricted content. If you are unsure whether your use case is allowed, consult a qualified legal professional. ✅

### 🧩 Need More Than Comments?

This Actor is focused on comments from specific Instagram post, Reel, and TV URLs. It can also try to discover direct Reel URLs from a public profile Reels tab, but direct media URLs remain the best input for reliable comment extraction. 🔄

### 🎯 Summary

Instagram Comments Scraper Pro helps you turn public Instagram conversations into clean, structured data. Paste URLs, set your limits, run the Actor, and export comments for research, reporting, customer insight, automation, or AI workflows. 💬📊🚀

# Actor input Schema

## `costMode` (type: `string`):

Use Lowest cost for HTTP-only scraping with no replies, browser fallback, debug data, or default analysis. Use Balanced to restore richer defaults.

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

Paste public Instagram /p/, /reel/, /tv/, or /username/reels/ URLs. Direct post and Reel URLs are most reliable. For profile Reels tabs, the Actor first tries to discover public Reel links, which Instagram may hide.

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

Global dataset item limit. The default cap prevents accidental large bills. Use 0 for no explicit limit.

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

Top-level comment limit per post. The default cap is cost-safe. Use 0 for all accessible comments.

## `includeReplies` (type: `boolean`):

Fetch publicly accessible reply comments when available. Disabled by default because replies can multiply result count and cost.

## `maxRepliesPerComment` (type: `integer`):

Reply limit per top-level comment. Use 0 for all accessible replies.

## `outputMode` (type: `string`):

Flat output is recommended for CSV, Excel, BI, and API workflows. Thread snapshots can also be saved to key-value store.

## `includePostMetadata` (type: `boolean`):

Include public post-level fields such as shortcode, post URL, post ID, and post owner username when available.

## `includeOwnerMetadata` (type: `boolean`):

Include public commenter fields such as username, profile URL, user ID, profile picture URL, and verification status when available.

## `sortCommentsBy` (type: `string`):

Instagram may ignore or limit public sort choices.

## `dateFrom` (type: `string`):

Optional ISO date lower bound applied after extraction.

## `dateTo` (type: `string`):

Optional ISO date upper bound applied after extraction.

## `keywordsAny` (type: `array`):

Keep comments containing at least one of these keywords.

## `keywordsAll` (type: `array`):

Keep comments containing all of these keywords.

## `excludeKeywords` (type: `array`):

Drop comments containing any of these keywords.

## `minLikesCount` (type: `integer`):

Keep only comments or replies with at least this many likes.

## `ownerUsernames` (type: `array`):

Optional allow-list. Leave empty to include all commenters.

## `excludeOwnerUsernames` (type: `array`):

Optional deny-list of commenter usernames to remove from the output.

## `analysis` (type: `object`):

Lightweight local enrichment. It does not send comment text to external AI services.

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

Leave disabled for the lowest platform cost. Residential proxies may improve availability but can add proxy usage cost.

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

Maximum number of post requests processed at once. Lower values are cheaper and gentler.

## `maxRequestsPerMinute` (type: `integer`):

Global request rate limit. Lower this if Instagram starts blocking requests.

## `requestDelayMillis` (type: `integer`):

Optional delay before each post request. The lowest-cost default is 0.

## `maxRequestRetries` (type: `integer`):

Maximum retries for failed public requests. The lowest-cost default avoids repeated expensive attempts.

## `allowDuplicateInputs` (type: `boolean`):

Process duplicate shortcodes more than once. Leave disabled to avoid duplicate work and cost.

## `failOnPostError` (type: `boolean`):

Stop the whole run when one post fails. Leave disabled to save partial results from other posts.

## `saveThreadSnapshots` (type: `boolean`):

Stores nested discussion trees in key-value store while keeping the dataset flat.

## `browserFallback` (type: `boolean`):

Try an unauthenticated browser fallback if static public HTML does not contain usable comment data. Disabled by default because browser runs use more memory and CPU.

## `strictPublicMode` (type: `boolean`):

Do not use cookies or credentials. Version 0.1 always avoids Instagram login.

## `debugMode` (type: `boolean`):

Store limited diagnostic samples in key-value store.

## `useFixtureData` (type: `boolean`):

Developer/testing mode. Reads saved fixture JSON instead of live Instagram.

## `fixtureDirectory` (type: `string`):

Directory containing default-thread.json for fixture mode.

## `enablePpeCharging` (type: `boolean`):

Developer monetization switch. Leave disabled for local testing.

## `maxTotalChargeUsd` (type: `number`):

Stops gracefully when estimated PPE charges reach this amount. Use 0 for no explicit estimate cap.

## Actor input object example

```json
{
  "costMode": "lowestCost",
  "startUrls": [
    {
      "url": "https://www.instagram.com/reel/SHORTCODE/"
    }
  ],
  "maxResults": 500,
  "maxCommentsPerPost": 100,
  "includeReplies": false,
  "maxRepliesPerComment": 0,
  "outputMode": "flat",
  "includePostMetadata": true,
  "includeOwnerMetadata": true,
  "sortCommentsBy": "platformDefault",
  "keywordsAny": [],
  "keywordsAll": [],
  "excludeKeywords": [],
  "minLikesCount": 0,
  "ownerUsernames": [],
  "excludeOwnerUsernames": [],
  "analysis": {
    "sentiment": false,
    "language": false,
    "toxicity": false,
    "topics": false,
    "keywordMatches": false
  },
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "maxConcurrency": 3,
  "maxRequestsPerMinute": 120,
  "requestDelayMillis": 0,
  "maxRequestRetries": 1,
  "allowDuplicateInputs": false,
  "failOnPostError": false,
  "saveThreadSnapshots": false,
  "browserFallback": false,
  "strictPublicMode": true,
  "debugMode": false,
  "useFixtureData": false,
  "fixtureDirectory": "test/fixtures",
  "enablePpeCharging": false,
  "maxTotalChargeUsd": 0
}
```

# Actor output Schema

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

Flat dataset where each item is one public Instagram comment or reply.

## `runSummary` (type: `string`):

Overall run metrics, settings, status, and public visibility note.

## `postSummaries` (type: `string`):

Per-post status, result counts, skipped counts, and error message when applicable.

## `errors` (type: `string`):

Structured list of failed URLs or post-level extraction errors.

## `threadSnapshots` (type: `string`):

Optional nested comment thread snapshots when thread snapshot saving is enabled.

# 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": [
        {
            "url": "https://www.instagram.com/reel/SHORTCODE/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("qaseemiqbal/instagram-comments-scraper-pro").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": [{ "url": "https://www.instagram.com/reel/SHORTCODE/" }] }

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Comments Scraper Pro",
        "description": "Unofficial tool to scrape public Instagram comments from posts, Reels, and TV URLs. Paste URLs, set cheap limits, include replies if needed, and export clean datasets with usernames, timestamps, likes, hashtags, mentions, and optional local analysis.",
        "version": "0.1",
        "x-build-id": "P1VfYiNn3St2o4XYp"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/qaseemiqbal~instagram-comments-scraper-pro/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-qaseemiqbal-instagram-comments-scraper-pro",
                "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/qaseemiqbal~instagram-comments-scraper-pro/runs": {
            "post": {
                "operationId": "runs-sync-qaseemiqbal-instagram-comments-scraper-pro",
                "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/qaseemiqbal~instagram-comments-scraper-pro/run-sync": {
            "post": {
                "operationId": "run-sync-qaseemiqbal-instagram-comments-scraper-pro",
                "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": [
                    "startUrls"
                ],
                "properties": {
                    "costMode": {
                        "title": "Cost mode",
                        "enum": [
                            "lowestCost",
                            "balanced"
                        ],
                        "type": "string",
                        "description": "Use Lowest cost for HTTP-only scraping with no replies, browser fallback, debug data, or default analysis. Use Balanced to restore richer defaults.",
                        "default": "lowestCost"
                    },
                    "startUrls": {
                        "title": "Instagram post, Reel, TV, or profile Reels URLs",
                        "type": "array",
                        "description": "Paste public Instagram /p/, /reel/, /tv/, or /username/reels/ URLs. Direct post and Reel URLs are most reliable. For profile Reels tabs, the Actor first tries to discover public Reel links, which Instagram may hide.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxResults": {
                        "title": "Maximum saved comments and replies",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Global dataset item limit. The default cap prevents accidental large bills. Use 0 for no explicit limit.",
                        "default": 500
                    },
                    "maxCommentsPerPost": {
                        "title": "Maximum top-level comments per post",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Top-level comment limit per post. The default cap is cost-safe. Use 0 for all accessible comments.",
                        "default": 100
                    },
                    "includeReplies": {
                        "title": "Include replies",
                        "type": "boolean",
                        "description": "Fetch publicly accessible reply comments when available. Disabled by default because replies can multiply result count and cost.",
                        "default": false
                    },
                    "maxRepliesPerComment": {
                        "title": "Maximum replies per comment",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Reply limit per top-level comment. Use 0 for all accessible replies.",
                        "default": 0
                    },
                    "outputMode": {
                        "title": "Output mode",
                        "enum": [
                            "flat",
                            "nested",
                            "both"
                        ],
                        "type": "string",
                        "description": "Flat output is recommended for CSV, Excel, BI, and API workflows. Thread snapshots can also be saved to key-value store.",
                        "default": "flat"
                    },
                    "includePostMetadata": {
                        "title": "Include post metadata",
                        "type": "boolean",
                        "description": "Include public post-level fields such as shortcode, post URL, post ID, and post owner username when available.",
                        "default": true
                    },
                    "includeOwnerMetadata": {
                        "title": "Include commenter metadata",
                        "type": "boolean",
                        "description": "Include public commenter fields such as username, profile URL, user ID, profile picture URL, and verification status when available.",
                        "default": true
                    },
                    "sortCommentsBy": {
                        "title": "Comment sort preference",
                        "enum": [
                            "platformDefault",
                            "newest",
                            "top"
                        ],
                        "type": "string",
                        "description": "Instagram may ignore or limit public sort choices.",
                        "default": "platformDefault"
                    },
                    "dateFrom": {
                        "title": "Date from",
                        "type": "string",
                        "description": "Optional ISO date lower bound applied after extraction."
                    },
                    "dateTo": {
                        "title": "Date to",
                        "type": "string",
                        "description": "Optional ISO date upper bound applied after extraction."
                    },
                    "keywordsAny": {
                        "title": "Keywords any",
                        "type": "array",
                        "description": "Keep comments containing at least one of these keywords.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "keywordsAll": {
                        "title": "Keywords all",
                        "type": "array",
                        "description": "Keep comments containing all of these keywords.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "excludeKeywords": {
                        "title": "Exclude keywords",
                        "type": "array",
                        "description": "Drop comments containing any of these keywords.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "minLikesCount": {
                        "title": "Minimum likes",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Keep only comments or replies with at least this many likes.",
                        "default": 0
                    },
                    "ownerUsernames": {
                        "title": "Allowed commenter usernames",
                        "type": "array",
                        "description": "Optional allow-list. Leave empty to include all commenters.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "excludeOwnerUsernames": {
                        "title": "Excluded commenter usernames",
                        "type": "array",
                        "description": "Optional deny-list of commenter usernames to remove from the output.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "analysis": {
                        "title": "Analysis options",
                        "type": "object",
                        "description": "Lightweight local enrichment. It does not send comment text to external AI services.",
                        "properties": {
                            "sentiment": {
                                "title": "Sentiment",
                                "type": "boolean",
                                "description": "Add a lightweight local positive, neutral, or negative sentiment label and score.",
                                "editor": "checkbox",
                                "default": false
                            },
                            "language": {
                                "title": "Language detection",
                                "type": "boolean",
                                "description": "Add a lightweight local language code when it can be inferred cheaply.",
                                "editor": "checkbox",
                                "default": false
                            },
                            "toxicity": {
                                "title": "Toxicity signals",
                                "type": "boolean",
                                "description": "Add a lightweight local toxicity score and labels based on simple keyword signals.",
                                "editor": "checkbox",
                                "default": false
                            },
                            "topics": {
                                "title": "Topic keywords",
                                "type": "boolean",
                                "description": "Add a short list of local topic keywords extracted from each comment text.",
                                "editor": "checkbox",
                                "default": false
                            },
                            "keywordMatches": {
                                "title": "Keyword matches",
                                "type": "boolean",
                                "description": "Include which configured filter keywords matched each saved comment.",
                                "editor": "checkbox",
                                "default": false
                            }
                        },
                        "default": {
                            "sentiment": false,
                            "language": false,
                            "toxicity": false,
                            "topics": false,
                            "keywordMatches": false
                        }
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Leave disabled for the lowest platform cost. Residential proxies may improve availability but can add proxy usage cost.",
                        "default": {
                            "useApifyProxy": false
                        }
                    },
                    "maxConcurrency": {
                        "title": "Maximum concurrency",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum number of post requests processed at once. Lower values are cheaper and gentler.",
                        "default": 3
                    },
                    "maxRequestsPerMinute": {
                        "title": "Maximum requests per minute",
                        "minimum": 1,
                        "maximum": 600,
                        "type": "integer",
                        "description": "Global request rate limit. Lower this if Instagram starts blocking requests.",
                        "default": 120
                    },
                    "requestDelayMillis": {
                        "title": "Delay between post requests",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Optional delay before each post request. The lowest-cost default is 0.",
                        "default": 0
                    },
                    "maxRequestRetries": {
                        "title": "Maximum request retries",
                        "minimum": 0,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum retries for failed public requests. The lowest-cost default avoids repeated expensive attempts.",
                        "default": 1
                    },
                    "allowDuplicateInputs": {
                        "title": "Allow duplicate input URLs",
                        "type": "boolean",
                        "description": "Process duplicate shortcodes more than once. Leave disabled to avoid duplicate work and cost.",
                        "default": false
                    },
                    "failOnPostError": {
                        "title": "Fail run on a post error",
                        "type": "boolean",
                        "description": "Stop the whole run when one post fails. Leave disabled to save partial results from other posts.",
                        "default": false
                    },
                    "saveThreadSnapshots": {
                        "title": "Save thread snapshots",
                        "type": "boolean",
                        "description": "Stores nested discussion trees in key-value store while keeping the dataset flat.",
                        "default": false
                    },
                    "browserFallback": {
                        "title": "Use browser fallback",
                        "type": "boolean",
                        "description": "Try an unauthenticated browser fallback if static public HTML does not contain usable comment data. Disabled by default because browser runs use more memory and CPU.",
                        "default": false
                    },
                    "strictPublicMode": {
                        "title": "Strict public mode",
                        "type": "boolean",
                        "description": "Do not use cookies or credentials. Version 0.1 always avoids Instagram login.",
                        "default": true
                    },
                    "debugMode": {
                        "title": "Debug mode",
                        "type": "boolean",
                        "description": "Store limited diagnostic samples in key-value store.",
                        "default": false
                    },
                    "useFixtureData": {
                        "title": "Use fixture data",
                        "type": "boolean",
                        "description": "Developer/testing mode. Reads saved fixture JSON instead of live Instagram.",
                        "default": false
                    },
                    "fixtureDirectory": {
                        "title": "Fixture directory",
                        "type": "string",
                        "description": "Directory containing default-thread.json for fixture mode.",
                        "default": "test/fixtures"
                    },
                    "enablePpeCharging": {
                        "title": "Enable PPE charging",
                        "type": "boolean",
                        "description": "Developer monetization switch. Leave disabled for local testing.",
                        "default": false
                    },
                    "maxTotalChargeUsd": {
                        "title": "Maximum estimated charge",
                        "minimum": 0,
                        "type": "number",
                        "description": "Stops gracefully when estimated PPE charges reach this amount. Use 0 for no explicit estimate cap.",
                        "default": 0
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
