{
  "openapi": "3.0.1",
  "info": {
    "title": "RedNote Xiaohongshu 小红书 Scraper API — Notes & Transcripts",
    "description": "RedNote scraper and unofficial Xiaohongshu (XHS / 小红书) API: category feeds, full note details with images, video links, subtitles and transcripts, creator profiles, comment threads, keyword search and suggestions — 8 modes, six need no login. Export JSON, CSV, Excel. From $3.50/1k notes.",
    "version": "1.2",
    "x-build-id": "4TS2Yv63xe6iPp1ei"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pro100chok~rednote-xiaohongshu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pro100chok-rednote-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/pro100chok~rednote-xiaohongshu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pro100chok-rednote-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/pro100chok~rednote-xiaohongshu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pro100chok-rednote-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": {
          "scrapeType": {
            "title": "What do you want to scrape?",
            "enum": [
              "discoverFeed",
              "noteDetails",
              "noteComments",
              "userProfiles",
              "userNotes",
              "keywordResearch",
              "searchNotes",
              "searchUsers"
            ],
            "type": "string",
            "description": "Pick what you want and fill in only that mode's input field. Every mode except the two keyword-search ones works with no login and no cookie at all. If the field a mode reads is empty but another one is filled in, the run switches to the mode that matches your input instead of returning nothing — the log says when it does.",
            "default": "discoverFeed"
          },
          "feedCategories": {
            "title": "Discovery feed categories",
            "type": "array",
            "description": "For Scrape Type: Discovery feed. Pick one or more RedNote channels; the actor pages through each of them until your result limit is met. Results are split evenly between the selected categories.",
            "items": {
              "type": "string",
              "enum": [
                "recommended",
                "fashion",
                "food",
                "beauty",
                "movies",
                "career",
                "relationships",
                "home",
                "gaming",
                "travel",
                "fitness",
                "video"
              ],
              "enumTitles": [
                "Recommended (推荐)",
                "Fashion & outfits (穿搭)",
                "Food (美食)",
                "Beauty & makeup (彩妆)",
                "Movies & TV (影视)",
                "Career (职场)",
                "Relationships (情感)",
                "Home & living (家居)",
                "Gaming (游戏)",
                "Travel (旅行)",
                "Fitness (健身)",
                "Video (视频)"
              ]
            },
            "default": [
              "recommended"
            ]
          },
          "noteUrls": {
            "title": "Note URLs or IDs",
            "type": "array",
            "description": "For Scrape Type: Note details, Comments. Paste note links exactly as you copied them from RedNote — the `xsec_token` in the link is what unlocks the note. Share links (xhslink.com) are resolved automatically. Bare 24-character note IDs also work if you already have a matching token from an earlier run. Notes are fetched several at a time, so a long list is no slower per note than a short one. Example: https://www.xiaohongshu.com/explore/6a51b700000000000f028107?xsec_token=ABzPD…&xsec_source=pc_feed",
            "items": {
              "type": "string"
            }
          },
          "userUrls": {
            "title": "Creator profile URLs or IDs",
            "type": "array",
            "description": "For Scrape Type: Creator profiles, Creator notes. Paste profile links as copied from RedNote, or bare 24-character user IDs. Example: https://www.xiaohongshu.com/user/profile/5bbe0958e1e44e00014185bb",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "For Scrape Type: Keyword research, Keyword search: notes, Keyword search: creators. Chinese, English or mixed queries all work. Example: 口红, coffee",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on how many records this run pushes to the dataset. Notes, profiles, comments and keywords all count as one record each.",
            "default": 100
          },
          "expandKeywords": {
            "title": "Expand suggestions recursively",
            "type": "boolean",
            "description": "Keyword research only: feed every suggestion back in as a new seed, so one keyword grows into a full long-tail map until the result limit is reached.",
            "default": false
          },
          "searchSortBy": {
            "title": "Search sorting",
            "enum": [
              "relevance",
              "popularity",
              "latest",
              "mostCommented",
              "mostCollected"
            ],
            "type": "string",
            "description": "Keyword search only: how RedNote should rank the results.",
            "default": "relevance"
          },
          "searchNoteType": {
            "title": "Search post type",
            "enum": [
              "all",
              "video",
              "image"
            ],
            "type": "string",
            "description": "Keyword search only: restrict results to one post format.",
            "default": "all"
          },
          "searchTimeFilter": {
            "title": "Search publish date",
            "enum": [
              "all",
              "day",
              "week",
              "halfYear"
            ],
            "type": "string",
            "description": "Keyword search only: restrict results by how recently they were published.",
            "default": "all"
          },
          "maxNotesPerUser": {
            "title": "Max notes per creator",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Creator notes mode: how many posts to collect per creator before moving on to the next one.",
            "default": 30
          },
          "maxCommentsPerNote": {
            "title": "Max comments per note",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Comments mode (and the comment add-on): how many comments — replies included — to collect per note.",
            "default": 50
          },
          "fullNoteDetail": {
            "title": "Load full note details",
            "type": "boolean",
            "description": "On: every discovered note is opened to collect the body text, all images, video streams, hashtags, region and the complete engagement counters — one page load per note. Off: only the listing card (title, cover, author, likes, date) is kept, which runs several times faster and uses a fraction of the bandwidth.",
            "default": true
          },
          "includeComments": {
            "title": "Also scrape comments",
            "type": "boolean",
            "description": "Add comment records for every note collected in the feed, note, creator and search modes.",
            "default": false
          },
          "includeSubComments": {
            "title": "Include replies to comments",
            "type": "boolean",
            "description": "Include replies inside comment threads, each as its own record linked to its parent comment.",
            "default": true
          },
          "includeAuthorProfile": {
            "title": "Also scrape note authors",
            "type": "boolean",
            "description": "Add a full creator profile record (followers, RedNote handle, bio, region) for every distinct author encountered. Each author is fetched only once per run.",
            "default": false
          },
          "includeVideoStreams": {
            "title": "Include every video stream variant",
            "type": "boolean",
            "description": "Keep the full list of video renditions (h264/h265/av1 with resolution, fps, bitrate and file size) next to the ready-to-use best-quality MP4 link.",
            "default": true
          },
          "includeTranscripts": {
            "title": "Also download video transcripts",
            "type": "boolean",
            "description": "Video notes that carry RedNote's own auto-generated subtitles get the spoken text attached as `transcript` (plus `transcriptLanguage`). Costs one small extra download per subtitled video; the subtitle file URLs themselves are always returned under `videoSubtitles` whether this is on or off.",
            "default": false
          },
          "includeRawData": {
            "title": "Include raw RedNote payload",
            "type": "boolean",
            "description": "Attach the untouched RedNote response to each record under `raw`. Useful when you need a field the actor does not map yet.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests run in parallel. 10 is the measured optimum: a run waits on RedNote's page latency, not on its own pacing, so workers are what buy the time back — 100 full-detail notes take about 37 s at 10 against 67 s at 5, with no loss of detail. Lower it for gentler large runs.",
            "default": 10
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "How many times a failed request is retried before the actor moves on.",
            "default": 5
          },
          "cookie": {
            "title": "RedNote cookie (optional)",
            "type": "string",
            "description": "Only needed for the two 🔍 keyword-search modes, which RedNote answers exclusively for signed-in sessions. Paste the full cookie header from a logged-in xiaohongshu.com browser tab. Leave empty for every other mode — those run fully anonymously."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxies are strongly recommended and used by default. You can also switch to your own proxies on the Custom proxies tab.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}