{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Comments Scraper: Export Reel & Post Comments",
    "description": "Scrape Instagram comments from post and reel links or a profile's newest posts, no login: an Instagram comment scraper and comments extractor. Every comment the list serves, newest first, with text, exact time, likes, author, verified badge, comment link and GIF; a free post row with the count.",
    "version": "0.1",
    "x-build-id": "Tmpe0RZTbpetncyt7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hyperbach~instagram-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hyperbach-instagram-comments-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/hyperbach~instagram-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hyperbach-instagram-comments-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/hyperbach~instagram-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hyperbach-instagram-comments-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": {
          "postUrls": {
            "title": "Post and reel links",
            "maxItems": 5000,
            "type": "array",
            "description": "Posts and reels, one per line: any post or reel link (`https://www.instagram.com/p/<code>/`, `/reel/<code>/`, `/reels/<code>/`, `/tv/<code>/`, `instagram.com/<user>/p/<code>/`, with or without `?igsh=` or `?img_index=`), a bare shortcode (`DcOuBsxJww9`) or a numeric media id. Each post gives its comments, newest first, and one free post row with Instagram's comment count and how many comments the list served. Two forms of one post are read once. A value that names no post is a free row that says why.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "Profiles (their newest posts)",
            "maxItems": 1000,
            "type": "array",
            "description": "Instagram profiles, one per line: a username (`natgeo`, `@natgeo`) or a profile link. Each gives the comments of its newest `maxPostsPerProfile` posts by publish time (pinned posts are not put first), and one free profile row. A private profile, a missing username or a profile Instagram withholds from logged-out viewers is a free row that says so.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerProfile": {
            "title": "Newest posts per profile",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many of each profile's newest posts to read the comments of (by publish time; a pinned older post does not take a place).",
            "default": 10
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "The most comments delivered per post, newest first (or the most liked first with `sortBy`). 0 = every comment the post's list serves, to its end. A comment left out by a filter does not count. The post row says CAPPED when this came first.",
            "default": 0
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "newest",
              "most_liked"
            ],
            "type": "string",
            "description": "`newest`: Instagram's own order, newest first (the default). `most_liked`: the comments read (the whole list, or up to `maxCommentsToRead`), re-sorted by their likes by this Actor, and the top `maxCommentsPerPost` delivered. Instagram serves no ranked or \"top\" order to logged-out viewers, so this is our sort of what was read, and the post row says so.",
            "default": "newest"
          },
          "maxCommentsToRead": {
            "title": "Max comments read per post",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "A bound on how many comments are read per post when a filter or `most_liked` reads more than it delivers (a post can hold thousands). 0 = read to the list's end. The post row says CAPPED with `read_budget` when this came first.",
            "default": 0
          },
          "newerThan": {
            "title": "Comments on or after",
            "pattern": "^(|[0-9]{4}-[0-9]{2}-[0-9]{2}([T ][0-9:.]+(Z|[+-][0-9]{2}:?[0-9]{2})?)?|[0-9]{1,4} *(hour|hours|day|days|week|weeks|month|months|year|years)?)$",
            "type": "string",
            "description": "Only comments posted on or after this time: a date (`2026-09-01`), a date and time (`2026-09-01T12:00:00Z`), or a span back from now in lower case (`7 days`, `12 hours`, `2 weeks`, `3 months`). The list is newest first, so the walk stops at the first older comment.",
            "default": ""
          },
          "olderThan": {
            "title": "Comments on or before",
            "pattern": "^(|[0-9]{4}-[0-9]{2}-[0-9]{2}([T ][0-9:.]+(Z|[+-][0-9]{2}:?[0-9]{2})?)?|[0-9]{1,4} *(hour|hours|day|days|week|weeks|month|months|year|years)?)$",
            "type": "string",
            "description": "Only comments posted on or before this time (a date includes its whole day), in the same forms as `newerThan`. The newer comments are read and left out, free.",
            "default": ""
          },
          "textContains": {
            "title": "Text contains any of",
            "maxItems": 100,
            "type": "array",
            "description": "Keep a comment only when its text contains one of these words or phrases (case-insensitive), one per line; a comma is part of a phrase. The walk reads on; a comment left out is free, and the post row says how many matched of how many read.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minLikes": {
            "title": "Min likes",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Keep a comment only with at least this many likes. Free when it leaves a comment out. 0 = every comment.",
            "default": 0
          },
          "onlyVerifiedCommenters": {
            "title": "Only verified commenters",
            "type": "boolean",
            "description": "Keep a comment only when its author has Instagram's verified badge (as Instagram serves it on the comment). Free when it leaves a comment out.",
            "default": false
          },
          "excludePostOwnerComments": {
            "title": "Leave out the post owner's comments",
            "type": "boolean",
            "description": "Leave out the comments of the post's owner (and its coauthors), told by the owner's id from the post. Free when it leaves a comment out.",
            "default": false
          },
          "maxItems": {
            "title": "Max comments (whole run)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "The most charged rows (comments) of the whole run, over every post and profile; 0 = no cap beyond `maxCommentsPerPost` and your charge limit. Posts are read side by side, so a cap under what they hold is shared as their comments arrive; each post's row says RUN_CAP or not_read.",
            "default": 0
          },
          "feedback": {
            "title": "Feedback to the maintainers",
            "maxLength": 2000,
            "type": "string",
            "description": "A note to the people who maintain this Actor: what you needed and did not get. For example a missing field, a wrong or empty result, or the Actor you switch from or to, and why. The run does not read it: the rows and the charges stay the same. A person reads every note."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}