{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Reels Scraper: Comments, Replies & Top Commenters",
    "description": "Scrape Instagram Reels with the Instagram Reels Scraper. Extract video URLs, captions, hashtags, likes, comments, and uploader info. Perfect for trend analysis, content research, and social media insights. Fast, reliable, and scalable for single or bulk Reels scraping.",
    "version": "0.1",
    "x-build-id": "Gsmp4NhwZnt2rg94d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~instagram-reels-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-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/scrapier~instagram-reels-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-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/scrapier~instagram-reels-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-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": {
          "targetProfiles": {
            "title": "👤🎯 Instagram Profiles / Usernames",
            "type": "array",
            "description": "🔎 Add one or more Instagram usernames, @handles, or profile URLs whose reels will be scraped. (Base-compatible: the original `username` field still works if sent instead.)",
            "items": {
              "type": "string"
            }
          },
          "maxReelsPerProfile": {
            "title": "🎞️🔢 Max Reels per Profile",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "📦 Maximum number of reels to collect per profile. Default is 10 (matches base `resultsLimit`)."
          },
          "postedAfterDate": {
            "title": "📅⏱️ Only Reels Posted After",
            "type": "string",
            "description": "🗓️ Only scrape reels posted after this date. Use the date picker for an absolute date (YYYY-MM-DD) or type a relative duration like 7 days, 2 weeks, or 1 month. Leave empty for all reels."
          },
          "skipPinnedReels": {
            "title": "📌⏭️ Skip Pinned Reels",
            "type": "boolean",
            "description": "🙈 Turn on to ignore pinned reels and focus on regular timeline content."
          },
          "igSessionCookie": {
            "title": "🔑🍪 Instagram Session ID (sessionid cookie)",
            "type": "string",
            "description": "🔐 Paste the `sessionid` value from an authenticated instagram.com browser session. Used ONLY for the comment-thread GraphQL requests below — never stored, never used for any other request. Leave empty to run comment-thread fetch logged-out (lower/inconsistent coverage)."
          },
          "fetchFullCommentThreads": {
            "title": "🧵🔓 Fetch Full Comment Threads & Replies",
            "type": "boolean",
            "description": "🚀 Enable the doc_id-free mobile REST comment-thread fetch (ported from instaloader's iPhone endpoint) — pulls top-level comments AND their nested replies per reel, beyond the base's flat 12-comment preview. A legacy GraphQL doc_id-scan path exists as a disabled-by-default fallback. Adds extra requests per reel.",
            "default": false
          },
          "maxCommentsPerReel": {
            "title": "💬🔢 Max Top-Level Comments per Reel",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "📈 Maximum number of top-level comment threads to fetch per reel when full comment-thread fetch is enabled.",
            "default": 20
          },
          "maxRepliesPerComment": {
            "title": "↩️🔢 Max Replies per Comment",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "🔁 Maximum number of nested replies to fetch per top-level comment. Set to 0 to fetch top-level comments only (no reply threading).",
            "default": 10
          },
          "extractTopCommentersAndMentions": {
            "title": "🎯📋 Extract Top Commenters & @Mention Leads",
            "type": "boolean",
            "description": "🕵️ Derive a ranked `topCommenters` lead list (real people who commented, ranked by comment count + likes) and a `commentMentions` list (usernames @mentioned inside comment text) from the fetched comment thread — a lightweight outreach/lead list distinct from the base's flat comment fields.",
            "default": true
          },
          "topCommentersLimit": {
            "title": "🏆🔢 Top Commenters Limit",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "🔝 Maximum number of ranked entries kept in each reel's `topCommenters` lead list.",
            "default": 15
          },
          "includeReelShareCount": {
            "title": "🔁📊 Include Reel Share Count",
            "type": "boolean",
            "description": "📈 Include share count for each reel when Instagram makes it available."
          },
          "includeCaptionTranscript": {
            "title": "📝🎙️ Include Caption Transcript",
            "type": "boolean",
            "description": "🧠 Extract and include the reel's auto-transcript text in your output data."
          },
          "saveReelVideoCopy": {
            "title": "⬇️🎥 Save Reel Video Copy",
            "type": "boolean",
            "description": "💾 Download the reel video to the Key-Value Store and include a downloadable link in the output."
          },
          "connectionProxy": {
            "title": "🛡️🌐 Connection Proxy",
            "type": "object",
            "description": "🔐 The actor always uses Apify's residential proxy (3 attempts) for reliability. If you provide your own custom proxy URLs here, the actor will try those first and automatically fall back to residential if they fail."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}