{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu (RedNote/小红书) Notes & Video Scraper",
    "description": "Collect public Xiaohongshu (RedNote/小红书) notes from URLs, feeds, and sitemaps. Export post details, creator profiles, and optional MP4/image downloads. Experimental search and comments require your own session cookie.",
    "version": "1.0",
    "x-build-id": "YBgkd0ZEfKGljbeqg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchfinch~xiaohongshu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchfinch-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/fetchfinch~xiaohongshu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fetchfinch-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/fetchfinch~xiaohongshu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fetchfinch-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Xiaohongshu note, profile, explore, search, or sitemap URLs. Preserve xsec_token query parameters.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sitemapUrls": {
            "title": "Sitemap URLs",
            "type": "array",
            "description": "Optional public Xiaohongshu XML or XML.GZ sitemap URLs. The actor stops at maxItems.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Experimental keyword search. Requires a valid logged-in cookie; not yet verified with a live session.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "notes",
              "users"
            ],
            "type": "string",
            "description": "Search notes or creator accounts.",
            "default": "notes"
          },
          "searchSort": {
            "title": "Note search sort",
            "enum": [
              "general",
              "popular",
              "latest"
            ],
            "type": "string",
            "description": "Sort note search results by relevance, popularity, or newest.",
            "default": "general"
          },
          "searchNoteType": {
            "title": "Note type filter",
            "enum": [
              "all",
              "video",
              "image"
            ],
            "type": "string",
            "description": "Filter note search results to all, videos, or image posts.",
            "default": "all"
          },
          "feedCategory": {
            "title": "Explore category",
            "enum": [
              "recommend",
              "fashion",
              "food",
              "cosmetics",
              "movie",
              "career",
              "love",
              "household",
              "gaming",
              "travel",
              "fitness"
            ],
            "type": "string",
            "description": "Category to use for explore feed discovery.",
            "default": "recommend"
          },
          "maxItems": {
            "title": "Maximum notes or users",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of note and user records. Comments are capped separately.",
            "default": 100
          },
          "maxComments": {
            "title": "Maximum comments per note",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum top-level comments to collect per note. Zero disables comments.",
            "default": 0
          },
          "maxReplies": {
            "title": "Maximum replies per comment",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum replies to collect per top-level comment.",
            "default": 0
          },
          "includeNoteDetails": {
            "title": "Fetch full note details",
            "type": "boolean",
            "description": "Fetch each discovered note page for full text and media metadata.",
            "default": true
          },
          "includeProfileNotes": {
            "title": "Fetch profile notes",
            "type": "boolean",
            "description": "Include publicly visible profile note previews and, with a session, full posted notes.",
            "default": true
          },
          "downloadVideos": {
            "title": "Download videos",
            "type": "boolean",
            "description": "Store the best available MP4 in the Actor key-value store and include its key in the note record.",
            "default": false
          },
          "videoQuality": {
            "title": "Video download quality",
            "enum": [
              "best",
              "smallest",
              "compatible"
            ],
            "type": "string",
            "description": "Best resolution, smallest file, or H.264-compatible stream when available.",
            "default": "best"
          },
          "downloadImages": {
            "title": "Download note images",
            "type": "boolean",
            "description": "Save note images to the Actor key-value store.",
            "default": false
          },
          "maxMediaMegabytes": {
            "title": "Maximum media size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum size of each downloaded video or image.",
            "default": 100
          },
          "cookie": {
            "title": "Session cookie",
            "type": "string",
            "description": "Optional browser Cookie header containing a1 and web_session. Required for search and comments."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify proxy configuration for access and rotation.",
            "default": {
              "useApifyProxy": false
            }
          },
          "requestDelayMillis": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum spacing between HTTP requests.",
            "default": 800
          },
          "maxRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for transient network, rate-limit, or server errors.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}