{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Comments Analyzer: Buyer Intent & Comment Leads",
    "description": "Finds buyers in Instagram, TikTok and YouTube comment rows (scraper dataset, CSV or Sheet): price asks, where to buy, sizes, stock, complaints, product requests, 6 languages, unanswered first. Per comment. MCP, x402.",
    "version": "0.1",
    "x-build-id": "Lh3P4oQGQghOlBGNQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nerolabs~instagram-comments-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nerolabs-instagram-comments-analyzer",
        "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/nerolabs~instagram-comments-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-nerolabs-instagram-comments-analyzer",
        "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/nerolabs~instagram-comments-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-nerolabs-instagram-comments-analyzer",
        "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": {
          "datasetIds": {
            "title": "Datasets",
            "type": "array",
            "description": "One or more comment datasets: apify/instagram-comment-scraper (the biggest), clockworks/tiktok-comments-scraper, streamers/youtube-comments-scraper and look-alikes. Nested replies are read too. In a scraper's Integrations tab, set this to {{resource.defaultDatasetId}}."
          },
          "fileUrl": {
            "title": "File or Google Sheet URL",
            "type": "string",
            "description": "A public link to a CSV, Excel, JSON or JSON Lines file of comment rows, or your own sheet with a text (or comment) column and optional username, likes and post URL columns. Google Sheets share links work (set 'Anyone with the link can view')."
          },
          "fileFormat": {
            "title": "File format",
            "enum": [
              "auto",
              "csv",
              "tsv",
              "json",
              "jsonl",
              "xlsx"
            ],
            "type": "string",
            "description": "Leave on 'Detect automatically' unless the link has no file extension.",
            "default": "auto"
          },
          "sheetName": {
            "title": "Excel sheet name",
            "type": "string",
            "description": "Which sheet to read from an Excel workbook. Defaults to the first sheet."
          },
          "data": {
            "title": "Comment rows",
            "type": "array",
            "description": "Rows as JSON objects, for a quick run or an AI agent call, e.g. [{\"text\": \"how much is this?\", \"ownerUsername\": \"jane\", \"likesCount\": 4, \"postUrl\": \"https://www.instagram.com/p/abc/\"}]. Scraper rows can be passed as they are."
          },
          "outputMode": {
            "title": "What to return",
            "enum": [
              "leads",
              "all"
            ],
            "type": "string",
            "description": "Buyer leads (default): only comments with buying intent, ranked unanswered first, then by intent score and likes. Every comment: all comments with your columns kept plus intent_tags, intent_score, intent_answered and intent_reply_tip. Either way the summary, top complaints, product requests and per post stats go to the OUTPUT record.",
            "default": "leads"
          },
          "ownerUsernames": {
            "title": "Account owner usernames",
            "type": "array",
            "description": "The brand's own handle(s), e.g. yourshop. Their comments are skipped and free, and a comment they replied under counts as answered. Without it, answered is only known from author-liked, pinned or hearted flags in the rows.",
            "items": {
              "type": "string"
            }
          },
          "minIntent": {
            "title": "Minimum intent score for a lead",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "A price ask, where to buy or wants it scores 3; size, stock or shipping 2; a product request 1; likes add up to 2. 2 is the default; 3 keeps only strong buyers.",
            "default": 2
          },
          "requiredTags": {
            "title": "Must have all these tags",
            "type": "array",
            "description": "Keep only rows that carry every tag picked. Filtering does not change the charge (every comment read is analyzed).",
            "items": {
              "type": "string",
              "enum": [
                "price",
                "where_to_buy",
                "wants_it",
                "size_fit",
                "stock_shipping",
                "product_request",
                "complaint",
                "question",
                "collab_ask",
                "spam",
                "praise"
              ],
              "enumTitles": [
                "Price ask",
                "Where to buy or link ask",
                "Wants it or ordering",
                "Size or fit",
                "Stock or shipping",
                "Product request (restock, bring back, make it in)",
                "Complaint",
                "Question",
                "Collab ask",
                "Spam",
                "Praise"
              ]
            }
          },
          "onlyUnanswered": {
            "title": "Only unanswered",
            "type": "boolean",
            "description": "Keep only comments the account owner has not answered. Needs 'Account owner usernames' and scraped replies (or author-liked flags).",
            "default": false
          },
          "hideUsernames": {
            "title": "Hide usernames",
            "type": "boolean",
            "description": "Leave commenter usernames and profile pictures out of the results, for reports you share.",
            "default": false
          },
          "extraKeywords": {
            "title": "Extra keywords per tag",
            "type": "object",
            "description": "Your own words added to the rules, e.g. {\"where_to_buy\": [\"dm price\"], \"product_request\": [\"vegan version\"]}. Keys are the tag names: price, where_to_buy, wants_it, size_fit, stock_shipping, product_request, complaint, question, collab_ask, spam, praise."
          },
          "maxItems": {
            "title": "Max rows to read",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Safety cap on top-level rows read from the input (each with its nested replies).",
            "default": 200000
          },
          "exportFormats": {
            "title": "Also save as a file",
            "type": "array",
            "description": "Also save the results as CSV and/or Excel in the run's key-value store (charged once per file).",
            "items": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx"
              ],
              "enumTitles": [
                "CSV",
                "Excel (xlsx)"
              ]
            }
          },
          "outputDatasetName": {
            "title": "Also append to a named dataset",
            "type": "string",
            "description": "Also append the rows to a named dataset, for example to build a lead list across runs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}