{
  "openapi": "3.0.1",
  "info": {
    "title": "All-in-One RedNote (Xiaohongshu) Scraper",
    "description": "Scrape Xiaohongshu (RedNote/小红书) — search posts, get post details, extract comments, scrape profiles, collect user posts, and download videos without watermarks. 6 modes in one actor.",
    "version": "0.1",
    "x-build-id": "PmJ9BWFdBwIUofQFf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/huggable_quote~xiaohongshu-all-in-one-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-huggable_quote-xiaohongshu-all-in-one-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/huggable_quote~xiaohongshu-all-in-one-scraper/runs": {
      "post": {
        "operationId": "runs-sync-huggable_quote-xiaohongshu-all-in-one-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/huggable_quote~xiaohongshu-all-in-one-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-huggable_quote-xiaohongshu-all-in-one-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "search",
              "postDetail",
              "comments",
              "profile",
              "userPosts",
              "videoDownload"
            ],
            "type": "string",
            "description": "Select which type of data to scrape. 'Search Posts' finds posts by keywords. 'Post Detail' extracts full content from specific posts. 'Comments' collects comments and replies. 'User Profile' gets profile info. 'User Posts' lists posts from a user. 'Video Download' extracts video URLs.",
            "default": "search"
          },
          "keywords": {
            "title": "Search Keywords",
            "type": "array",
            "description": "List of keywords to search for on Xiaohongshu. Each keyword runs a separate search. Only used when mode is 'Search Posts'. Example: [\"ai\", \"fashion\", \"travel\"].",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "general",
              "time_descending",
              "popularity_descending"
            ],
            "type": "string",
            "description": "How to sort search results. 'General' uses Xiaohongshu's default ranking. 'Latest' shows newest posts first. 'Most Popular' shows posts with highest engagement first.",
            "default": "general"
          },
          "noteType": {
            "title": "Note Type Filter",
            "enum": [
              "all",
              "video",
              "normal"
            ],
            "type": "string",
            "description": "Filter search results by post type. 'All Types' returns both image and video posts. 'Video Only' returns only video posts. 'Image/Text Only' returns only image and text posts.",
            "default": "all"
          },
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "List of Xiaohongshu post URLs to scrape. Used for 'Post Detail', 'Comments', and 'Video Download' modes. Example: https://www.xiaohongshu.com/explore/670a46a50000000024017580",
            "items": {
              "type": "string"
            }
          },
          "profileUrls": {
            "title": "Profile URLs",
            "type": "array",
            "description": "List of Xiaohongshu user profile URLs to scrape. Used for 'User Profile' and 'User Posts' modes. Example: https://www.xiaohongshu.com/user/profile/6784ba7f00000000080191fb",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of items to scrape per keyword or URL. Higher values take longer and use more compute. Start with 20 for testing, then scale up. Maximum 1000.",
            "default": 20
          },
          "sessionCookie": {
            "title": "Session Cookie",
            "type": "string",
            "description": "Your Xiaohongshu browser cookie string for authenticated scraping. Paste the full cookie value from your browser's DevTools (Application → Cookies or Network tab → Request Headers → Cookie). This dramatically improves success rates and is required for comments scraping. Without cookies, Xiaohongshu may block access or show login walls after a few requests. See the README for a step-by-step guide on how to extract cookies."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for avoiding rate limits. Apify Proxy is recommended for best results. Residential proxies provide the highest success rate."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}