{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu Comment Keyword & Consumer Voice",
    "description": "Collect or analyze Xiaohongshu/RedNote comments and turn them into evidence-linked consumer needs, concerns, competitors, alternatives, usage scenarios, sentiment, and content opportunities.",
    "version": "0.1",
    "x-build-id": "D23q5qdvRBSNBOyqP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrupulous_buckler~xiaohongshu-comment-keyword-consumer-voice/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrupulous_buckler-xiaohongshu-comment-keyword-consumer-voice",
        "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~xiaohongshu-comment-keyword-consumer-voice/runs": {
      "post": {
        "operationId": "runs-sync-scrupulous_buckler-xiaohongshu-comment-keyword-consumer-voice",
        "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~xiaohongshu-comment-keyword-consumer-voice/run-sync": {
      "post": {
        "operationId": "run-sync-scrupulous_buckler-xiaohongshu-comment-keyword-consumer-voice",
        "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": "Research mode",
            "enum": [
              "demo",
              "keywordResearch",
              "noteResearch",
              "uploadedComments"
            ],
            "type": "string",
            "description": "Try the demo, discover notes by keyword, analyze selected note URLs, or upload existing comments without a Cookie.",
            "default": "demo"
          },
          "cookie": {
            "title": "Xiaohongshu Cookie (secret)",
            "type": "string",
            "description": "Required only for live keyword or note collection. It is never included in output or logs and is not shared with other users."
          },
          "query": {
            "title": "Topic or Xiaohongshu search keyword",
            "type": "string",
            "description": "Required in keyword-research mode. Also becomes the topic name in the report."
          },
          "topic": {
            "title": "Report topic override",
            "type": "string",
            "description": "Optional clearer report title when analyzing note URLs or uploaded comments."
          },
          "noteUrls": {
            "title": "Xiaohongshu note URLs or IDs",
            "type": "array",
            "description": "Used in selected-note mode. Preserve xsec_token in shared URLs when available.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "uploadedComments": {
            "title": "Existing comment records",
            "type": "array",
            "description": "Paste strings or JSON comments from another Actor. Common text/content/comment, id/commentId, noteId, noteUrl, author and like fields are recognized.",
            "default": []
          },
          "commentKeywords": {
            "title": "Keywords to measure inside comments",
            "type": "array",
            "description": "For example: side effects, price, taste, Brand A, Brand B, ingredient names, or usage scenarios.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "requireKeywordMatch": {
            "title": "Analyze only comments matching a keyword",
            "type": "boolean",
            "description": "Off by default so surrounding consumer context is preserved. Turn on for strict comment-keyword filtering.",
            "default": false
          },
          "knownEntities": {
            "title": "Brands, products, ingredients and alternatives",
            "type": "array",
            "description": "Exact names to measure in the comments. Supplying them makes brand and product attribution more reliable.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "competitorNames": {
            "title": "Competitors to identify and compare",
            "type": "array",
            "description": "Competitor brand or product names. They are also included in known-entity analysis.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeReplies": {
            "title": "Include reply threads",
            "type": "boolean",
            "description": "Collect nested replies as well as top-level comments in live modes.",
            "default": true
          },
          "includeSourceComments": {
            "title": "Include normalized source comments in the report",
            "type": "boolean",
            "description": "Keeps the full collected sample inside the paid report for audit and export. Turn off for a smaller output row.",
            "default": true
          },
          "regulatedTopic": {
            "title": "Regulated health or other sensitive topic",
            "type": "boolean",
            "description": "Adds risky-claim evidence and safer framing. This is a screening aid, not legal or medical approval.",
            "default": false
          },
          "maxNotes": {
            "title": "Maximum notes to analyze",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum search results or supplied note URLs used for live collection.",
            "default": 10
          },
          "maxCommentsPerNote": {
            "title": "Maximum comments per note",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Includes replies when reply collection is enabled. A paid report analyzes at most 100 comments in total.",
            "default": 100
          },
          "maxTotalComments": {
            "title": "Comments to analyze (maximum 100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "One $4.99 report analyzes up to 100 comments across all selected notes.",
            "default": 100
          },
          "maxEvidence": {
            "title": "Maximum evidence excerpts per report section",
            "minimum": 5,
            "maximum": 100,
            "type": "integer",
            "description": "Limits source-linked consumer questions, comparisons and supporting comments.",
            "default": 20
          },
          "maxOpportunities": {
            "title": "Maximum content opportunities",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum number of ranked evidence-backed content directions.",
            "default": 10
          },
          "requestDelayMs": {
            "title": "Delay between comment pages",
            "minimum": 500,
            "maximum": 10000,
            "type": "integer",
            "description": "A conservative delay reduces request bursts in live collection modes.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy can improve live collection reliability for the customer's own authenticated session.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}