# Instagram Reels Comments Scraper API (`charlsondou/instagram-reels-scraper`) Actor

Scrape Instagram reels, posts, profiles, comments, captions, media URLs, likes, plays, views, and share counts. Supports multiple usernames or URLs in one run.

- **URL**: https://apify.com/charlsondou/instagram-reels-scraper.md
- **Developed by:** [Charlson Dou](https://apify.com/charlsondou) (community)
- **Categories:** Social media, Automation
- **Stats:** 3 total users, 2 monthly users, 64.3% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Reels Comments Scraper API

### Overview

Instagram Reels Comments Scraper API is a lightweight Apify Actor for collecting structured data from Instagram reels, posts, and public profiles. Provide one or more Instagram usernames or reel/post URLs and get JSON records with captions, media URLs, engagement counts, share counts when available, and visible comments.

This Actor is a hosted API wrapper. It sends your input to a maintained backend endpoint and saves the returned items into your Apify dataset.

### Features

- Scrape direct Instagram reel/post URLs
- Scrape recent reels/posts from one or more public profile usernames
- Collect captions, hashtags, mentions, owner details, timestamps, dimensions, thumbnails, and video URLs
- Collect likes, comments count, play/view count, and share count when visible
- Collect visible comments with a configurable per-post limit
- Supports multiple usernames or URLs in one run
- Outputs clean structured JSON ready for analytics, automation, n8n, Make, Airtable, Google Sheets, or AI workflows


### For Apify Users

Run this Actor with your normal Apify account or Apify API token. You do not need to provide the backend API key. The Actor owner configures private backend environment variables. Users do not need to provide them.


### Actor Owner Configuration

Before publishing or running this Actor as the owner, set these environment variables in the Apify Actor settings:

```text
ZEABUR_URL=your_private_backend_endpoint
API_KEY=your_private_backend_api_key
## Optional internal troubleshooting only:
INCLUDE_DEBUG=false
````

`API_KEY` is not an Apify user token. It is the private key used by this Actor to call your private backend API. Apify users run the Actor with their normal Apify API token and never see this value.

### Input Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `username` | Array | Instagram usernames, profile URLs, or direct reel/post URLs. You can mix accounts and URLs. |
| `reelCount` | Integer | Number of recent reels/posts to fetch per profile. Direct URLs return one item. |
| `commentsLimit` | Integer | Maximum visible comments to collect per reel/post. Use lower values for faster runs. |
| `onlyPostsNewerThan` | String | Optional date filter. Supports `YYYY-MM-DD`, ISO timestamps, or relative values like `7 days`, `2 weeks`, `3 months`. |
| `skipPinnedPosts` | Boolean | Skip pinned posts when profile discovery can identify them. |
| `maxConcurrency` | Integer | Maximum number of items processed in parallel by the backend API. |

### Example Input

Scrape two recent reels from multiple profiles:

```json
{
  "username": ["cla.x.fitness", "aiflowtime"],
  "reelCount": 2,
  "commentsLimit": 50,
  "skipPinnedPosts": true
}
```

Scrape direct reel URLs:

```json
{
  "username": [
    "https://www.instagram.com/reel/DWltAaSAAYL/",
    "https://www.instagram.com/p/DX0zV3lAQWM/"
  ],
  "commentsLimit": 100
}
```

Mix profiles and direct URLs:

```json
{
  "username": [
    "cla.x.fitness",
    "https://www.instagram.com/reel/DWltAaSAAYL/",
    "humansofny"
  ],
  "reelCount": 1,
  "commentsLimit": 50
}
```

### Output Data

Each dataset item represents one Instagram reel/post.

| Field | Description |
| --- | --- |
| `id` | Instagram media ID when available |
| `type` | Media type, usually `Video` |
| `shortCode` | Instagram shortcode |
| `caption` | Post caption text |
| `hashtags` | Hashtags extracted from the caption |
| `mentions` | Mentioned usernames extracted from the caption |
| `url` | Canonical Instagram post/reel URL |
| `commentsCount` | Public comments count when available |
| `dimensionsHeight` / `dimensionsWidth` | Media dimensions |
| `images` | Thumbnail/preview image URLs |
| `videoUrl` | Direct video media URL when accessible |
| `likesCount` | Public like count when available |
| `sharesCount` | Share count when visible to the backend session |
| `timestamp` | Post timestamp |
| `ownerFullName` | Creator display name |
| `ownerUsername` | Creator username |
| `ownerId` | Instagram owner ID |
| `productType` | Instagram product type, for example `clips` |
| `videoDuration` | Video duration in seconds |
| `inputUrl` | Original input URL used for this item |
| `firstComment` | First collected comment text when available |
| `latestComments` | Array of collected visible comments |
| `latestCommentsFetchedCount` | Number of comments returned |
| `commentsLimit` | Requested per-post comments limit |
| `displayUrl` | Main display image URL |
| `videoViewCount` | View count when available |
| `videoPlayCount` | Play count when available |
| `childPosts` | Child posts for carousel-like data when available |
| `status` | Processing status |
| `processedAt` | Backend processing timestamp |

### Example Output

```json
{
  "id": "3887958181485282700",
  "type": "Video",
  "shortCode": "DX0zV3lAQWM",
  "caption": "Post caption text...",
  "hashtags": [],
  "mentions": [],
  "url": "https://www.instagram.com/p/DX0zV3lAQWM/",
  "commentsCount": 40,
  "images": ["https://...jpg"],
  "videoUrl": "https://...mp4",
  "likesCount": 1157,
  "sharesCount": 11,
  "timestamp": "2026-05-02T05:55:03.000Z",
  "ownerFullName": "Creator name",
  "ownerUsername": "creator_username",
  "ownerId": "123456789",
  "productType": "clips",
  "videoDuration": 104,
  "inputUrl": "https://www.instagram.com/p/DX0zV3lAQWM/",
  "firstComment": "Nice post",
  "latestComments": [
    {
      "id": "18000000000000000",
      "text": "Nice post",
      "ownerUsername": "commenter",
      "owner": {
        "is_verified": false,
        "username": "commenter"
      }
    }
  ],
  "latestCommentsFetchedCount": 1,
  "commentsLimit": 50,
  "displayUrl": "https://...jpg",
  "videoViewCount": 10000,
  "videoPlayCount": 10000,
  "childPosts": [],
  "status": "success",
  "processedAt": "2026-05-03T12:00:00.000000+00:00"
}
```

### How It Works

1. Add Instagram usernames, profile URLs, or direct reel/post URLs.
2. The Actor forwards the request to the hosted Instagram scraping API.
3. The backend resolves recent posts, loads visible comments, and enriches each record.
4. The Actor stores each returned item in the Apify dataset.

### Performance Tips

For many accounts, avoid very large runs in one request. Start with:

```json
{
  "username": ["account1", "account2", "account3"],
  "reelCount": 1,
  "commentsLimit": 20
}
```

Increase `reelCount` and `commentsLimit` gradually. Comments collection is the slowest part because Instagram often requires browser-like scrolling to load more comments.

### Notes & Limitations

- Works best with public Instagram profiles and public reels/posts.
- Private, restricted, removed, or region-limited content may not be accessible.
- Engagement numbers can change over time and may differ from what you see in the Instagram app.
- Share counts are returned only when visible to the backend session and may be unavailable for some posts.
- Comments are visible comments loaded by the backend session, not guaranteed to be every comment on very large posts.
- Direct media URLs may expire because Instagram CDN URLs are time-limited.

### Use Cases

- Influencer and creator research
- Reels engagement monitoring
- Comment mining and keyword research
- Social media analytics dashboards
- Competitor content tracking
- Lead generation and community analysis
- Feeding Instagram post data into AI workflows

### SEO Keywords

Instagram Reels Scraper, Instagram Comments Scraper, Instagram Post Scraper, Instagram Profile Reels API, Instagram Engagement Data, Instagram Shares Count Scraper, Instagram JSON API Alternative, Instagram Social Media Analytics

### Disclaimer

Use this Actor responsibly and only for lawful purposes. Instagram may restrict automated collection of data in its terms of service. This Actor is intended for collecting accessible Instagram post/profile data for analytics, research, and automation workflows. The developer is not responsible for misuse.

# Actor input Schema

## `username` (type: `array`):

Add Instagram usernames, profile URLs, or direct reel/post URLs. You can mix multiple accounts and direct URLs in one run.

## `reelCount` (type: `integer`):

How many recent reels/posts to fetch from each profile. Direct reel/post URLs always return one item.

## `commentsLimit` (type: `integer`):

Maximum number of visible comments to collect for each reel/post.

## `onlyPostsNewerThan` (type: `string`):

Optional date filter. Supports YYYY-MM-DD, ISO timestamps, or relative values such as 7 days, 2 weeks, or 3 months.

## `skipPinnedPosts` (type: `boolean`):

Exclude pinned profile posts when profile discovery can identify them.

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

Maximum number of items processed in parallel by the backend API.

## Actor input object example

```json
{
  "username": [
    "mosseri"
  ],
  "reelCount": 1,
  "commentsLimit": 50,
  "skipPinnedPosts": true,
  "maxConcurrency": 2
}
```

# Actor output Schema

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "username": [
        "mosseri"
    ],
    "onlyPostsNewerThan": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("charlsondou/instagram-reels-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 = {
    "username": ["mosseri"],
    "onlyPostsNewerThan": "",
}

# Run the Actor and wait for it to finish
run = client.actor("charlsondou/instagram-reels-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 '{
  "username": [
    "mosseri"
  ],
  "onlyPostsNewerThan": ""
}' |
apify call charlsondou/instagram-reels-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Reels Comments Scraper API",
        "description": "Scrape Instagram reels, posts, profiles, comments, captions, media URLs, likes, plays, views, and share counts. Supports multiple usernames or URLs in one run.",
        "version": "0.0",
        "x-build-id": "2DdT4CpcanPaEZ08b"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/charlsondou~instagram-reels-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-charlsondou-instagram-reels-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/charlsondou~instagram-reels-scraper/runs": {
            "post": {
                "operationId": "runs-sync-charlsondou-instagram-reels-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/charlsondou~instagram-reels-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-charlsondou-instagram-reels-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": [
                    "username"
                ],
                "properties": {
                    "username": {
                        "title": "Instagram usernames or URLs",
                        "type": "array",
                        "description": "Add Instagram usernames, profile URLs, or direct reel/post URLs. You can mix multiple accounts and direct URLs in one run.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "reelCount": {
                        "title": "Recent reels/posts per profile",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "How many recent reels/posts to fetch from each profile. Direct reel/post URLs always return one item.",
                        "default": 1
                    },
                    "commentsLimit": {
                        "title": "Comments per reel/post",
                        "minimum": 0,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of visible comments to collect for each reel/post.",
                        "default": 50
                    },
                    "onlyPostsNewerThan": {
                        "title": "Only posts newer than",
                        "type": "string",
                        "description": "Optional date filter. Supports YYYY-MM-DD, ISO timestamps, or relative values such as 7 days, 2 weeks, or 3 months."
                    },
                    "skipPinnedPosts": {
                        "title": "Skip pinned posts",
                        "type": "boolean",
                        "description": "Exclude pinned profile posts when profile discovery can identify them.",
                        "default": true
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Maximum number of items processed in parallel by the backend API.",
                        "default": 2
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
