{
  "openapi": "3.0.1",
  "info": {
    "title": "RedNote (Xiaohongshu) Notes Scraper",
    "description": "Scrape RedNote (Xiaohongshu) notes from trending categories, note and profile links (no login), or by keyword and with comments using your own cookie: full text, exact counts, tags, images, video, author. Export to JSON, CSV or Excel.",
    "version": "0.0",
    "x-build-id": "uheq572togVOfGqPw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nice_dev~rednote-notes-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nice_dev-rednote-notes-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/nice_dev~rednote-notes-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nice_dev-rednote-notes-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/nice_dev~rednote-notes-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nice_dev-rednote-notes-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": {
          "query": {
            "title": "Search keyword",
            "maxLength": 200,
            "type": "string",
            "description": "Keyword searched on RedNote, in Chinese or English (e.g. `咖啡` or `coffee`). Each search returns the notes in the order chosen in **Sort by**."
          },
          "searchQueries": {
            "title": "More search keywords",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Several keywords in one run: one search per keyword. Added to **Search keyword**; notes found by several searches are saved once.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Trending categories",
            "type": "array",
            "description": "Notes RedNote recommends on its Explore page, per category (about 20-32 notes per category and read). They are often not recent: read the date with **Full note details**. Each note is saved with its category and its rank on the page.",
            "items": {
              "type": "string",
              "enum": [
                "homefeed_recommend",
                "homefeed.fashion_v3",
                "homefeed.food_v3",
                "homefeed.cosmetics_v3",
                "homefeed.travel_v3"
              ],
              "enumTitles": [
                "Recommended (all)",
                "Fashion",
                "Food",
                "Beauty",
                "Travel"
              ]
            },
            "default": []
          },
          "noteUrls": {
            "title": "Note URLs",
            "maxItems": 1000,
            "uniqueItems": true,
            "type": "array",
            "description": "RedNote note links, as copied from the browser or the app: `https://www.xiaohongshu.com/explore/<id>?xsec_token=...`, `https://www.xiaohongshu.com/discovery/item/<id>?xsec_token=...` or short `https://xhslink.com/...` share links. A link without its `xsec_token` cannot be opened by RedNote and is reported in the log. Max 1 000 links.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "profileUrls": {
            "title": "Profile URLs or user IDs",
            "maxItems": 1000,
            "uniqueItems": true,
            "type": "array",
            "description": "RedNote profile links (`https://www.xiaohongshu.com/user/profile/<id>`) or bare user IDs (24 hex characters). Each one gives a profile result; set **Max notes per profile** to also get the notes it posted. Max 1 000.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max notes",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of notes to save for the whole run (after deduplication and filters). Comments, profiles and keyword suggestions are not counted here. 0 = no limit.",
            "default": 100
          },
          "maxItemsPerQuery": {
            "title": "Max notes per search",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap for EACH keyword and each trending category, so that the first one cannot use up the whole **Max notes** budget. 0 = no per-search cap.",
            "default": 0
          },
          "sortType": {
            "title": "Sort by",
            "enum": [
              "general",
              "time_descending",
              "popularity_descending",
              "comment_descending",
              "collect_descending"
            ],
            "type": "string",
            "description": "Order of the search results, as on RedNote.",
            "default": "general"
          },
          "noteType": {
            "title": "Note type",
            "enum": [
              "all",
              "video",
              "image"
            ],
            "type": "string",
            "description": "Search only video notes or only image notes.",
            "default": "all"
          },
          "timeFilter": {
            "title": "Published within",
            "enum": [
              "all",
              "day",
              "week",
              "half_year"
            ],
            "type": "string",
            "description": "RedNote's own date filter for the search. For an exact date range use **Posted after** / **Posted before** below.",
            "default": "all"
          },
          "maxNotesPerProfile": {
            "title": "Max notes per profile",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Notes posted by each profile of **Profile URLs**, newest first; **Max notes per search** caps each profile too, the lower one wins. 0 = the profile only.",
            "default": 0
          },
          "cookie": {
            "title": "RedNote cookie",
            "type": "string",
            "description": "Cookie of your own logged-in RedNote account, copied from your browser on www.xiaohongshu.com (the whole `Cookie` header, or at least `a1`, `webId` and `web_session`). Needed for **Search keyword**, **Comments** and **Max notes per profile**; without it those are skipped and the log says so. Stored encrypted, used only to read public data at a visitor's pace. Use a secondary account. With a cookie the Actor runs a browser: keep at least 1 GB of memory (the default)."
          },
          "includeNoteDetails": {
            "title": "Full note details",
            "type": "boolean",
            "description": "For notes found by search, trending or a profile: open each note for its full text, every image in high resolution, like / save / comment / share counts, tags, mentioned users, IP location and last update date. Notes from **Note URLs** always have them.",
            "default": false
          },
          "includeComments": {
            "title": "Comments",
            "type": "boolean",
            "description": "Also save the comments of each note (one result per comment: text, likes, date, IP location, author).",
            "default": false
          },
          "maxCommentsPerNote": {
            "title": "Max comments per note",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Top-level comments saved per note when **Comments** is on. 0 = all.",
            "default": 20
          },
          "includeReplies": {
            "title": "Comment replies",
            "type": "boolean",
            "description": "Also save the replies to each comment (marked with the id of the comment they answer).",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Replies saved per comment when **Comment replies** is on. 0 = all.",
            "default": 10
          },
          "includeAuthorProfile": {
            "title": "Author profiles",
            "type": "boolean",
            "description": "Also save the profile of each note author once per run: bio, followers, likes and saves received, notes posted, verification, gender.",
            "default": false
          },
          "downloadImages": {
            "title": "Download images",
            "type": "boolean",
            "description": "Save the images of each note in the run's key-value store and add the stored links to the note (field storedMedia). With **Full note details** (or a note from Note URLs): every image of the note, up to 20. Without it a note found in a list, a search or a profile has only its cover. A file that is too large, gone or not a picture is not saved and not charged. Charged per file saved.",
            "default": false
          },
          "downloadVideos": {
            "title": "Download videos",
            "type": "boolean",
            "description": "Save the video of each video note in the run's key-value store and add the stored link to the note (field storedMedia). Only a video note whose page was read has one: use **Full note details**, or a note from Note URLs. A video that is too large or gone is not saved and not charged. Charged per file saved.",
            "default": false
          },
          "suggestKeywords": {
            "title": "Keyword suggestions",
            "type": "boolean",
            "description": "Also save the keywords RedNote suggests while typing each search keyword (one result per suggestion).",
            "default": false
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Only notes published on or after this date (the note's publication date, not its last update): `2026-09-01`, or a period before now such as `7 days`, `2 weeks`, `1 month` (API: `24 hours` and full ISO date-times work too). A date alone is counted in Beijing time (UTC+8). For notes found by category, search or profile, turn on **Full note details**."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Only notes published on or before this date (the whole day is included, in Beijing time, UTC+8), or older than a period such as `30 days`. For notes found by category, search or profile, turn on **Full note details**."
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Drop the notes whose title, and text with Full note details, contains one of these words (case and accents ignored). Without Full note details, only the title of a note found by category, search or profile is read.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minLikes": {
            "title": "Min likes",
            "minimum": 0,
            "type": "integer",
            "description": "Drop the notes with fewer likes. 0 = no minimum.",
            "default": 0
          },
          "minComments": {
            "title": "Min comments",
            "minimum": 0,
            "type": "integer",
            "description": "Drop the notes with fewer comments (count read on the full note: needs **Full note details** for notes not given in Note URLs). 0 = no minimum.",
            "default": 0
          },
          "onlyNew": {
            "title": "Only new notes",
            "type": "boolean",
            "description": "Skip the notes that a previous run (same **Memory key**) already delivered: they are not saved and not charged, and their page is not even opened. First run = everything is new.",
            "default": false
          },
          "stateKey": {
            "title": "Memory key",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$",
            "maxLength": 64,
            "type": "string",
            "description": "Name of the memory used by **Only new notes**. Give each schedule / task its own key (e.g. `coffee-brands`) so that they do not share their memory. Letters, digits, `-` and `_`.",
            "default": "default"
          },
          "resetState": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget everything remembered under this **Memory key** before the run: this run returns (and charges) every note again. Untick it afterwards.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy or your own proxies. Keep the default: it is included in the price. The residential Apify proxy is not available in this Actor.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of requests processed in parallel.",
            "default": 8
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 10,
            "maximum": 2000,
            "type": "integer",
            "description": "Most requests in any 60 seconds, all of them counted. A budget, not an even pace (spread them with the minimum delay below). Lower it if the log shows RedNote sending the Actor to its login or captcha page.",
            "default": 120
          },
          "minRequestIntervalMs": {
            "title": "Min delay between requests",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Smallest gap between two requests, in milliseconds. 0 = no gap.",
            "default": 0
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Retries per request before it is marked as failed. Behind a proxy, a request RedNote turns away is also retried on a new IP up to 10 times without using up these retries.",
            "default": 5
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Include debug messages in the run log.",
            "default": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}