# Instagram Post Scraper ✨ (`premiumscraper/instagram-post-scraper`) Actor

Returns post data including post URLs, shortcodes, media IDs,  comments, replies, reply status, captions, timestamps, likes and comment counts, carousel media, author info, tags, locations and request feedback with requested versus returned data ✨Instagram Post Scraper👤

- **URL**: https://apify.com/premiumscraper/instagram-post-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, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 posts

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 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 Post Scraper

Instagram Post Scraper collects public Instagram profile posts, direct post rows, comments, and replies in one clean dataset.
Instagram Post Scraper is built for operators who want richer public output with structured data that is easy to export, review, and automate.

### 🚀 What Instagram Post Scraper Gives You

- Post data: post URLs, shortcodes, media IDs, captions, timestamps, media type, likes, comment counts, view or play counts when public, media URLs, and preserved public raw metadata.
- Author data: normalized user objects plus public location, sponsor, coauthor, and usertag data when Instagram exposes it.
- Comment data: comment IDs, text, timestamps, counts, user objects, and public comment metadata.
- Reply data: direct replies, nested replies, reply counts, reply status, and per-comment reply feedback. Most comments have no replies, so no-reply comments are labeled clearly instead of being padded with fake data.
- Request feedback: post, comment, and reply request objects that clearly show requested totals, returned totals, and public availability limits.

### 🌟 Feature Highlights

- Profile timelines and direct post URLs can be processed in the same workflow.
- Reply-enabled output clearly marks comments that have no public replies. Most Instagram comments do not receive replies, so this is normal.
- Reply checks run only on the collected comments. Instagram Post Scraper does not keep scanning extra comments just to hunt for reply-bearing comments.
- Clean output rows preserve useful public raw fields instead of collapsing everything into a thin schema.
- Billing stays tied to exported output, not to internal searching alone.
- Live logs stay readable, professional, and privacy-safe during long runs.

### 📥 Quick Input Overview

Instagram Post Scraper keeps the input surface simple. Most runs only need a source, a post limit, and optional comment or reply settings.

### 🔘 Main Settings

- `username` and `instagram_urls`: Choose the profiles, posts, or reels to scrape.
- `posts_count`, `skip_pinned_posts`, and `posts_newer_than`: Control which profile timeline posts are returned.
- `include_comments` and `comments_limit`: Turn on comment collection and set the comment target per post.
- `include_comment_replies` and `comment_replies_limit`: Turn on reply collection and set how many direct replies to return per comment.
- `proxyCountry`: Choose the residential proxy country for public requests.

### 📦 Instagram Post Scraper Output Guide

Instagram Post Scraper returns one dataset row per exported post.
Each Instagram Post Scraper row can include post data, comment data, reply data, and request feedback objects that explain how much data you asked for and how much public data was actually available.

### 🧭 Instagram Post Scraper Output Shape By Mode

- Profile timeline rows use `profile_url` as the source profile URL. These rows can include `is_pinned`, `pinned_position`, and `profile_post_request` because they were collected from a profile timeline request.
- Direct post or reel rows use `profile_url` as the direct post input URL. These rows do not use profile timeline pagination, so `profile_post_request`, `is_pinned`, and `pinned_position` are not expected.
- Post-only runs return only post-level data. `comment_details` is not included when `include_comments` is off.
- Comment-enabled runs add `comment_details.request` and `comment_details.all_comments` to each returned post row.
- Reply-enabled runs add `comment_details.reply_request`, per-comment `reply_request`, `direct_reply_count`, `reply_count`, `has_replies`, and `reply_status`. `all_replies` appears only on comments or replies where at least 1 public reply item was actually collected. If a checked comment has no public replies, `all_replies` is omitted, `reply_status` becomes `no_public_replies`, and `reply_request.note` clearly says that this comment has no replies.
- Reply checks run only on the comments already returned under `comment_details.all_comments`. Instagram Post Scraper does not keep scanning deeper comment pages just to find reply-bearing comments.

### 🔎 Instagram Post Scraper No-Reply Behavior

- Most Instagram comments do not receive replies. Low reply yield is normal on public posts.
- When `include_comment_replies` is on, Instagram Post Scraper checks only the returned comments under `comment_details.all_comments`.
- If a checked comment has no public replies, the output shows `has_replies = false`, `direct_reply_count = 0`, `reply_count = 0`, `reply_status = no_public_replies`, and a `reply_request.note` that clearly says the comment has no public replies.
- In that no-reply case, `all_replies` is omitted because there are no public reply items to return.

### 🧩 Instagram Post Scraper Output Conditions

- Core normalized fields such as `number`, `profile_url`, `post_url`, `shortcode`, `media_id`, `post_type`, `created_at`, `caption`, `like_count`, `comment_count`, and `user` are the most stable fields and appear whenever Instagram exposes them publicly.
- Instagram Post Scraper also preserves many additional public raw fields when Instagram includes them. Examples from the shared output sample include `comments_disabled`, `commenting_disabled_for_viewer`, `engagement_counts_hidden`, `has_liked`, `has_viewer_saved`, `can_reshare`, `can_viewer_reshare`, `is_paid_partnership`, `media_repost_count`, `image_versions2`, `sharing_friction_info`, `code`, `pk`, `id`, `media_type`, `owner_id`, and other public metadata fields.
- Sponsored-post fields such as `is_paid_partnership` and `sponsor_tags` appear only when Instagram exposes sponsorship data publicly.
- Collaboration and tagging fields such as `usertags`, `coauthor_producers`, `invited_coauthor_producers`, and `location` appear only when that public metadata exists for the post.
- Public counts and media URLs are conditional. For example, `view_count` is included only when Instagram exposes a real public view or play count, and `video_url` appears only for video posts or video carousel items where a public video URL is exposed.
- Empty values are removed before export. If Instagram does not expose a field publicly, that field is omitted instead of being filled with fake placeholder values.

### 🧾 Instagram Post Scraper Post Fields

Common top-level row fields include:

- `number`: Sequential row number in the current export order.
- `profile_url`: The source profile URL for timeline rows or the direct post URL for direct-post runs.
- `post_url`: Canonical public post URL when available.
- `shortcode`: Instagram shortcode for the post.
- `media_id`: Public media identifier for the post.
- `post_type`: Normalized type such as `image`, `video`, `carousel`, or `unknown`.
- `created_at`: UTC timestamp string when available.
- `taken_at`: Raw post timestamp when available.
- `caption`: Main caption text.
- `caption_data`: Raw public caption object when available.
- `caption_is_edited`: Whether Instagram marks the caption as edited.
- `like_count`: Public like count when available.
- `comment_count`: Public comment count when available.
- `view_count`: Public play or view count when Instagram exposes it. If Instagram does not expose a public count for that post, this field is omitted instead of showing a fake zero.
- `display_url`: Primary image URL when available.
- `display_uri`: Public display URI from Instagram.
- `video_url`: Wrapped object with `value` containing the first public video URL when Instagram exposes one.
- `video_versions`: Public video variants when Instagram exposes them.
- `is_video`: Whether the post is a video.
- `original_width` and `original_height`: Original public dimensions when available.
- `carousel_items`: Normalized carousel media list for multi-item posts. Each carousel item can have its own `post_type`, `is_video`, `display_url`, `display_uri`, `video_url`, `video_versions`, `image_versions2`, and other public fields.
- `carousel_media_count`: Public carousel item count when available.
- `user`: Normalized public user object with `user_id` plus the remaining public user fields exposed by Instagram.
- `location`, `sponsor_tags`, `usertags`, `coauthor_producers`, `invited_coauthor_producers`, `clips_metadata`, and `thumbnails`: Additional public fields preserved when Instagram exposes them.
- `comments_disabled`, `commenting_disabled_for_viewer`, `engagement_counts_hidden`, `has_audio`, `has_liked`, `has_viewer_saved`, `can_reshare`, `can_viewer_reshare`, and similar public state flags: Included only when Instagram exposes them for that row.
- `is_pinned`: Present on profile timeline rows.
- `pinned_position`: Present when pinned posts are kept and their order can be identified.
- `profile_post_request`: Post-level request feedback with `requested`, `returned`, `target_met`, `status`, and `note`. It appears on profile timeline rows and explains whether the requested number of profile posts was actually collected.
- `code`, `pk`, `id`, `media_type`, `product_type`, `image_versions2`, `sharing_friction_info`, `profile_grid_thumbnail_fitting_style`, and related raw public fields: Preserved when Instagram exposes them.

### 💬 Instagram Post Scraper Comment Fields

When comment collection is enabled, each post can include:

- `comment_details.request`: Comment request feedback with `requested`, `returned`, `target_met`, `status`, `note`, and `mode`. It explains whether the requested comment target was met or limited by public availability.
- `comment_details.all_comments`: Array of returned comments from the public thread.
- `comment_details.reply_request`: Aggregate reply summary across the returned comments. It appears when reply checks run and includes `checked_comments`, `comments_with_replies`, `comments_without_replies`, `comments_below_requested_reply_limit`, `comments_with_more_public_replies_available`, `returned`, `requested_per_comment`, `status`, and `note`. Its note also makes it clear that most comments do not have replies when zero-reply results are normal.

Each returned comment can include:

- `comment_id`: Public comment identifier.
- `text`: Comment text.
- `created_at`: Raw public comment timestamp.
- `like_count`: Public comment like count.
- `child_comment_count`: Public child-comment count when exposed by Instagram.
- `user`: Public comment author object with normalized `user_id`.
- `has_replies`: Boolean reply flag after reply checks run. It appears when reply checks are enabled.
- `direct_reply_count`: Number of direct replies collected under that comment. It appears when reply checks are enabled.
- `reply_count`: Total collected reply items under that comment, including deeper nested reply items when they are publicly exposed. It appears when reply checks are enabled.
- `reply_status`: Clear per-comment status such as `no_public_replies`, `limited_by_public_replies`, `reply_limit_reached`, `target_met`, or `budget_limited`. `no_public_replies` means this comment has no public replies. `budget_limited` means public replies were detected for that comment, but the maximum cost per run was reached before reply items could be exported.
- `reply_request`: Per-comment reply feedback with `requested`, `returned`, `target_met`, `status`, `note`, `public_replies_exhausted`, `more_public_replies_available`, and `returned_reply_items`. It appears when reply checks are enabled. When a comment has no public replies, `reply_request.note` clearly says that this comment has no public replies. In budget-stop edge cases it can also include `replies_detected_before_export` and `budget_limited_before_reply_export` to show that public replies were detected before export stopped.
- `all_replies`: Nested reply tree when reply collection is enabled and public replies are available. If no public replies are collected, `all_replies` is omitted and `reply_status = no_public_replies` means this comment has no replies. If the maximum cost per run stops reply export before reply items can be pushed, that condition is explained by `reply_status` and `reply_request` instead.
- Remaining public comment fields from Instagram are preserved when they are not empty.

### ↪️ Instagram Post Scraper Reply Fields

When reply collection is enabled, each reply can include:

- `reply_id`: Public reply identifier.
- `parent_comment_id`: Parent comment or parent reply identifier.
- `text`: Reply text.
- `created_at`: Raw public reply timestamp.
- `like_count`: Public reply like count.
- `has_liked_comment`: Public viewer-like flag when exposed.
- `is_edited`: Whether Instagram marks the reply as edited.
- `user`: Public reply author object with normalized `user_id`.
- `all_replies`: Nested child replies when deeper public reply threads are exposed publicly.
- Replies preserve additional public raw fields such as `pk`, `comment_like_count`, `is_covered`, and `__typename` when Instagram exposes them.
- Remaining public reply fields from Instagram are preserved when they are not empty.

### 💸 Instagram Post Scraper Billing

Instagram Post Scraper charges only for posts, comments, and replies that are actually returned in output.

Pay Per Event events:

- `post`: Charged once for each post row that is successfully exported.
- `comment`: Charged once for each returned comment when comment collection is enabled.
- `comment-reply`: Charged once for each returned reply item when reply collection is enabled.

Billing behavior summary:

- Normal mode with replies off: charges for posts and returned comments only.
- Normal mode with replies on: charges for posts, returned comments, and returned replies.
- Comments that are checked for replies but have no public replies do not create reply charges.
- Reply collection checks only the comments already returned in output. Instagram Post Scraper does not keep scanning extra comments just to search for reply-bearing comments.
- If the maximum cost per run is reached, export stops early. A returned comment can keep `reply_status = budget_limited` to show that public replies were detected even though reply items could not be exported before the run budget stopped.

### ⏱️ Instagram Post Scraper Performance

Instagram Post Scraper runs fastest when you collect only posts.

Expected speed guidance:

- Post-only runs are the fastest.
- Turning on `include_comments` adds more public requests and increases runtime.
- Turning on `include_comment_replies` increases runtime further because each returned comment may need extra reply checks.
- Most comments have no replies, so many reply checks return zero replies even when reply collection is working correctly.
- Reply checks only run on the collected comments. Instagram Post Scraper no longer scans extra comments to hunt for reply-bearing comments beyond your normal comment limit.

### ✅ Instagram Post Scraper Best Use Cases

- Collect recent profile timeline posts with post-level feedback about requested versus returned totals.
- Export direct post rows with rich post fields, public comments, and public replies.
- Review which returned comments have public replies and which clearly have no public replies.
- Compare comment volume and reply volume across public posts while keeping billing easy to follow.
- Run clean exports for dashboards, moderation review, research, or automation pipelines.

# 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.
## `instagram_urls` (type: `array`):

Add one or more Instagram profile or direct post URLs. Supported formats:
• Username: nba
• Profile URL: https://www.instagram.com/nba/
• Direct post URL: https://www.instagram.com/p/DYTjzALNBaZ/
• Direct reel URL: https://www.instagram.com/reel/DYTjzALNBaZ/

Profile inputs use timeline GraphQL data only. Direct post and reel URLs are scraped from the public post page.
## `posts_count` (type: `integer`):

How many timeline posts to return for each profile input. This setting applies only to profile scraping, not direct post URLs. If fewer public posts are available, the output says how many were requested and how many were returned.
## `proxyCountry` (type: `string`):

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

Turn on to skip pinned timeline posts completely. Skipped pinned posts are not counted toward Posts Per Profile. This applies only to profile timeline scraping.
## `posts_newer_than` (type: `string`):

Only keep profile timeline posts created on or after this date. Leave empty for no lower date limit. If fewer public posts 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 post. Comments are placed under comment_details together with request feedback that explains requested and returned totals. Billing is per returned comment.
## `comments_limit` (type: `integer`):

Maximum number of comments to return per post when comment collection is enabled. If fewer public comments are available, the output clearly shows the requested and returned totals.
## `include_comment_replies` (type: `boolean`):

Turn on to check each returned comment for public replies. Replies are placed under all_replies inside their parent comment, and deeper public reply threads are followed when publicly available. Most Instagram comments do not have replies, so many checked comments will be marked with reply_status = no_public_replies and a reply_request note that clearly says the comment has no public replies. This setting checks only the returned comments; it does not keep scanning extra comments just to hunt for reply-bearing comments. Billing is per returned reply.
## `comment_replies_limit` (type: `integer`):

Maximum number of direct replies to collect for each collected comment or nested reply parent when reply collection is enabled. If a checked comment has no public replies, the output clearly says this comment has no replies. If fewer public replies are available than requested, the output and logs clearly show the requested amount and the returned amount. If more replies are still available after the limit is reached, the output says that too.

## Actor input object example

```json
{
  "username": [
    "cristiano"
  ],
  "instagram_urls": [
    {
      "url": "https://www.instagram.com/nba/"
    },
    {
      "url": "https://www.instagram.com/p/DXwidkpoiJC/"
    }
  ],
  "posts_count": 10,
  "proxyCountry": "US",
  "skip_pinned_posts": false,
  "include_comments": false,
  "comments_limit": 20,
  "include_comment_replies": false,
  "comment_replies_limit": 10
}
````

# 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/p/DXwidkpoiJC/"
        }
    ],
    "posts_count": 10,
    "proxyCountry": "US",
    "comments_limit": 20,
    "comment_replies_limit": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("premiumscraper/instagram-post-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/p/DXwidkpoiJC/" },
    ],
    "posts_count": 10,
    "proxyCountry": "US",
    "comments_limit": 20,
    "comment_replies_limit": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("premiumscraper/instagram-post-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/p/DXwidkpoiJC/"
    }
  ],
  "posts_count": 10,
  "proxyCountry": "US",
  "comments_limit": 20,
  "comment_replies_limit": 10
}' |
apify call premiumscraper/instagram-post-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Post Scraper ✨",
        "description": "Returns post data including post URLs, shortcodes, media IDs,  comments, replies, reply status, captions, timestamps, likes and comment counts, carousel media, author info, tags, locations and request feedback with requested versus returned data ✨Instagram Post Scraper👤",
        "version": "1.0",
        "x-build-id": "pCOilBTWCJI6HxfcG"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/premiumscraper~instagram-post-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-premiumscraper-instagram-post-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-post-scraper/runs": {
            "post": {
                "operationId": "runs-sync-premiumscraper-instagram-post-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-post-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-premiumscraper-instagram-post-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.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "instagram_urls": {
                        "title": "🔗 Instagram Profile, Direct Post URLs",
                        "type": "array",
                        "description": "Add one or more Instagram profile or direct post URLs. Supported formats:\n• Username: nba\n• Profile URL: https://www.instagram.com/nba/\n• Direct post URL: https://www.instagram.com/p/DYTjzALNBaZ/\n• Direct reel URL: https://www.instagram.com/reel/DYTjzALNBaZ/\n\nProfile inputs use timeline GraphQL data only. Direct post and reel URLs are scraped from the public post page.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "posts_count": {
                        "title": "📰 Posts Per Profile",
                        "minimum": 1,
                        "type": "integer",
                        "description": "How many timeline posts to return for each profile input. This setting applies only to profile scraping, not direct post URLs. If fewer public posts are available, the output says how many were requested and how many were returned.",
                        "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_posts": {
                        "title": "📌 Skip Pinned Posts",
                        "type": "boolean",
                        "description": "Turn on to skip pinned timeline posts completely. Skipped pinned posts are not counted toward Posts Per Profile. This applies only to profile timeline scraping.",
                        "default": false
                    },
                    "posts_newer_than": {
                        "title": "📅 Extract Posts That Are Newer Than",
                        "type": "string",
                        "description": "Only keep profile timeline posts created on or after this date. Leave empty for no lower date limit. If fewer public posts 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 post. Comments are placed under comment_details together with request feedback that explains requested and returned totals. Billing is per returned comment.",
                        "default": false
                    },
                    "comments_limit": {
                        "title": "💬 Comments Limit Per Post",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of comments to return per post when comment collection is enabled. If fewer public comments are available, the output clearly shows the requested and returned totals.",
                        "default": 20
                    },
                    "include_comment_replies": {
                        "title": "↪️ Include Comment Replies",
                        "type": "boolean",
                        "description": "Turn on to check each returned comment for public replies. Replies are placed under all_replies inside their parent comment, and deeper public reply threads are followed when publicly available. Most Instagram comments do not have replies, so many checked comments will be marked with reply_status = no_public_replies and a reply_request note that clearly says the comment has no public replies. This setting checks only the returned comments; it does not keep scanning extra comments just to hunt for reply-bearing comments. Billing is per returned reply.",
                        "default": false
                    },
                    "comment_replies_limit": {
                        "title": "↪️ Replies Limit Per Comment",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of direct replies to collect for each collected comment or nested reply parent when reply collection is enabled. If a checked comment has no public replies, the output clearly says this comment has no replies. If fewer public replies are available than requested, the output and logs clearly show the requested amount and the returned amount. If more replies are still available after the limit is reached, the output says that too.",
                        "default": 10
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
