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