{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu (RedNote) Scraper — Notes, Users & Search",
    "description": "Xiaohongshu + RedNote (Little Red Book) scraper — note details, user profiles, full note catalogs, comments, search across notes and users. KOL discovery, engagement metrics, lifestyle trend mining for China market research. Six operations, one clean dataset per run. No API key.",
    "version": "1.0",
    "x-build-id": "R8fkcWmPCHJb7801h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~xiaohongshu-rednote-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-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/sian.agency~xiaohongshu-rednote-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-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/sian.agency~xiaohongshu-rednote-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-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 — what do you want to scrape?",
            "enum": [
              "noteDetail",
              "userDetail",
              "userNotes",
              "noteComments",
              "searchNote",
              "searchUser"
            ],
            "type": "string",
            "description": "🎯 **PICK ONE OPERATION PER RUN.** Each run produces one clean dataset matching the chosen mode.\n\n- **📕 Note Detail** — deep scrape of a single note by ID (title, description, images, like/save/share/comment counts, creator info, timestamps)\n- **👤 User Profile** — full profile by user ID (fan count, follow count, note count, bio, verification, level, location, avatar)\n- **📰 User Notes** — paginated list of a creator's full note history (~20 notes/page)\n- **💬 Note Comments** — paginated comments on a single note, with reply samples (~10 comments/page)\n- **🔍 Search Notes** — keyword search across Xiaohongshu / RedNote notes, paginated (~20 results/page)\n- **🔎 Search Users** — keyword search across Xiaohongshu / RedNote creators, paginated (~20 results/page)\n\n💡 **TIP:** To combine operations, run the actor multiple times with different configurations.",
            "default": "searchNote"
          },
          "noteId": {
            "title": "📕 Note ID (for Note Detail / Note Comments)",
            "type": "string",
            "description": "📕 **Required for `Note Detail` and `Note Comments` operations.**\n\nThe 24-character hex Xiaohongshu / RedNote note ID. You can find it:\n- In any RedNote / Xiaohongshu note URL: `https://www.xiaohongshu.com/explore/{ID}` → the trailing path segment\n- In the `noteId` / `id` field of any search or user-notes result row\n\n💡 **TIP:** To analyze a batch of notes, run a `Search Notes` operation first, copy the `noteId` from the result rows, then run `Note Detail` per ID.\n\n⚠️ **Ignored** for User Profile, User Notes, and Search operations."
          },
          "xsecToken": {
            "title": "🔐 xsec_token (optional — for Note Detail / Note Comments)",
            "type": "string",
            "description": "🔐 **Optional.** A short-lived signed token attached to public notes — surfaced as `xsecToken` in any search or user-notes result row.\n\nProvide it if you have it (improves reliability on geo-restricted or sensitive notes); leave blank otherwise."
          },
          "userId": {
            "title": "👤 User ID (for User Profile / User Notes)",
            "type": "string",
            "description": "👤 **Required for `User Profile` and `User Notes` operations.**\n\nThe 24-character hex Xiaohongshu / RedNote user ID (not the human-readable `red_id`). You can find it:\n- In the `userId` / `userid` field of any note, search, or comment result row\n- In a creator's profile URL: `https://www.xiaohongshu.com/user/profile/{ID}`\n\n💡 **TIP:** To build a list of creators in a niche, run `Search Users` with a keyword first, then use the top `userId` values to drill into individual profiles or note catalogs.\n\n⚠️ **Ignored** for Note Detail, Note Comments, and Search operations."
          },
          "keyword": {
            "title": "🔍 Search Keyword (for Search Notes / Search Users)",
            "type": "string",
            "description": "🔍 **Required for `Search Notes` and `Search Users` operations.**\n\nAny Xiaohongshu / RedNote search query. Supports Chinese, English, and mixed queries:\n- `美食` (food)\n- `穿搭` (outfit)\n- `skincare`\n- `makeup tutorial`\n- `travel tips`\n\n💡 **TIP:** Specific niches return higher-relevance results. Chinese-language queries surface more native creators; English queries surface international RedNote / Little Red Book content."
          },
          "maxPages": {
            "title": "📄 Max pages to fetch",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "📄 **Applies to paginated operations** (User Notes, Note Comments, Search Notes, Search Users). Ignored for single-record operations (Note Detail, User Profile).\n\n- **User Notes:** ~20 notes per page\n- **Note Comments:** ~10 comments per page\n- **Search Notes:** ~20 results per page\n- **Search Users:** ~20 results per page\n\n💡 **TIP:** Start small (1–3 pages) to preview results before scaling up.\n\n⚠️ Hard cap: 50 pages to prevent runaway runs.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}