{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Comments Scraper with Replies — CSV Export, No Login",
    "description": "Instagram comments scraper: export Instagram comments to CSV, JSON or Excel from any public post or reel — comment text, author, likes, reply threads, @mentions and #hashtags, optional comment likers, no duplicates, no login. Filter by comment date; only new comments on repeat runs.",
    "version": "0.0",
    "x-build-id": "qG47yTSOFiKlXPvm3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/afanasenko~instagram-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-afanasenko-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/afanasenko~instagram-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-afanasenko-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/afanasenko~instagram-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-afanasenko-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 Links",
            "type": "array",
            "description": "Instagram post or reel links, one per line — e.g. https://www.instagram.com/p/CA2aJYrg6cZ/. Reel links work too. A link that is not a post link, a deleted post, and a post inside a private account cannot be read — each one comes back as its own free row naming the link and why. Leave empty to run a small demo on a public post.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post (cost control)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cost ceiling per post — each comment returned is one paid event, and a reply is a comment. A post with 30,000 comments costs 30,000 events unless you cap it here. 0 = no cap, paid plans only. Free plan ceiling: 50 comments per run, from up to 3 post links. Default 1000.",
            "default": 1000
          },
          "includeReplies": {
            "title": "Include reply threads",
            "type": "boolean",
            "description": "Read the replies under each comment and return them as their own rows, marked as replies and carrying the comment they answer. Replies are billed like any other comment. Posts with reply threading switched off are detected before any reply call is made, so this costs nothing on them.",
            "default": true
          },
          "includeCommentLikers": {
            "title": "Include who liked each comment",
            "type": "boolean",
            "description": "Add the accounts that liked each comment. This is a separate, cheaper paid event and is off by default because it multiplies the work: a post with 1,000 comments means up to 1,000 extra lookups. Posts with comment likes switched off are detected first and cost nothing.",
            "default": false
          },
          "maxLikersPerComment": {
            "title": "Max likers per comment",
            "minimum": 0,
            "type": "integer",
            "description": "How deep to read each comment's liker list. Instagram serves them 50 at a time. Only used when the option above is on. Default 50.",
            "default": 50
          },
          "postedAfter": {
            "title": "Only comments posted on or after",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[0-2]\\d:[0-5]\\d(:[0-5]\\d)?(\\.\\d+)?Z?)?$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Keep only comments (and replies) posted on or after this moment, by the comment's own time in UTC. A date such as 2026-10-01 means from the start of that day; a span such as \"7 days\" or \"3 weeks\" counts back from when the run starts. Comments outside the range are read past and not charged, and do not count toward \"Max comments per post\". Leave empty for no start date."
          },
          "postedBefore": {
            "title": "Only comments posted on or before",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[0-2]\\d:[0-5]\\d(:[0-5]\\d)?(\\.\\d+)?Z?)?$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Keep only comments posted on or before this moment, UTC. A date such as 2026-10-31 includes the whole of that day; a span such as \"1 week\" counts back from when the run starts. A reply is only looked for under a comment inside the range. Leave empty for no end date."
          },
          "skipDelivered": {
            "title": "Skip comments already delivered to you",
            "enum": [
              "off",
              "7",
              "30",
              "90",
              "180",
              "365",
              "forever"
            ],
            "type": "string",
            "description": "Leave out comments and replies this Actor already delivered to your Apify account in an earlier run. Skipped comments are not charged and do not count toward \"Max comments per post\"; the run reads on for new ones. A new reply under a comment you have still comes back. From the API: any number of days, e.g. \"45\". The record is a key-value store named ig-delivered-… in your Storage; delete it to start over. Runs that overlap in time may still share a comment.",
            "default": "off"
          },
          "clearSavedData": {
            "title": "Start a Fresh Run",
            "type": "boolean",
            "description": "Check this to clear saved data from previous runs and start clean. Uncheck to resume a previous run from where it left off.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}