{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu (RedNote) Scraper: Search & Trends 小红书 XHS",
    "description": "⚡ $1.50/1k, No Login: Scrape 300+ keyword search notes, bare URLs (no xsec_token), 13 trend feeds & 1080p live streams. Export HD photos, MP4 links, author stats & hashtags for 小红书 / XHS.",
    "version": "1.3",
    "x-build-id": "1LS7X22gLJfalMUH1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/unitbytes~xiaohongshu-rednote-trend-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-unitbytes-xiaohongshu-rednote-trend-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-rednote-trend-scraper/runs": {
      "post": {
        "operationId": "runs-sync-unitbytes-xiaohongshu-rednote-trend-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-rednote-trend-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-unitbytes-xiaohongshu-rednote-trend-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",
              "notes",
              "live"
            ],
            "type": "string",
            "description": "Select what to extract. Tip: Pasting Direct Post / Live 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 when Mode = Trending Category Feeds (defaults to Recommended / 推荐 if left empty).",
            "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 Post URLs, 24-Char Note IDs, or Live URLs",
            "type": "array",
            "description": "Paste RedNote / Xiaohongshu Post URLs (works with bare URLs, 24-character hex Note IDs, or xhslink.com share links — zero xsec_token required) or Live Room URLs (xiaohongshu.com/livelist?...). Automatically 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 or live stream rooms to extract.",
            "default": 30
          },
          "enrichDetails": {
            "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 with Author KOL Profile (Followers, RedID & Bio)",
            "type": "boolean",
            "description": "When enabled, also enriches 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
          },
          "liveCategories": {
            "title": "Live Stream Categories",
            "type": "array",
            "description": "Leave empty to scrape All Live Streams automatically when Mode = Active Live Streams, or pick 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}