{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu Topic Semantic & Content Opportunity Radar",
    "description": "Turn RedNote topic searches into related terms, semantic clusters, trend velocity, brand penetration, top and latest content, and evidence-linked content whitespace.",
    "version": "0.1",
    "x-build-id": "jHQg5tN5Y3qrt0rJg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrupulous_buckler~xiaohongshu-topic-semantic-content-opportunity-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrupulous_buckler-xiaohongshu-topic-semantic-content-opportunity-radar",
        "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-topic-semantic-content-opportunity-radar/runs": {
      "post": {
        "operationId": "runs-sync-scrupulous_buckler-xiaohongshu-topic-semantic-content-opportunity-radar",
        "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-topic-semantic-content-opportunity-radar/run-sync": {
      "post": {
        "operationId": "run-sync-scrupulous_buckler-xiaohongshu-topic-semantic-content-opportunity-radar",
        "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",
              "uploadedNotes",
              "liveSearch"
            ],
            "type": "string",
            "description": "Try the demo, analyze uploaded current/previous notes without a Cookie, or search Xiaohongshu with your own session.",
            "default": "demo"
          },
          "seedTopics": {
            "title": "Seed topics (maximum 5)",
            "type": "array",
            "description": "The product, need, scenario, problem, or category topics to map. Required outside demo mode.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "brandKeywords": {
            "title": "Brands to measure",
            "type": "array",
            "description": "Optional brand and competitor terms used to calculate post and engagement penetration.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "relatedKeywords": {
            "title": "Related terms to track",
            "type": "array",
            "description": "Optional concerns, use cases, attributes, formats, or decision terms to measure alongside discovered hashtags and semantic cues.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "customClusters": {
            "title": "Optional custom semantic clusters",
            "type": "array",
            "description": "JSON objects such as {\"name\":\"diabetes-diet\",\"keywords\":[\"控糖饮食\",\"升糖\",\"主食\"]}.",
            "default": []
          },
          "uploadedNotes": {
            "title": "Current post sample",
            "type": "array",
            "description": "For uploaded mode: current Xiaohongshu post objects. Common field names and nested note_card shapes are normalized.",
            "default": []
          },
          "previousNotes": {
            "title": "Optional previous post sample",
            "type": "array",
            "description": "Older comparable posts for immediate growth calculations. Otherwise the last successful run with the same monitor key is used.",
            "default": []
          },
          "cookie": {
            "title": "Xiaohongshu Cookie (secret)",
            "type": "string",
            "description": "Required only for live search. Never included in logs or output."
          },
          "monitorKey": {
            "title": "Stable monitor name",
            "type": "string",
            "description": "Reuse a stable name such as diabetes-content-cn for scheduled comparisons."
          },
          "rememberBaseline": {
            "title": "Remember this run as the next baseline",
            "type": "boolean",
            "description": "Stores a compact private aggregate snapshot for the next run with the same monitor key.",
            "default": true
          },
          "resetBaseline": {
            "title": "Ignore the saved baseline this time",
            "type": "boolean",
            "description": "Start a new comparison series and save this successful run as the next baseline.",
            "default": false
          },
          "maxPostsPerTopic": {
            "title": "Posts per seed topic",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum search results requested for each seed topic, subject to the 100-post report cap.",
            "default": 20
          },
          "maxTotalPosts": {
            "title": "Total posts (maximum 100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "One $4.99 report analyzes up to 100 unique posts.",
            "default": 100
          },
          "includeSourcePosts": {
            "title": "Include normalized source evidence",
            "type": "boolean",
            "description": "Include the annotated posts behind every topic, trend, brand, and opportunity finding.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is recommended for live authenticated search.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}