{
  "openapi": "3.0.1",
  "info": {
    "title": "RedNote (Xiaohongshu) Scraper",
    "description": "Scrape RedNote (Xiaohongshu, 小红书) notes by keyword, URL or creator: likes, saves, comments, shares, images and author, plus optional full detail, comments with replies and creator profiles. No login, no start fee.",
    "version": "1.0",
    "x-build-id": "mKpOAn4yEBhQKmSGd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~rednote-xiaohongshu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-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/coregent~rednote-xiaohongshu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-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/coregent~rednote-xiaohongshu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-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": {
          "keywords": {
            "title": "Keywords",
            "maxItems": 50,
            "type": "array",
            "description": "Search RedNote for these terms, in Chinese or English (e.g. 咖啡, coffee, 露营). Each keyword is one source. If you give no keyword, note URL or creator at all, the Actor runs a short demo search for \"coffee\". Up to 50 per run.",
            "items": {
              "type": "string"
            }
          },
          "noteUrls": {
            "title": "Note URLs",
            "maxItems": 500,
            "type": "array",
            "description": "Note URLs (https://www.xiaohongshu.com/explore/<id>), share links (https://xhslink.com/…), share text containing such a link, or note IDs. Each note is fetched with its full detail. Up to 500 per run.",
            "items": {
              "type": "string"
            }
          },
          "creators": {
            "title": "Creators",
            "maxItems": 50,
            "type": "array",
            "description": "Creator profile URLs (https://www.xiaohongshu.com/user/profile/<id>), user IDs, or RedNote IDs (小红书号). A profile URL is the most reliable; a RedNote ID needs an extra search to find the creator. Up to 50 per run.",
            "items": {
              "type": "string"
            }
          },
          "maxNotes": {
            "title": "Max notes (whole run)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The total number of note rows for the whole run, across all sources. Split evenly across sources unless you set a per-source limit. Comments do not count toward this limit.",
            "default": 10
          },
          "maxNotesPerSource": {
            "title": "Max notes per source",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Optional. The most notes from any one keyword or creator. Leave empty to split the run's limit evenly across sources."
          },
          "sortBy": {
            "title": "Sort (keywords)",
            "enum": [
              "general",
              "newest",
              "most_liked",
              "most_commented",
              "most_collected"
            ],
            "type": "string",
            "description": "How keyword search results are ordered.",
            "default": "general"
          },
          "noteType": {
            "title": "Note type (keywords)",
            "enum": [
              "any",
              "image",
              "video"
            ],
            "type": "string",
            "description": "Only image notes or only video notes.",
            "default": "any"
          },
          "publishedWithin": {
            "title": "Published within (keywords)",
            "enum": [
              "any",
              "day",
              "week",
              "half_year"
            ],
            "type": "string",
            "description": "Only keyword results published within this period.",
            "default": "any"
          },
          "oldestPostDate": {
            "title": "Oldest note date (creators)",
            "type": "string",
            "description": "Stop reading a creator's notes at the first one older than this. A date (YYYY-MM-DD) or a period such as \"30 days\" or \"2 weeks\"."
          },
          "includeNoteDetail": {
            "title": "Include note detail",
            "type": "boolean",
            "description": "Add each note's full detail to keyword and creator results: IP location, topics/hashtags, all images and the video. One extra lookup per note. Notes given by URL always include it. Without it, note rows still have the title, text, likes, saves, comments, shares, images and author.",
            "default": false
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Add top-level comments for each note as separate rows (recordType \"comment\").",
            "default": false
          },
          "maxCommentsPerNote": {
            "title": "Max comments per note",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "With \"Include comments\" on: the most top-level comments per note.",
            "default": 20
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "With \"Include comments\" on: also add replies to each comment, as comment rows with parentCommentId set.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "With \"Include replies\" on: the most replies per comment.",
            "default": 10
          },
          "includeCreatorProfile": {
            "title": "Include creator profiles",
            "type": "boolean",
            "description": "Add each creator's profile to their notes: followers, following, notes posted, bio, IP location and verification. Fetched and charged once per creator per run. Without it, note rows still carry the creator's name, RedNote ID and profile link.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}