{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu & RedNote Comments Scraper (小红书评论)",
    "description": "Scrape Xiaohongshu (RedNote, 小红书) comments logged out: every top comment of a note by link, share link or bare id, replies as flat rows, RedNote's English translation, likes, time, the commenter's red id and IP region. Keywords, creators and feed channels too. No login. Misses free.",
    "version": "0.1",
    "x-build-id": "DkJn6QGMpTy2ZCPVO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hyperbach~xiaohongshu-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hyperbach-xiaohongshu-comments-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/hyperbach~xiaohongshu-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hyperbach-xiaohongshu-comments-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/hyperbach~xiaohongshu-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hyperbach-xiaohongshu-comments-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": {
          "noteUrls": {
            "title": "Note links, share links or note ids",
            "maxItems": 5000,
            "type": "array",
            "description": "One note a line: a note link (`xiaohongshu.com/explore/<id>`, `/discovery/item/<id>`, `rednote.com/...`, with or without its `xsec_token`), an app share link (`xhslink.com/...`) or the copied share text around it, or a bare 24-character note id. No token or login is needed. A value that names no note is a free `invalid_input` row.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 100,
            "type": "array",
            "description": "Search words, one a line (Chinese or English). The run reads the comments of the first `maxNotesPerSource` notes the search lists. These rows come from the search's own comment list: up to about 100 top comments a note, up to 6 replies a thread, and no commenter id or red id (`route` = `partner`).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "creatorUrls": {
            "title": "Creators (profile links or user ids)",
            "maxItems": 100,
            "type": "array",
            "description": "A creator's profile link (`xiaohongshu.com/user/profile/<id>`) or 24-character user id, one a line. The run reads the creator's newest notes (logged out the profile lists up to 12) and finds each one in the search by its title and the creator's name; a listed note the search does not find is a free `not_joined` row. These rows have no commenter id or red id (`route` = `partner`).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Trending feed channels",
            "maxItems": 20,
            "type": "array",
            "description": "The explore feed by category, one a line: `recommend` (the home feed), `fashion`, `food`, `beauty`, `movies`, `kpop`, `career`, `relationships`, `home`, `gaming`, `travel`, `fitness`, `video`. The run reads the comments of the first `maxNotesPerSource` notes the feed shows now.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Comment order",
            "enum": [
              "recommended",
              "latest",
              "most_liked"
            ],
            "type": "string",
            "description": "`recommended` (default): the platform's own ranking, the pinned comment first; rows stream page by page, and a capped run reads only the pages it needs. `latest` (newest first) and `most_liked`: the run reads every top comment of the note first, then sorts them, so the first row of a note with thousands of comments waits for its whole list.",
            "default": "recommended"
          },
          "maxCommentsPerNote": {
            "title": "Max top comments per note",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "The most top-level comments a note gives (its replies come with them); 0 = every top comment the note lists. The note's row says COMPLETE, LIST_END or CAP.",
            "default": 0
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Deliver the replies the source shows under each comment, each as its own row with `rootCommentId` and `replyToCommentId`.",
            "default": true
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "The most replies a comment gives. Logged out the source shows up to 3 replies under a comment (6 on keyword and creator rows); a larger value or 0 gives all it shows. Every comment row has its exact `replyCount`, `repliesDelivered` and `repliesComplete`.",
            "default": 3
          },
          "maxNotesPerSource": {
            "title": "Notes per keyword, creator or channel",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many notes each keyword, creator or channel gives.",
            "default": 10
          },
          "postedAfter": {
            "title": "Comments posted on or after",
            "type": "string",
            "description": "Only comments from this time on: a date (`2026-11-01`), a UTC time (`2026-11-01T08:00:00Z`) or an age (`7 days`, `24 hours`). The run reads every comment of the note and keeps these; a comment left out is free."
          },
          "postedBefore": {
            "title": "Comments posted before",
            "type": "string",
            "description": "Only comments from before this time: a date, a UTC time or an age, as above."
          },
          "commentKeywords": {
            "title": "Comment contains any of",
            "type": "array",
            "description": "Only comments whose text (or its English translation) contains any of these words, case-insensitive: a word in Latin letters as a whole word (`tea` does not match `team`), a Chinese word anywhere in the text. A comment left out is free.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only comments with at least this many likes. A comment left out is free.",
            "default": 0
          },
          "onlyWithPictures": {
            "title": "Only comments with pictures",
            "type": "boolean",
            "description": "Only comments that carry pictures.",
            "default": false
          },
          "includeRedIds": {
            "title": "Commenter red ids",
            "type": "boolean",
            "description": "Add each commenter's red id (the public account number shown on the profile). One extra lookup per distinct commenter, so a run is about 3 times faster without it; the comment rows stay the same.",
            "default": true
          },
          "sentimentAnalysis": {
            "title": "Sentiment of each comment",
            "type": "boolean",
            "description": "Score each delivered comment from -1 (negative) to 1 (positive) with a confidence and a label. A model reads the Chinese text and its emote codes; on 20 real comments it read 19 right by eye, weakest on teasing, so use the confidence to drop unsure answers.",
            "default": false
          },
          "pseudonymizeCommenters": {
            "title": "Pseudonymize commenters",
            "type": "boolean",
            "description": "Replace each commenter's id, name and red id (and the people a reply answers or mentions, with their @name in the text) with a stable hash for this run; the avatar and profile link are left out. The note's author stays named where the note's page names the author.",
            "default": false
          },
          "maxItems": {
            "title": "Max comments (whole run)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "The most comment rows of the whole run (the charged rows); 0 = no cap beyond your charge limit.",
            "default": 0
          },
          "feedback": {
            "title": "Feedback to the maintainers",
            "maxLength": 2000,
            "type": "string",
            "description": "A note to the people who maintain this Actor: what you needed and did not get. For example a missing field, a wrong or empty result, or the Actor you switch from or to, and why. The run does not read it: the rows and the charges stay the same. A person reads every note."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}