{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Comments Scraper - Export Post & Reel Comments",
    "description": "Instagram comments scraper: export the comments and replies on a public post or reel. Every row has the author's username and name, the text, the time, likes, reply count and the verified flag; GIF comments come with a title and link. One run reads the top 75 to 150 rows. $0.40 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "QWLg8SeVPK7KsjHmP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~instagram-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-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/dami_studio~instagram-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-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/dami_studio~instagram-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-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 URLs",
            "type": "array",
            "description": "Instagram post or reel URLs to read comments from. Links copied from a profile, with the account name in front, work too. Paste as many as you like, one per line.",
            "items": {
              "type": "string"
            }
          },
          "shortcodes": {
            "title": "Shortcodes",
            "type": "array",
            "description": "Or bare post shortcodes, the part of the URL after /p/ or /reel/, or numeric post ids.",
            "items": {
              "type": "string"
            }
          },
          "maxComments": {
            "title": "Max comments",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "How many comment rows to return in total, up to 2,000, spread evenly across the posts you gave. Replies that Instagram returns alongside a comment are delivered as their own rows, marked `isReply`, and count towards this number. You are charged per comment row returned. Rows come from the top of each thread down, in Instagram's order. If a run stops short it says so in a free row rather than pretending it finished.",
            "default": 100
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post (optional)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Leave empty to split Max comments evenly across your posts. Set it to read up to this many rows from every post instead, replies included. Max comments still caps the run as a whole, so raise it too: for 10 posts at 100 each, set Max comments to 1,000."
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "On by default: replies that Instagram returns alongside a comment come back as their own rows, marked `isReply`. Turn it off to get top-level comments only. The replies are then neither delivered nor charged.",
            "default": true
          },
          "includeAllReplies": {
            "title": "Every reply, not just the ones Instagram shows",
            "type": "boolean",
            "description": "Off by default. When on, the run also reads the replies Instagram does not show alongside a comment, for comments with at least three more. Each reply is a row, billed like a comment, and counts towards Max comments. Needs Include replies on. Not used when you supply account cookies.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment (optional)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Only with every reply on. At most this many replies under each comment, the ones Instagram shows included. Leave empty for no limit per comment."
          },
          "includeProfilePicUrl": {
            "title": "Commenter's picture link",
            "type": "boolean",
            "description": "Off by default. When on, each row carries `ownerProfilePicUrl`, a link to the commenter's profile picture as Instagram hosts it. The run never downloads or keeps the picture, and the link stops working after a while.",
            "default": false
          },
          "notionConnector": {
            "title": "Notion connector ID (optional)",
            "type": "string",
            "description": "Optional Notion delivery."
          },
          "notionParentId": {
            "title": "Notion data-source ID (optional)",
            "type": "string",
            "description": "Optional Notion data-source id."
          },
          "notionMaxRows": {
            "title": "Notion row limit (optional)",
            "minimum": 1,
            "type": "integer",
            "description": "Leave empty to send every comment to Notion. Set it to send only the first this many rows; the dataset still gets them all."
          },
          "sessionCookies": {
            "title": "Account cookies (not needed)",
            "type": "array",
            "description": "Optional: your own session, used only for your run. You are responsible for using it within the site's terms. Runs work without it."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional, and normally not needed. If you want the run to go out through YOUR own proxy servers, put them in proxyUrls, they are used exactly as given."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}