{
  "openapi": "3.0.1",
  "info": {
    "title": "RedNote (小红书) Scraper — Trending, Feeds, Notes · No API Key",
    "description": "Scrape RedNote / Xiaohongshu across 6 modes: trending, note_detail, user_posts, hashtag, keyword_search, topic_probe. Trending (category channels), note_detail and user_posts run cookieless; keyword/hashtag search is login-gated. Clean JSON + metrics. No API key. Pay per record.",
    "version": "0.0",
    "x-build-id": "BBueoUvcWbQpNN2qG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexgendata~rednote-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexgendata-rednote-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/nexgendata~rednote-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nexgendata-rednote-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/nexgendata~rednote-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nexgendata-rednote-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": "Scrape mode",
            "enum": [
              "trending",
              "keyword_search",
              "hashtag",
              "user_posts",
              "note_detail",
              "topic_probe"
            ],
            "type": "string",
            "description": "What to scrape. 'trending' pulls the homepage discovery feed or a category channel (no cookie needed). 'keyword_search' searches RedNote for the terms in 'keywords' (Chinese or English). 'hashtag' pulls posts for the tags in 'hashtags' (resolved through RedNote's search API). 'user_posts' pulls recent posts for each reference in 'users' (full URL, /user/profile/{id}, or bare user id). keyword_search, hashtag and user_posts REQUIRE a logged-in 'cookie' — RedNote shows a login wall to anonymous visitors in these modes and the run then fails as BLOCKED with 0 rows and 0 result charges. 'note_detail' returns the full body and engagement COUNTS for the notes in 'note_urls' (comments are count-only; comment text is not returned). 'topic_probe' is a diagnostic mode kept for compatibility: it writes to the key-value store only, 0 dataset rows, 0 result charges."
          },
          "category": {
            "title": "Explore category (trending mode)",
            "enum": [
              "recommend",
              "fashion",
              "food",
              "cosmetics",
              "movie",
              "career",
              "love",
              "home",
              "gaming",
              "travel",
              "fitness",
              "video"
            ],
            "type": "string",
            "description": "For 'trending' mode: which explore feed to pull. 'recommend' = the default mixed feed; or pick a category channel tab. Works without a cookie. If the requested category tab cannot be activated on the page, the run FAILS with 'category tab unavailable' (0 rows, 0 result charges) — it never delivers the mixed 'recommend' feed labelled as your category. Each record's 'category' field is the note's own text-classified category; the requested channel is recorded in 'query'.",
            "default": "recommend"
          },
          "cookie": {
            "title": "RedNote session cookie (REQUIRED for keyword_search / hashtag / user_posts)",
            "type": "string",
            "description": "REQUIRED for 'keyword_search', 'hashtag' and 'user_posts': RedNote serves a login wall to anonymous visitors in these modes, and without a valid logged-in cookie the run fails as BLOCKED (0 rows, 0 result charges; the Actor Start fee still applies). Optional for 'trending' and 'note_detail'. To get it: log in at xiaohongshu.com, open DevTools → Application → Cookies (or run document.cookie), and paste the full cookie string (e.g. 'a1=...; web_session=...; webId=...'). Using your own account may violate XHS Terms — use at your own risk. Treated as a secret."
          },
          "keywords": {
            "title": "Keywords (keyword_search mode)",
            "maxItems": 10,
            "type": "array",
            "description": "List of search terms for 'keyword_search' mode (max 10 per run — each keyword is a separate 60-115 s browser session, so the run's time budget is shared across them). Chinese characters give native-quality hits (e.g. ['口红', '护肤', '穿搭']); English terms work too. Requires 'cookie'. Ignored in other modes.",
            "default": [
              "护肤",
              "口红",
              "穿搭"
            ],
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags / topics (hashtag mode)",
            "maxItems": 10,
            "type": "array",
            "description": "List of RedNote hashtags/topics to pull posts for in 'hashtag' mode (max 10 per run). Provide the tag text without the leading '#' (e.g. ['秋冬穿搭', '咖啡探店']). Each tag is resolved through RedNote's search API. Requires 'cookie'. Ignored in other modes.",
            "default": [
              "秋冬穿搭"
            ],
            "items": {
              "type": "string"
            }
          },
          "users": {
            "title": "User references (user_posts mode)",
            "maxItems": 10,
            "type": "array",
            "description": "List of RedNote user references for 'user_posts' mode (max 10 per run). Accepts a full profile URL (https://www.xiaohongshu.com/user/profile/{id}), a path (/user/profile/{id}), or the bare 24-hex user id. Requires 'cookie'. Ignored in other modes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "note_urls": {
            "title": "Note URLs or IDs (note_detail mode)",
            "type": "array",
            "description": "For 'note_detail' mode: RedNote note URLs (best with xsec_token, e.g. https://www.xiaohongshu.com/explore/<id>?xsec_token=...) or bare note IDs. Returns the full body text plus likes / comments / shares / collected COUNTS (comment text is not returned). Works without a cookie. The prefilled example is a public share URL (with its xsec_token) used for the store's automated test run; replace it with your own note URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "limit": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of RedNote posts to return per run (across all keywords / hashtags / users). Default 25 (billed: 25 × $0.02 = $0.50 + the $0.05 Actor Start fee). Maximum 200 — the trending/category feed can only be scrolled ~8 pages (~230 notes) in one run, and search modes share one time budget, so higher values are not reachable and are not accepted.",
            "default": 25
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy configuration. RESIDENTIAL is required — RedNote is hosted in mainland China and blocks datacenter IPs (403/461 or empty feeds). The default exit is pinned to CN residential (apifyProxyCountry=CN) for reliable inside-China egress.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "CN"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}