{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu (RedNote / 小红书) Scraper: Trends, Live & KOLs",
    "description": "The complete Xiaohongshu (RedNote / 小红书 / XHS) scraper on Apify. Extract trending category feeds, active live streams & e-commerce chat, creator & KOL leads, comments, and watermark-free HD photos & MP4 videos. 100% cookie-free. MCP & AI Agent ready.",
    "version": "2.0",
    "x-build-id": "CwdghEasOkF0XVTGD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/unitbytes~xiaohongshu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-unitbytes-xiaohongshu-scraper",
        "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/unitbytes~xiaohongshu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-unitbytes-xiaohongshu-scraper",
        "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/unitbytes~xiaohongshu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-unitbytes-xiaohongshu-scraper",
        "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": "Scraping Mode",
            "enum": [
              "trending",
              "live",
              "creatorLeads",
              "creators",
              "comments",
              "notes",
              "all"
            ],
            "type": "string",
            "description": "Select your scraping workflow. Tip: If you paste Note, Creator, or Live URLs into 'Direct URLs' below, the router automatically detects the URL type even if you leave this dropdown unchanged.",
            "default": "trending"
          },
          "channels": {
            "title": "Category Feeds",
            "type": "array",
            "description": "Choose categories to scrape for Trending Notes, KOL Lead Discovery, or Category Comment Sweeps.",
            "items": {
              "type": "string",
              "enum": [
                "homefeed_recommend",
                "homefeed.fashion_v3",
                "homefeed.food_v3",
                "homefeed.cosmetics_v3",
                "homefeed.movies_and_tv_v3",
                "homefeed.career_v3",
                "homefeed.love_v3",
                "homefeed.household_product_v3",
                "homefeed.gaming_v3",
                "homefeed.travel_v3",
                "homefeed.fitness_v3",
                "homefeed.baby_v3",
                "homefeed.tech_v3"
              ],
              "enumTitles": [
                "✨ Recommended (For You / 推荐)",
                "👗 Fashion & OOTD (穿搭)",
                "🍜 Food & Dining (美食)",
                "💄 Beauty & Skincare (彩妆护肤)",
                "🎬 Movies & TV (影视)",
                "💼 Career & Workplace (职场)",
                "💕 Relationships (情感)",
                "🏠 Home & Decor (家居)",
                "🎮 Gaming (游戏)",
                "✈️ Travel & Destinations (旅行)",
                "💪 Fitness & Health (健身)",
                "👶 Parenting & Baby (母婴)",
                "📱 Tech & Digital (科技数码)"
              ]
            }
          },
          "startUrls": {
            "title": "Direct URLs (Note Share Links, Creator Profile URLs, or Live Links)",
            "type": "array",
            "description": "Smart URL box: Paste Note Share Links, Creator Profile URLs, 24-character hex User IDs, or Live Stream URLs. Automatically detects the URL type and overrides the default category feed.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of notes, live rooms, or items to extract.",
            "default": 30
          },
          "enrichNoteDetails": {
            "title": "Fetch Full Note Detail, Hashtags & HD Video/Images",
            "type": "boolean",
            "description": "Fetch full post body text, hashtags, exact timestamps, IP location, and watermark-free HD images / .mp4 video URLs.",
            "default": true
          },
          "includeAuthorProfile": {
            "title": "Enrich Notes / Live Rooms with Author KOL Profile",
            "type": "boolean",
            "description": "Also enrich each note or live room with the creator's follower count, total likes/collects, Red ID, and bio.",
            "default": false
          },
          "maxCreators": {
            "title": "Max Creators (In Creator / KOL Leads Mode)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of unique creators to extract when scraping Creator Profiles or KOL Leads.",
            "default": 15
          },
          "scrapePortfolio": {
            "title": "Include Creator's Recent Portfolio Notes (In Creator Mode)",
            "type": "boolean",
            "description": "When scraping specific Creator Profiles, also extract their recent portfolio notes (up to ~30 recent notes via public SSR).",
            "default": true
          },
          "maxNotesPerCreator": {
            "title": "Max Portfolio Notes Per Creator",
            "minimum": 1,
            "maximum": 35,
            "type": "integer",
            "description": "Maximum recent portfolio notes to extract per creator (up to 35 via public SSR).",
            "default": 15
          },
          "maxCommentsPerNote": {
            "title": "Max Comments Per Note (In Comments / Full Pipeline Mode)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum top comments & replies to extract per note (in Comments mode, automatically defaults to 20 if left at 0).",
            "default": 0
          },
          "liveCategories": {
            "title": "Live Stream Categories",
            "type": "array",
            "description": "Leave empty to scrape All Live Streams automatically when Mode = Active Live Streams, or select specific live channels.",
            "items": {
              "type": "string",
              "enum": [
                "0",
                "1",
                "2",
                "3",
                "4",
                "5",
                "6"
              ],
              "enumTitles": [
                "🔥 All Live Streams (全部 / All)",
                "🎮 Gaming (游戏)",
                "💃 Talent & Beauty (才艺颜值)",
                "🏠 Lifestyle (生活分享)",
                "🎨 Crafts & Hobbies (兴趣手工)",
                "📈 Tech & Finance (科技财经)",
                "💪 Sports & Outdoors (运动户外)"
              ]
            }
          },
          "onlyEcommerceLive": {
            "title": "Only E-Commerce Live Rooms (hasGoods = true)",
            "type": "boolean",
            "description": "In Live Streams mode, filter to only keep live rooms with an active shopping cart (带货直播).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Xiaohongshu requires Residential proxies (Hong Kong recommended).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "HK"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}