{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu Comments Scraper - RedNote Nested Reply Threads",
    "description": "Scrape every comment and every nested reply from any Xiaohongshu (RedNote) note. Paste note URLs, share links or 24-character note IDs. One flat row per comment and per reply, carrying the thread linkage, author, avatar, IP city, likes and attached pictures.",
    "version": "1.0",
    "x-build-id": "B3BEvUSaDp1fp36F9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~xiaohongshu-rednote-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-xiaohongshu-rednote-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/sian.agency~xiaohongshu-rednote-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-xiaohongshu-rednote-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/sian.agency~xiaohongshu-rednote-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-xiaohongshu-rednote-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 URLs, share links or IDs",
            "type": "array",
            "description": "🔗 **WHICH NOTES:** the comment threads you want. Add as many as you like.\n\n✅ **Three formats, mixable in one list:**\n- Browser URL — `https://www.xiaohongshu.com/explore/6a79fb02...`\n- Share link from the app — `http://xhslink.com/...`\n- Bare 24-character note ID\n\n🚫 **Not a note:** a creator profile, a search page or a topic page.\n\n💡 **TIP:** Bulk edit takes a list, one per line. Duplicates are dropped before anything is fetched, so you never pay twice for one note.",
            "default": [
              "https://www.xiaohongshu.com/explore/6a79fb020000000027023c9c",
              "https://www.xiaohongshu.com/explore/69ec85eb000000001e00cd6c"
            ],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "🔀 Comment order",
            "enum": [
              "latest",
              "normal"
            ],
            "type": "string",
            "description": "🔀 **ORDER:** which way to walk the comment pages.\n\n- **Latest first** — newest comments at the top. Use this to monitor a live note.\n- **Default order** — the ranking Xiaohongshu itself shows, which surfaces what the platform considers most relevant.\n\nℹ️ There is no sort-by-likes option: the data source accepts one and then returns default order anyway. Rather than give you a control that quietly does nothing, sort on the `likeCount` column after export.",
            "default": "latest"
          },
          "includeReplies": {
            "title": "💬 Include reply threads",
            "type": "boolean",
            "description": "💬 **REPLY THREADS:** on by default.\n\nEvery reply becomes its own row, linked to the comment it sits under (`parentCommentId`) and to the exact comment it answers (`replyToCommentId`, `replyToAuthorName`). Group on `parentCommentId` to rebuild a thread.\n\n💰 Replies are billed separately from comments, and a little higher, because a reply thread is fetched one thread at a time. Turn this off to collect top-level comments only — faster and cheaper.",
            "default": true
          },
          "maxRepliesPerComment": {
            "title": "↩️ Replies per comment",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "↩️ **THREAD DEPTH:** how far down a single reply thread to go.\n\nSet **0 to take every reply**, however long the thread runs. Most threads are short — roughly three quarters of comments have no replies at all — so this only bites on the handful of viral comments that collect dozens of answers.",
            "default": 20
          },
          "maxCommentsPerNote": {
            "title": "🔢 Top-level comments per note",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "🔢 **PER NOTE:** top-level comments to collect from each note. Replies do not count against it.\n\nSet **0 to take the whole thread**. Keeping the cap per note rather than per run means one viral note cannot eat the entire budget of a multi-note run.",
            "default": 100
          },
          "maxResults": {
            "title": "🛑 Maximum rows for the run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "🛑 **RUN CEILING:** the hard limit on everything this run returns — comments and replies together — and therefore the ceiling on what it can charge. The run stops the moment it is reached.\n\n💡 This is the one knob to reach for when you want a predictable bill.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}