{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Comment Actions – Like & Reply",
    "description": "Automate replies and likes on Instagram comments with your own account. For each action: like a comment, reply to it, and/or like the post. Bring your own login (cookies). Safe by default: dry-run mode validates everything before any write.",
    "version": "0.1",
    "x-build-id": "1vykEIYRis4vzbnHV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_nerd~instagram-comment-action-actor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_nerd-instagram-comment-action-actor",
        "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/automation_nerd~instagram-comment-action-actor/runs": {
      "post": {
        "operationId": "runs-sync-automation_nerd-instagram-comment-action-actor",
        "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/automation_nerd~instagram-comment-action-actor/run-sync": {
      "post": {
        "operationId": "run-sync-automation_nerd-instagram-comment-action-actor",
        "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": [
          "cookies",
          "actions"
        ],
        "properties": {
          "cookies": {
            "title": "Instagram cookies (BYO login)",
            "type": "string",
            "description": "Your own Instagram web session — this Actor acts AS this account, so use one you control. Three accepted formats: (1) the JSON export from the Cookie-Editor browser extension while on instagram.com [recommended — one click 'Export']; (2) a cookie header string like 'sessionid=...; csrftoken=...; ds_user_id=...'; (3) just your 'sessionid' value (ds_user_id is derived automatically). Secret field: Apify stores it encrypted and never shows it in the log, input or dataset. Log out to invalidate the session anytime."
          },
          "actions": {
            "title": "Actions",
            "type": "array",
            "description": "List of actions. Each item targets one comment/post and can like the comment, reply to it and/or like the post. 'commentId' is required for 'likeComment' and 'reply'; 'postUrl' is required for 'reply' and 'likePost'. Optional 'username' = the comment author's handle (used to prefix '@username' when Mention user is on). Get 'commentId' and 'username' from the Instagram Post Engagement Scraper ('comments[].id' and 'comments[].username')."
          },
          "mentionUser": {
            "title": "Mention the user in replies",
            "type": "boolean",
            "description": "When ON, each reply is prefixed with '@<username> ' using the action's 'username' field (the comment author's handle). Actions without a 'username' are replied to without a mention.",
            "default": false
          },
          "dryRun": {
            "title": "Dry run (no writes) — safety default ON",
            "type": "boolean",
            "description": "When ON (default), the Actor validates your cookies and every action and reports what it WOULD do, but sends NO like/reply requests and charges nothing. Set to false ONLY when you are ready to actually perform the actions on your account.",
            "default": true
          },
          "likeCommentDocId": {
            "title": "Like-comment GraphQL doc_id (advanced)",
            "type": "string",
            "description": "Advanced/optional. Comment-liking uses a GraphQL mutation (PolarisCommentActionsLikeMutation) whose numeric doc_id Instagram rotates every few weeks. Leave empty to use the built-in default. If comment-likes start failing, capture a fresh doc_id from the browser Network tab (x-fb-friendly-name = PolarisCommentActionsLikeMutation) and paste it here."
          },
          "likePostDocId": {
            "title": "Like-post GraphQL doc_id (advanced)",
            "type": "string",
            "description": "Advanced/optional. Post-liking uses a GraphQL mutation (usePolarisLikeMediaXIGLikeMutation) with a rotating doc_id. Leave empty for the built-in default; override with a fresh one from the Network tab if post-likes start failing."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Recommended: Apify Residential proxy in the SAME country your account normally logs in from. Logging actions in from an unexpected datacenter IP raises Instagram's risk flags. Leave off only for quick local tests.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency (parallel actions)",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Keep this LOW. Writing actions (likes/replies) in parallel from one account looks automated and increases the risk of action blocks. 1 is safest.",
            "default": 1
          },
          "delayBetweenActionsMs": {
            "title": "Delay between actions (ms)",
            "minimum": 0,
            "maximum": 120000,
            "type": "integer",
            "description": "Pause between actions to mimic human pacing and stay under Instagram's rate limits. A few seconds is recommended for anything beyond a handful of actions.",
            "default": 4000
          },
          "maxRequestRetries": {
            "title": "Max retries per action",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "How often to retry an action on a transient error (rate limit / 5xx / connection). Action blocks and auth errors are not retried.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}