{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu RedNote Scraper ($1.50/1k) 小红书",
    "description": "⚡ Fast ($1.50/1k, 0 Cookies): Scrape Xiaohongshu (RedNote) keyword search, 1,000+ comments, bare URLs & KOL profiles. Export 13 trend feeds, 1080p live streams, HD photos, MP4s & engagement in clean Excel/JSON.",
    "version": "2.0",
    "x-build-id": "tnWgJEyf5151DztG9"
  },
  "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": [
              "search",
              "trending",
              "live",
              "creatorLeads",
              "creators",
              "comments",
              "notes",
              "all"
            ],
            "type": "string",
            "description": "Select your scraping workflow. Tip: Pasting Direct URLs or switching modes automatically overrides the demo keyword below.",
            "default": "search"
          },
          "keywords": {
            "title": "Search Keywords",
            "type": "array",
            "description": "Enter one or more RedNote / Xiaohongshu search queries (e.g. 'Lululemon', '京都旅游攻略', '星巴克新品', 'OOTD').",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Search Sort Order (For Keyword Search)",
            "enum": [
              "popularity_descending",
              "general",
              "time_descending"
            ],
            "type": "string",
            "description": "Sort keyword search results by Most Popular (likes/engagement), Relevance, or Newest.",
            "default": "popularity_descending"
          },
          "noteType": {
            "title": "Post Format Filter (For Keyword Search)",
            "enum": [
              "all",
              "video_only",
              "image_only"
            ],
            "type": "string",
            "description": "Filter keyword search results by post format (All Posts, Video Posts Only, or Image/Carousel Posts Only).",
            "default": "all"
          },
          "channels": {
            "title": "Category Feeds",
            "type": "array",
            "description": "Choose categories to scrape for Trending Notes, KOL Lead Discovery, or Category Comment Sweeps (defaults to Recommended / 推荐 if left empty in Trending mode).",
            "items": {
              "type": "string",
              "enum": [
                "homefeed_recommend",
                "homefeed.fashion_v3",
                "homefeed.food_v3",
                "homefeed.cosmetics_v3",
                "homefeed.movie_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",
                "homefeed.kpop_v3",
                "homefeed.pet",
                "homefeed.video_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 (科技数码)",
                "🎤 K-Pop & Celebrities (韩流娱乐)",
                "🐾 Pets & Animals (萌宠)",
                "🎬 Trending Videos (热门视频)"
              ]
            }
          },
          "startUrls": {
            "title": "Direct URLs or 24-Char IDs (Posts, Creator Profiles, or Live Rooms)",
            "type": "array",
            "description": "Smart URL box: Paste RedNote / Xiaohongshu Post URLs (zero xsec_token required), Creator Profile URLs, 24-character hex IDs, or Live Stream URLs. Automatically detects the URL type and overrides the demo keyword.",
            "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": "Full Detail Enrichment (Full Caption, Carousel Gallery, IP Region & Tags)",
            "type": "boolean",
            "description": "When enabled (default), hydrates full untruncated caption, multi-image HD carousel gallery, IP region, hashtags, and MP4 video (billed as note-detail: $2.50/1k Gold+, $3.50/1k Free — replaces base note event). Disable for fast summary cards ($1.50/1k Gold+, $2.20/1k Free).",
            "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. Each unique enriched author bills 1 profile event.",
            "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 public portfolio notes (up to ~30 recent notes).",
            "default": true
          },
          "maxNotesPerCreator": {
            "title": "Max Portfolio Notes Per Creator",
            "minimum": 1,
            "maximum": 35,
            "type": "integer",
            "description": "Maximum recent public portfolio notes to extract per creator (up to 35).",
            "default": 15
          },
          "maxCommentsPerNote": {
            "title": "Max Comments Per Note (Enables Deep Comment Extraction When > 0)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum comments & top inline replies to extract per note (paginates 250–1,000+ main comments + up to 3 top replies per comment with zero login; in Comments mode, defaults to 100 if left at 0).",
            "default": 0
          },
          "includeSubComments": {
            "title": "Include Top Inline Replies (Sub-Comments)",
            "type": "boolean",
            "description": "Include top inline replies attached under each main comment (up to 3 top replies per comment without login).",
            "default": true
          },
          "maxSubCommentsPerComment": {
            "title": "Max Top Replies Per Main Comment",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Maximum top inline replies to include per main comment (1–3).",
            "default": 3
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}