{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu Brand Mentions, UGC & Seeding Monitor",
    "description": "Monitor Xiaohongshu and RedNote brand mentions, competitors, organic UGC creators, suspected collaborations, engagement changes, and abnormal growth.",
    "version": "0.1",
    "x-build-id": "jB1dTUXHutJmXYJGP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrupulous_buckler~xiaohongshu-brand-mentions-ugc-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrupulous_buckler-xiaohongshu-brand-mentions-ugc-monitor",
        "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-brand-mentions-ugc-monitor/runs": {
      "post": {
        "operationId": "runs-sync-scrupulous_buckler-xiaohongshu-brand-mentions-ugc-monitor",
        "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-brand-mentions-ugc-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-scrupulous_buckler-xiaohongshu-brand-mentions-ugc-monitor",
        "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 no-Cookie demo, analyze an existing export, or search Xiaohongshu with your own session Cookie.",
            "default": "demo"
          },
          "brandKeywords": {
            "title": "Your brand and product keywords",
            "type": "array",
            "description": "Required outside demo mode. Include brand names, product lines, common Chinese names, and distinctive abbreviations.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "competitorKeywords": {
            "title": "Competitor brands and products",
            "type": "array",
            "description": "Competitor names used for share-of-voice and comparison monitoring.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categoryKeywords": {
            "title": "Category and use-case keywords",
            "type": "array",
            "description": "Category, problem, ingredient, scenario, or hashtag terms that reveal adjacent conversations.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "uploadedNotes": {
            "title": "Current Xiaohongshu note data",
            "type": "array",
            "description": "Paste JSON exported from a compatible Xiaohongshu search or note Actor. Common note, author, hashtag, and engagement fields are normalized automatically.",
            "default": []
          },
          "previousSnapshot": {
            "title": "Optional previous note data",
            "type": "array",
            "description": "Optional older export for immediate before/after comparison. Otherwise the Actor remembers the last successful run for the same monitor key.",
            "default": []
          },
          "cookie": {
            "title": "Xiaohongshu Cookie (secret)",
            "type": "string",
            "description": "Required only for live search. Stored as a secret input and never written to output or logs."
          },
          "monitorKey": {
            "title": "Stable monitor name",
            "type": "string",
            "description": "Optional identifier such as brand-a-cn. Reuse it on scheduled runs to compare with the same saved baseline."
          },
          "rememberBaseline": {
            "title": "Remember this run as the next baseline",
            "type": "boolean",
            "description": "Stores a compact private snapshot in the run owner's default key-value store for the next run.",
            "default": true
          },
          "resetBaseline": {
            "title": "Ignore the saved baseline this time",
            "type": "boolean",
            "description": "Start a new comparison series while still saving this successful run as the next baseline.",
            "default": false
          },
          "maxPostsPerKeyword": {
            "title": "Posts per live-search keyword",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum posts requested for each keyword before de-duplication.",
            "default": 20
          },
          "maxTotalPosts": {
            "title": "Posts to monitor (maximum 100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "One $4.99 report analyzes up to 100 unique posts across all supplied brand, competitor, and category keywords.",
            "default": 100
          },
          "growthThresholdPercent": {
            "title": "Mention-spike threshold",
            "minimum": 20,
            "maximum": 1000,
            "type": "integer",
            "description": "Flag a mention-volume anomaly when matched post count grows by at least this percentage versus the prior snapshot.",
            "default": 100
          },
          "maxCreators": {
            "title": "Creators in leaderboard",
            "minimum": 5,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum UGC and suspected-collaboration creators included in the ranked creator table.",
            "default": 25
          },
          "includeSourcePosts": {
            "title": "Include evidence posts in output",
            "type": "boolean",
            "description": "Include normalized evidence rows with URLs, authors, metrics, matched keywords, and classification reasons.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is recommended for live authenticated collection.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}