{
  "openapi": "3.0.1",
  "info": {
    "title": "WeChat Official Account Comment Sentiment & Consumer Insights",
    "description": "Turn WeChat Official Account article comments into sentiment, recurring questions, needs, objections, purchase signals, supplied brand and competitor mentions, evidence quotes, and content opportunities.",
    "version": "0.1",
    "x-build-id": "mnxJKRp0EvSaVkjne"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrupulous_buckler~wechat-official-account-comment-sentiment-consumer-insights/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrupulous_buckler-wechat-official-account-comment-sentiment-consumer-insights",
        "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/scrupulous_buckler~wechat-official-account-comment-sentiment-consumer-insights/runs": {
      "post": {
        "operationId": "runs-sync-scrupulous_buckler-wechat-official-account-comment-sentiment-consumer-insights",
        "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/scrupulous_buckler~wechat-official-account-comment-sentiment-consumer-insights/run-sync": {
      "post": {
        "operationId": "run-sync-scrupulous_buckler-wechat-official-account-comment-sentiment-consumer-insights",
        "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": {
          "mode": {
            "title": "Data source",
            "enum": [
              "demo",
              "liveArticleComments",
              "datasetComments",
              "uploadedComments"
            ],
            "type": "string",
            "description": "Run the example, collect public comments from article URLs, analyze Apify Datasets, or paste comments.",
            "default": "demo"
          },
          "articleUrls": {
            "title": "WeChat Official Account article URLs",
            "type": "array",
            "description": "One to ten public mp.weixin.qq.com article links. Used only in live mode.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "datasetId": {
            "title": "Primary comments Dataset ID",
            "type": "string",
            "description": "Dataset from a WeChat Official Account scraper or another compatible export.",
            "default": ""
          },
          "sourceDatasetIds": {
            "title": "Additional comment Dataset IDs",
            "type": "array",
            "description": "Optional additional Apify Datasets containing article comments or replies.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "uploadedComments": {
            "title": "Uploaded comments",
            "type": "array",
            "description": "Paste strings or JSON records. Common comment, author, likes, article, publisher and reply fields are recognized.",
            "default": []
          },
          "topic": {
            "title": "Research topic",
            "type": "string",
            "description": "Product, campaign, category or reader question used to label the report.",
            "default": "WeChat Official Account reader discussion"
          },
          "commentKeywords": {
            "title": "Keywords to measure inside comments",
            "type": "array",
            "description": "Examples: price, side effects, where to buy, product names, campaign phrases or use cases.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "requireKeywordMatch": {
            "title": "Analyze only comments matching a keyword",
            "type": "boolean",
            "description": "Off by default so surrounding conversation context is preserved.",
            "default": false
          },
          "knownEntities": {
            "title": "Brands, products and other exact names",
            "type": "array",
            "description": "Exact names to measure. The Actor does not automatically discover every possible brand.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "competitorNames": {
            "title": "Competitor names",
            "type": "array",
            "description": "Exact competitor brand or product names to identify and compare.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeReplies": {
            "title": "Collect reply threads in live mode",
            "type": "boolean",
            "description": "Requests replies for a limited number of comments when upstream IDs are available. Extra upstream calls may incur separate charges.",
            "default": true
          },
          "maxReplyThreads": {
            "title": "Maximum reply threads",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Limits the number of extra upstream reply-thread calls made in live mode.",
            "default": 5
          },
          "maxTotalComments": {
            "title": "Comments and replies to analyze (maximum 100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "One $4.99 report analyzes at most 100 normalized comments and replies.",
            "default": 100
          },
          "maxCommentsPerArticle": {
            "title": "Maximum top-level comments per article",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Limits top-level comment collection for each supplied article before optional replies.",
            "default": 50
          },
          "maxEvidence": {
            "title": "Maximum evidence excerpts per report section",
            "minimum": 5,
            "maximum": 100,
            "type": "integer",
            "description": "Limits auditable source-comment excerpts returned in each report section.",
            "default": 20
          },
          "maxOpportunities": {
            "title": "Maximum content opportunities",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Limits the number of evidence-linked content opportunities returned.",
            "default": 10
          },
          "regulatedTopic": {
            "title": "Health or other regulated topic",
            "type": "boolean",
            "description": "Adds risky-claim evidence and safer framing. This is a screening aid, not legal or medical approval.",
            "default": false
          },
          "includeSourceComments": {
            "title": "Keep normalized source comments inside the report",
            "type": "boolean",
            "description": "Keeps the normalized source rows embedded in the report for audit and export.",
            "default": true
          },
          "upstreamMaxChargeUsd": {
            "title": "Maximum separate upstream charge per call",
            "minimum": 0.1,
            "maximum": 20,
            "type": "number",
            "description": "Maximum allowed charge for each upstream comment/reply run. This is separate from the $4.99 analysis report.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}