{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu (RedNote) Scraper — Notes, Users, Products & Search",
    "description": "Scrape Xiaohongshu / RedNote (小红书, XHS, Little Red Book): note details, user profiles, category discovery, mall products & prices, comments, and keyword search. Eight operations, one flat dataset. Note detail, profiles, discovery & products need NO login. Chinese counts parsed to numbers.",
    "version": "0.0",
    "x-build-id": "fNVEoZKB2JVNiex3R"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~xiaohongshu-rednote-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-xiaohongshu-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/memo23~xiaohongshu-rednote-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-xiaohongshu-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/memo23~xiaohongshu-rednote-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-xiaohongshu-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",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "🎯 Operation",
            "enum": [
              "note-detail",
              "user-profile",
              "user-notes",
              "channel-feed",
              "mall-products",
              "note-comments",
              "search-notes",
              "search-users"
            ],
            "type": "string",
            "description": "What to scrape. note-detail / user-profile / channel-feed / mall-products work with NO login. note-comments / search-notes / search-users require the web_session cookie below — Xiaohongshu gates guest access to its comment and search APIs. (User Notes returns page 1 login-free; more pages need the cookie.)",
            "default": "channel-feed"
          },
          "noteId": {
            "title": "📕 Note ID or URL",
            "type": "string",
            "description": "For Note Detail / Note Comments. A 24-hex note ID, or a full note URL (…/explore/<id>?xsec_token=…). Pasting the full URL also captures the xsec_token automatically."
          },
          "xsecToken": {
            "title": "🔐 xsec_token",
            "type": "string",
            "description": "The xsec_token that pairs with the note. Required for Note Detail / Note Comments. Skip this if you pasted the full note URL above (the token is taken from it)."
          },
          "userId": {
            "title": "👤 User ID or URL",
            "type": "string",
            "description": "For User Profile / User Notes. A 24-hex user ID, or a full profile URL (…/user/profile/<id>)."
          },
          "keyword": {
            "title": "🔍 Search Keyword",
            "type": "string",
            "description": "For Search Notes / Search Users. Chinese or English keyword, e.g. 美食 or 'skincare'."
          },
          "channel": {
            "title": "🧭 Channel (Channel Feed)",
            "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.video_v3"
            ],
            "type": "string",
            "description": "For Channel Feed. Which homefeed category to discover notes from. 'Recommended' is the main mixed feed. Increase Max pages to pull more (the feed rotates each load, so more pages = more unique notes).",
            "default": "homefeed_recommend"
          },
          "goodsId": {
            "title": "🛍️ Product URL or Goods ID (Mall Products)",
            "type": "string",
            "description": "For Mall Products. A product URL (…/goods-detail/<id>) or a 24-hex goods ID. Returns that shop's + related products with full pricing, sales counts, and seller info — no login needed."
          },
          "fullDetail": {
            "title": "🔎 Full detail (Channel Feed)",
            "type": "boolean",
            "description": "For Channel Feed: hydrate each discovered note to its full detail (description, full image gallery, video URL, all counts). Costs one extra request per note. Off by default — the feed row already includes note ID, title, likes, author, cover, and a ready-to-scrape URL + token.",
            "default": false
          },
          "searchSort": {
            "title": "↕️ Search Sort (Search Notes)",
            "enum": [
              "general",
              "popularity_descending",
              "time_descending"
            ],
            "type": "string",
            "description": "Ranking for Search Notes.",
            "default": "general"
          },
          "maxPages": {
            "title": "📄 Max pages",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Pages to fetch on paginated operations (User Notes, Channel Feed, Note Comments, Search Notes/Users). ~15–20 items per page. Default 1.",
            "default": 1
          },
          "maxItems": {
            "title": "🧮 Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on total dataset rows. Leave empty for no cap."
          },
          "webSession": {
            "title": "🍪 web_session cookie (for Search)",
            "type": "string",
            "description": "A logged-in Xiaohongshu `web_session` cookie value from an account you control. REQUIRED for Note Comments, Search Notes, and Search Users (Xiaohongshu gates guest access to comments and search). Not needed for Note Detail, User Profile, Channel Feed, or Mall Products. You can paste either the bare value or your whole cookie string."
          },
          "proxy": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Proxy egress. Leave default to use built-in residential routing. Override with Apify Proxy or custom proxy URLs if needed.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}