# Instagram Reels Scraper⚡ (`premiumscraper/instagram-reels-scraper`) Actor

Scrape public reels & comments. Collects play counts, views, likes, comment counts, video durations, captions, audio info, comment\_details, video\_versions & owner details. Fully supports profile URLs, User Names & direct reel links ✨Instagram Reels Scraper⚡

- **URL**: https://apify.com/premiumscraper/instagram-reels-scraper.md
- **Developed by:** [Premium Scraper](https://apify.com/premiumscraper) (community)
- **Categories:** Social media, Developer tools, Automation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 reels

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 Scraper

> **Instagram Reels Scraper** is a powerful, production-grade Apify actor built to extract public Instagram reels and comments at scale — without requiring a login session.

Whether you are a data analyst tracking influencer performance, a brand monitoring campaign engagement, a researcher studying social trends, or a developer integrating Instagram content into an application, the **Instagram Reels Scraper** delivers structured, clean, and immediate results.

---

### ✨ Key Features

The **Instagram Reels Scraper** offers a rich set of capabilities designed for real-world production use:

| Feature | Description |
|---|---|
| 👤 Multiple Input Modes | Feed usernames, profile URLs, reels-tab URLs, or direct reel links |
| 💬 Comment Extraction | Collect public comments for each reel with configurable limits |
| ⚡ Real-Time Streaming | Each reel is pushed to the dataset immediately — no waiting |
| 📊 Progress Logging | Comment progress is logged every 50 items (e.g. `50/500 complete 💬`) |
| 📦 Structured Output | Rich JSON dataset with reel metadata, comments, and status fields |
| 💸 Pay-Per-Event Billing | Only charged for data actually returned — not for empty runs |

---

### 📥 Input Configuration

Configure the **Instagram Reels Scraper** through the Apify Console input form or by passing a JSON input object. All fields are optional — mix and match what you need.

#### 👤 `username` — Instagram Username(s)
- **Type**: `string[]`
- **Example**: `["cristiano", "nba", "natgeo"]`
- Pass one or more Instagram usernames. The **Instagram Reels Scraper** converts them to profile URLs and scrapes the public reels tab automatically.

#### 🔗 `instagram_urls` — Instagram URLs
- **Type**: `array of URL objects`
- **Supported formats**:
  - Profile URL: `https://www.instagram.com/nba/`
  - Reels tab URL: `https://www.instagram.com/nba/reels/`
  - Direct reel URL: `https://www.instagram.com/reel/DYFIVfYM4ib/`
- Profile and reels-tab URLs are paginated. Direct reel URLs are parsed from the public reel page.

#### 🎞️ `reels_count` — Reels Per Profile
- **Type**: `integer` | **Default**: `10`
- The maximum number of reels to collect per profile input. The **Instagram Reels Scraper** paginates until this limit is met or all available public reels are exhausted.

#### 🌐 `proxyCountry` — Proxy Country
- **Type**: `string` | **Default**: `US`
- Choose the residential proxy exit country. Supported options include US, GB, AU, CA, DE, FR, NL, IT, ES, SE, NO, DK, FI, BE, AT, CH, IE, PL, PT, CZ, HU, RO, GR, JP, KR, SG, IN, BR, MX, AR, TR. The `US` setting is recommended for maximum Instagram public availability.

#### 📌 `skip_pinned_reels` — Skip Pinned Reels
- **Type**: `boolean` | **Default**: `false`
- **Why use this**: Pinned reels are highlighted at the top of a profile grid and are often older content. Enabling this allows you to skip them to scan only the latest chronological reels.
- **Billing**: Skipped pinned reels do not count towards the requested `reels_count` limit and do **NOT** incur any pay-per-event charges (skipping them is completely free).

#### 🧪 `skip_trial_reels` — Skip Trial Reels
- **Type**: `boolean` | **Default**: `false`
- **Why use this**: Trial reels are a specialized Instagram feature creators use to test content with non-followers temporarily before sharing them with their existing audience. Since these test videos are very rare, keeping this option enabled ensures you only collect permanent public reels.
- **Billing**: Skipped trial reels do not count towards the requested `reels_count` limit and do **NOT** incur any pay-per-event charges (skipping them is completely free).

#### 📅 `reels_newer_than` — Extract Reels Newer Than
- **Type**: `string (date)` | **Default**: `null`
- Use the date picker to set a lower date bound. The **Instagram Reels Scraper** will skip any reel created before this date. Leave empty for no date filter.

#### 💬 `include_comments` — Include Comments
- **Type**: `boolean` | **Default**: `false`
- Enable this to activate comment collection for each reel. The **Instagram Reels Scraper** fetches public comments via Instagram's GraphQL comment endpoint and nests them under `comment_details` in the output.
- ⚠️ **Important**: Comment scraping can take a significant amount of time, especially with higher limits. Please be patient while the scraper completes.

#### 💬 `comments_limit` — Comments Limit Per Reel
- **Type**: `integer` | **Default**: `20`
- The maximum number of public comments to collect per reel. Progress is logged every 50 comments (e.g. `collected 100/500 complete 💬`). If fewer comments are available, the output clearly states how many were requested and how many were returned.

---

### 📤 Output Structure

Each row in the Apify dataset produced by the **Instagram Reels Scraper** represents one reel. The output is fully structured JSON based on real Instagram public data. Below is the **complete, accurate field reference** derived from actual output.

> [!WARNING]
> ### ⚠️ Direct Reels vs. Profile Reels Differences
> Depending on how a reel is scraped, Instagram's public API returns different levels of detail:
> - **Reels via Profile/Username** (scraped from the reels tab): Includes views and play counts (`view_count`, `play_count`, `ig_play_count`), verify badges, owner details, pinned markers, and internal flags.
> - **Direct Reel Links** (scraped directly from a single URL page): Instagram does **not** publish play counts (`play_count`, `ig_play_count`, `view_count`) on the public unauthenticated single reel HTML page. These fields are therefore **not available** and will be pruned from the direct reel output. Pinned status (`is_pinned`) is also only meaningful on the profile grid and will always be `false` (or omitted) for direct links.

#### 📄 Top-Level Reel Fields

| Field | Type | Description |
|---|---|---|
| `number` | `integer` | Sequential index of the reel in this run (1-based) |
| `profile_url` | `string` | The source profile or URL provided as input |
| `reel_url` | `string` | The canonical public reel URL (e.g. `https://www.instagram.com/reel/DZN0A4Mgx8-/`) |
| `post_url` | `string` | Same as `reel_url` — included for compatibility |
| `shortcode` | `string` | Instagram's unique alphanumeric reel identifier (e.g. `DZN0A4Mgx8-`) |
| `media_id` | `string` | Instagram's internal numeric media ID |
| `post_type` | `string` | Always `"video"` for reels |
| `reel_type` | `string` | Always `"video"` for reels |
| `is_pinned` | `boolean` | Whether this reel is pinned on the profile |
| `caption` | `string` | The full caption text of the reel (always present, defaults to `""` if empty) |
| `caption_is_edited` | `boolean` | Whether the original caption was later edited |
| `caption_data` | `object` | Full caption metadata including `text`, `user`, `created_at`, `media_id`, `pk`, `status` |
| `like_count` | `integer` | Total public likes on the reel |
| `comment_count` | `integer` | Total comments as reported by Instagram |
| `view_count` | `integer` | Total public view count / play count |
| `play_count` | `integer` | Same as `view_count` (Instagram internal field) |
| `ig_play_count` | `integer` | Instagram-specific play count field |
| `share_count` | `integer` | Total public share count (see note below; usually `0` for public profiles) |
| `taken_at` | `integer` | Unix epoch timestamp of when the reel was posted |
| `created_at` | `string` | ISO 8601 UTC timestamp of the reel creation |
| `product_type` | `string` | Always `"clips"` for Instagram Reels |
| `original_width` | `integer` | Original video width in pixels (e.g. `1080`) |
| `original_height` | `integer` | Original video height in pixels (e.g. `1920`) |
| `video_duration` | `integer` | Duration of the reel video in seconds |
| `has_audio` | `boolean` | Whether the reel has an audio track |
| `is_video` | `boolean` | Always `true` for reels |
| `is_dash_eligible` | `integer` | Whether DASH adaptive streaming is available (`1` = yes) |
| `video_url` | `object` | An object `{"value": "..."}` containing the primary MP4 download URL |
| `video_versions` | `array` | Array of video quality variants — each has `url`, `width`, `height`, `bandwidth`, `type`, `id` |
| `video_dash_manifest` | `string` | MPEG-DASH XML manifest for adaptive streaming |
| `display_url` | `string` | URL of the reel's full cover thumbnail image |
| `display_uri` | `string` | URL of the reel's cropped/square cover thumbnail |
| `image_versions2` | `object` | All available thumbnail sizes |
| `user` | `object` | Creator profile object — see User Object below |
| `usertags` | `object` | Tagged users in the reel |
| `comments_disabled` | `boolean` | Whether the creator has disabled comments on this reel |
| `commenting_disabled_for_viewer` | `boolean` | Whether comments are locked for the scraper session |
| `engagement_counts_hidden` | `boolean` | Whether like/view counts are hidden on this post |
| `is_paid_partnership` | `boolean` | Whether the reel is marked as a paid partnership |
| `media_repost_count` | `integer` | Number of public reposts |
| `carousel_media_count` | `integer` | Always `0` for single reels |
| `audio_type` | `string` | The audio type label (e.g. `"ORIGINAL_SOUNDS"`, `"LICENSED_MUSIC"`) |
| `transcript` | `string` | Auto-generated transcript or caption text when available (defaults to `""`) |
| `music_info` | `object` | Metadata about the audio track, song title, artist, and license details |
| `audio_reattribution_info` | `object` | Info about original audio ownership |
| `strong_id` | `string` | Full unified ID code |
| `comment_details` | `object` | Nested comment data (only present when `include_comments = true`) |

---

#### 👤 User Object (`user` field)

The `user` field contains the reel creator's public profile data:

| Sub-field | Type | Description |
|---|---|---|
| `pk` / `pk_id` / `id` | `string` | Instagram user ID |
| `username` | `string` | Instagram handle (e.g. `"cristiano"`) |
| `full_name` | `string` | Display name (e.g. `"Cristiano Ronaldo"`) |
| `is_verified` | `boolean` | Whether the account has a verification badge |
| `is_private` | `boolean` | Whether the account is private |
| `account_type` | `integer` | Account type code (`3` = creator/business) |
| `profile_pic_url` | `string` | 150×150 profile picture URL |
| `hd_profile_pic_url` | `string` | Full-resolution (1080×1080) profile picture URL |
| `hd_profile_pic_versions` | `array` | Profile picture in multiple sizes (320px, 640px) |
| `fbid_v2` | `string` | Facebook cross-linked ID |
| `third_party_downloads_enabled` | `integer` | Whether downloads are allowed by the creator |

---

#### 🎬 `video_versions` Array

Each item in `video_versions` represents a different quality encode:

| Field | Description |
|---|---|
| `bandwidth` | Bitrate in bits per second |
| `width` / `height` | Video dimensions in pixels |
| `type` | Quality variant code (101, 102, 103...) |
| `url` | Direct MP4 download URL |

---

#### 💬 Comment Object Fields (inside `all_comments`)

| Field | Type | Description |
|---|---|---|
| `comment_id` | `string` | Unique comment identifier (same as `pk`) |
| `pk` | `string` | Instagram internal comment primary key |
| `text` | `string` | The full comment text |
| `created_at` | `integer` | Unix epoch timestamp of the comment |
| `like_count` | `integer` | Number of likes on the comment |
| `comment_like_count` | `integer` | Duplicate of `like_count` (Instagram internal) |
| `child_comment_count` | `integer` | Number of replies this comment has on Instagram |
| `is_edited` | `boolean` | Whether the comment was edited after posting |
| `is_covered` | `boolean` | Whether the comment is hidden/covered by Instagram |
| `did_report_as_spam` | `boolean` | Whether this comment was flagged as spam |
| `has_liked_comment` | `boolean` | Always `false` (scraper has no session) |
| `__typename` | `string` | Always `"XDTCommentDict"` for comments |
| `user` | `object` | Commenter's profile — `id`, `username`, `is_verified`, `profile_pic_url`, `fbid_v2` |

---

### 💸 Billing Model

The **Instagram Reels Scraper** uses the Apify **PAY_PER_EVENT** billing model. You are only charged for data that is actually returned:

| Event | Charged When |
|---|---|
| `reel` | A complete reel row is successfully pushed to the dataset |
| `comment` | A comment is successfully collected and included in output |

**You are not charged for:**
- Reels skipped due to date filters, pin settings, or trial reel filters
- Proxy retries and failed requests

---

### ❓ Frequently Asked Questions

#### Does the Instagram Reels Scraper require a login?
No. The **Instagram Reels Scraper** operates entirely on public endpoints. No login credentials are needed or used.

#### Why do some reels have 0 comments collected even though Instagram shows comments?
Instagram's public API comment endpoint may return fewer comments than the app displays, particularly for private accounts or accounts where comment visibility is restricted. The **Instagram Reels Scraper** can only access data that Instagram makes publicly available without authentication.

#### Can I scrape private accounts?
No. The **Instagram Reels Scraper** only works on **public** Instagram accounts and publicly visible reels. Private account data is not accessible without authentication, which this actor does not support.

#### Is this Instagram Reels Scraper compliant with Apify terms?
Yes. The **Instagram Reels Scraper** scrapes only publicly visible data, uses Apify's residential proxy infrastructure, and is designed for the Apify marketplace in full compliance with Apify's usage policies.

---

### 📞 Support

If you encounter an issue with the **Instagram Reels Scraper**, please open a support request through the Apify Console. Include:
- Your run ID
- A description of the issue
- The log output from the failed run

The **Instagram Reels Scraper** is actively maintained and updated to keep pace with Instagram's public API changes.

---

*The **Instagram Reels Scraper** is built for scale, resilience, and professional-grade data collection. Deploy it today for your social media intelligence, market research, and content monitoring needs.*

# Actor input Schema

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

Enter one or more Instagram usernames such as nba, natgeo, or cristiano. Each username is automatically converted into a profile URL and scraped through the public reels tab.
## `instagram_urls` (type: `array`):

Add one or more Instagram profile URLs, reels-tab profile URLs, or direct reel URLs. Supported formats:
• Username: nba
• Profile URL: https://www.instagram.com/nba/
• Reels tab URL: https://www.instagram.com/nba/reels/
• Direct reel URL: https://www.instagram.com/reel/DYFIVfYM4ib/

Profile inputs use the public reels clips API pagination flow. Direct reel URLs are scraped from the public reel page.
## `reels_count` (type: `integer`):

How many public reels to return for each profile input. This applies only to profile scraping, not direct reel URLs. If fewer public reels are available, the output clearly shows the requested and returned totals.
## `proxyCountry` (type: `string`):

Choose the residential proxy exit country for public Instagram requests. US is recommended for the broadest public coverage.
## `skip_pinned_reels` (type: `boolean`):

Turn on to skip pinned reels. Pinned reels will be skipped during profile feed scanning. Skipped pinned reels do not count towards the requested 'Reels Per Profile' limit, and they do NOT incur any pay-per-event charges (skipping them is free).
## `skip_trial_reels` (type: `boolean`):

Turn on to skip trial/test reels. Trial reels are an Instagram feature creators use to test a video with non-followers temporarily before sharing it with followers. Since these test videos are very rare, keeping this option enabled ensures you only scrape final, permanent public reels. Skipped trial reels do not count towards the requested limit and do NOT incur any pay-per-event charges (skipping them is free).
## `reels_newer_than` (type: `string`):

Only keep profile reels created on or after this date. Leave empty for no lower date limit. If fewer public reels match this filter, the output clearly shows the requested and returned totals.
## `include_comments` (type: `boolean`):

Turn on to collect public comments for each returned reel. Comments are placed under comment_details together with request feedback. ⚠️ Comment collection adds extra requests per reel and can take a significant amount of time — especially with high comment limits. Please be patient and do not stop the run early. Billing is per returned comment.
## `comments_limit` (type: `integer`):

Maximum number of comments to return per reel when comment collection is enabled. ⚠️ Higher limits take proportionally longer — scraping 3000 comments can take 10+ minutes per reel. Please be patient. If fewer public comments are available, the output clearly shows the requested and returned totals.

## Actor input object example

```json
{
  "username": [
    "cristiano"
  ],
  "instagram_urls": [
    {
      "url": "https://www.instagram.com/nba/"
    },
    {
      "url": "https://www.instagram.com/reel/DYFIVfYM4ib/"
    }
  ],
  "reels_count": 10,
  "proxyCountry": "US",
  "skip_pinned_reels": false,
  "skip_trial_reels": false,
  "include_comments": false,
  "comments_limit": 20
}
````

# 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": [
        "cristiano"
    ],
    "instagram_urls": [
        {
            "url": "https://www.instagram.com/nba/"
        },
        {
            "url": "https://www.instagram.com/reel/DYFIVfYM4ib/"
        }
    ],
    "reels_count": 10,
    "proxyCountry": "US",
    "comments_limit": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("premiumscraper/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": ["cristiano"],
    "instagram_urls": [
        { "url": "https://www.instagram.com/nba/" },
        { "url": "https://www.instagram.com/reel/DYFIVfYM4ib/" },
    ],
    "reels_count": 10,
    "proxyCountry": "US",
    "comments_limit": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("premiumscraper/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": [
    "cristiano"
  ],
  "instagram_urls": [
    {
      "url": "https://www.instagram.com/nba/"
    },
    {
      "url": "https://www.instagram.com/reel/DYFIVfYM4ib/"
    }
  ],
  "reels_count": 10,
  "proxyCountry": "US",
  "comments_limit": 20
}' |
apify call premiumscraper/instagram-reels-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Reels Scraper⚡",
        "description": "Scrape public reels & comments. Collects play counts, views, likes, comment counts, video durations, captions, audio info, comment_details, video_versions & owner details. Fully supports profile URLs, User Names & direct reel links ✨Instagram Reels Scraper⚡",
        "version": "1.0",
        "x-build-id": "ITAlMcYq2jcN0rrSl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/premiumscraper~instagram-reels-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-premiumscraper-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/premiumscraper~instagram-reels-scraper/runs": {
            "post": {
                "operationId": "runs-sync-premiumscraper-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/premiumscraper~instagram-reels-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-premiumscraper-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",
                "properties": {
                    "username": {
                        "title": "👤 Instagram Username(s)",
                        "type": "array",
                        "description": "Enter one or more Instagram usernames such as nba, natgeo, or cristiano. Each username is automatically converted into a profile URL and scraped through the public reels tab.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "instagram_urls": {
                        "title": "🔗 Instagram URLs",
                        "type": "array",
                        "description": "Add one or more Instagram profile URLs, reels-tab profile URLs, or direct reel URLs. Supported formats:\n• Username: nba\n• Profile URL: https://www.instagram.com/nba/\n• Reels tab URL: https://www.instagram.com/nba/reels/\n• Direct reel URL: https://www.instagram.com/reel/DYFIVfYM4ib/\n\nProfile inputs use the public reels clips API pagination flow. Direct reel URLs are scraped from the public reel page.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "reels_count": {
                        "title": "🎞️ Reels Per Profile",
                        "minimum": 1,
                        "type": "integer",
                        "description": "How many public reels to return for each profile input. This applies only to profile scraping, not direct reel URLs. If fewer public reels are available, the output clearly shows the requested and returned totals.",
                        "default": 10
                    },
                    "proxyCountry": {
                        "title": "🌐 Proxy Country",
                        "enum": [
                            "US",
                            "GB",
                            "AU",
                            "CA",
                            "DE",
                            "FR",
                            "NL",
                            "IT",
                            "ES",
                            "SE",
                            "NO",
                            "DK",
                            "FI",
                            "BE",
                            "AT",
                            "CH",
                            "IE",
                            "PL",
                            "PT",
                            "CZ",
                            "HU",
                            "RO",
                            "GR",
                            "JP",
                            "KR",
                            "SG",
                            "IN",
                            "BR",
                            "MX",
                            "AR",
                            "TR"
                        ],
                        "type": "string",
                        "description": "Choose the residential proxy exit country for public Instagram requests. US is recommended for the broadest public coverage.",
                        "default": "US"
                    },
                    "skip_pinned_reels": {
                        "title": "📌 Skip Pinned Reels",
                        "type": "boolean",
                        "description": "Turn on to skip pinned reels. Pinned reels will be skipped during profile feed scanning. Skipped pinned reels do not count towards the requested 'Reels Per Profile' limit, and they do NOT incur any pay-per-event charges (skipping them is free).",
                        "default": false
                    },
                    "skip_trial_reels": {
                        "title": "🧪 Skip Trial Reels",
                        "type": "boolean",
                        "description": "Turn on to skip trial/test reels. Trial reels are an Instagram feature creators use to test a video with non-followers temporarily before sharing it with followers. Since these test videos are very rare, keeping this option enabled ensures you only scrape final, permanent public reels. Skipped trial reels do not count towards the requested limit and do NOT incur any pay-per-event charges (skipping them is free).",
                        "default": false
                    },
                    "reels_newer_than": {
                        "title": "📅 Extract Reels That Are Newer Than",
                        "type": "string",
                        "description": "Only keep profile reels created on or after this date. Leave empty for no lower date limit. If fewer public reels match this filter, the output clearly shows the requested and returned totals."
                    },
                    "include_comments": {
                        "title": "💬 Include Comments",
                        "type": "boolean",
                        "description": "Turn on to collect public comments for each returned reel. Comments are placed under comment_details together with request feedback. ⚠️ Comment collection adds extra requests per reel and can take a significant amount of time — especially with high comment limits. Please be patient and do not stop the run early. Billing is per returned comment.",
                        "default": false
                    },
                    "comments_limit": {
                        "title": "💬 Comments Limit Per Reel",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of comments to return per reel when comment collection is enabled. ⚠️ Higher limits take proportionally longer — scraping 3000 comments can take 10+ minutes per reel. Please be patient. If fewer public comments are available, the output clearly shows the requested and returned totals.",
                        "default": 20
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
