{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu API - RedNote XHS Scraper, Notes & Comments",
    "description": "Xiaohongshu API / RedNote scraper (小红书, XHS, Little Red Book): keyword search with sort and filters, full note text, images and video URLs, comments, user notes and profiles. Uses your own RedNote login cookie. Monitor mode returns only new notes. $2.99 per 1,000 items.",
    "version": "0.1",
    "x-build-id": "cIpnNQM0jGtaMHFGd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reportable_broth~rednote-xiaohongshu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reportable_broth-rednote-xiaohongshu-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/reportable_broth~rednote-xiaohongshu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-reportable_broth-rednote-xiaohongshu-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/reportable_broth~rednote-xiaohongshu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-reportable_broth-rednote-xiaohongshu-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": {
          "accountMode": {
            "title": "Login",
            "enum": [
              "own"
            ],
            "type": "string",
            "description": "RedNote requires a login for search, comments and user notes. Paste your cookie below. Using our accounts (no setup): coming soon.",
            "default": "own"
          },
          "cookie": {
            "title": "Your RedNote cookie (only for 'Use my own cookie')",
            "type": "string",
            "description": "Log in at www.rednote.com and copy the Cookie request header (see README). Must contain a1 and web_session. Stored encrypted; only sent to RedNote."
          },
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Chinese, English or hashtags. One search per line.",
            "items": {
              "type": "string"
            }
          },
          "maxNotesPerKeyword": {
            "title": "Max notes per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "20 notes per page.",
            "default": 40
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "general",
              "latest",
              "popular",
              "comments",
              "collects"
            ],
            "type": "string",
            "description": "Search order.",
            "default": "general"
          },
          "noteType": {
            "title": "Note type",
            "enum": [
              "all",
              "image",
              "video"
            ],
            "type": "string",
            "description": "Filter search results.",
            "default": "all"
          },
          "fetchDetails": {
            "title": "Full note details",
            "type": "boolean",
            "description": "Search results only have the title and counts. This fetches the full text, publish time, tags, all images and the video URL (one extra request per note).",
            "default": true
          },
          "maxCommentsPerNote": {
            "title": "Comments per note (search and user notes)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "0 = off.",
            "default": 0
          },
          "noteUrls": {
            "title": "Note URLs",
            "type": "array",
            "description": "Paste the full URL from the browser, including ?xsec_token=... (RedNote needs it).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxCommentsPerNoteUrl": {
            "title": "Comments per note URL",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Comments to fetch for each note URL.",
            "default": 50
          },
          "users": {
            "title": "Profile URLs",
            "type": "array",
            "description": "www.rednote.com/user/profile/<id>?xsec_token=... (or xiaohongshu.com profile URLs).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeProfile": {
            "title": "Include profile",
            "type": "boolean",
            "description": "Followers, following, likes and saves, note count, bio, region.",
            "default": true
          },
          "maxNotesPerUser": {
            "title": "Max notes per user",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Newest first.",
            "default": 30
          },
          "onlyNew": {
            "title": "Only new items (monitor mode)",
            "type": "boolean",
            "description": "Run on a schedule; each run returns only notes and comments earlier runs haven't returned. You only pay for new items.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor memory name",
            "type": "string",
            "description": "Runs with the same inputs share memory automatically."
          },
          "requestGapSecs": {
            "title": "Seconds between requests",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "Slower is safer for your account.",
            "default": 1.5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential is recommended; RedNote blocks datacenter IPs. One IP is kept for the whole run.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "SG"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}