{
  "openapi": "3.0.1",
  "info": {
    "title": "Xiaohongshu (RedNote) Data API",
    "description": "Search Xiaohongshu notes and users, retrieve profiles, notes, comments, topics, trends, and resolve share links. Users must provide their own JustOneAPI token.",
    "version": "0.0",
    "x-build-id": "0YNw1GVxaFJaqWWVt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/justoneapi~xiaohongshu-rednote-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-justoneapi-xiaohongshu-rednote-data-api",
        "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/justoneapi~xiaohongshu-rednote-data-api/runs": {
      "post": {
        "operationId": "runs-sync-justoneapi-xiaohongshu-rednote-data-api",
        "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/justoneapi~xiaohongshu-rednote-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-justoneapi-xiaohongshu-rednote-data-api",
        "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",
            "enum": [
              "setupGuide",
              "hotSearch",
              "searchNotes",
              "searchUsers",
              "userNotes",
              "noteDetails",
              "noteVideoDetails",
              "noteComments",
              "commentReplies",
              "userProfile",
              "keywordSuggestions",
              "topicNotes",
              "resolveShareUrl"
            ],
            "type": "string",
            "description": "The Xiaohongshu data operation to run.",
            "default": "setupGuide"
          },
          "token": {
            "title": "JustOneAPI token",
            "type": "string",
            "description": "Required for API operations. Your personal access token for api.justoneapi.com. Register at https://justoneapi.com/ to obtain a token. The Actor does not include or share a token."
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Required for note search, user search, and keyword suggestions."
          },
          "searchWord": {
            "title": "Hot-search keyword",
            "type": "string",
            "description": "Optional keyword filter for hot search.",
            "default": ""
          },
          "page": {
            "title": "Page",
            "minimum": 1,
            "type": "integer",
            "description": "Page number for note and user searches.",
            "default": 1
          },
          "pageNum": {
            "title": "Hot-search page",
            "minimum": 1,
            "type": "integer",
            "description": "Page number for hot search.",
            "default": 1
          },
          "userId": {
            "title": "User ID",
            "type": "string",
            "description": "Required for user profile and user published notes."
          },
          "noteId": {
            "title": "Note ID",
            "type": "string",
            "description": "Required for note details, video details, comments, and replies."
          },
          "commentId": {
            "title": "Comment ID",
            "type": "string",
            "description": "Required for comment replies."
          },
          "topicId": {
            "title": "Topic ID",
            "type": "string",
            "description": "Required for topic note list."
          },
          "shareUrl": {
            "title": "Share URL",
            "type": "string",
            "description": "Required to resolve a Xiaohongshu share link."
          },
          "lastCursor": {
            "title": "Last cursor",
            "type": "string",
            "description": "Pagination cursor returned by the previous response."
          },
          "cursor": {
            "title": "Topic cursor",
            "type": "string",
            "description": "Pagination cursor for topic notes."
          },
          "searchId": {
            "title": "Search ID",
            "type": "string",
            "description": "For search-note pagination; use data.api_info.search_id from the previous response."
          },
          "sessionId": {
            "title": "Session ID",
            "type": "string",
            "description": "For search-note pagination; use data.api_info.session_id from the previous response."
          },
          "sortType": {
            "title": "Note search sort",
            "enum": [
              "general",
              "popularity_descending",
              "time_descending",
              "comment_descending",
              "collect_descending"
            ],
            "type": "string",
            "description": "Sort order for the note search operation.",
            "default": "general"
          },
          "noteType": {
            "title": "Note type",
            "enum": [
              "ALL",
              "VIDEO_NOTE",
              "NORMAL_NOTE"
            ],
            "type": "string",
            "description": "Filter note search results by note type.",
            "default": "ALL"
          },
          "timeFilter": {
            "title": "Publish time",
            "enum": [
              "ALL",
              "ONE_DAY",
              "ONE_WEEK",
              "HALF_YEAR"
            ],
            "type": "string",
            "description": "Filter note search results by publish time.",
            "default": "ALL"
          },
          "orderBy": {
            "title": "Hot-search ranking metric",
            "enum": [
              "premium_imp_num",
              "premium_good_read_rate",
              "premium_read_num",
              "premium_engage_num",
              "premium_engage_rate",
              "premium_like_num",
              "premium_fav_num",
              "premium_cmt_num"
            ],
            "type": "string",
            "description": "Ranking metric used by the hot-search operation.",
            "default": "premium_imp_num"
          },
          "nd": {
            "title": "Hot-search time range",
            "enum": [
              "DAY_3",
              "DAY_7",
              "DAY_14",
              "DAY_30"
            ],
            "type": "string",
            "description": "Time range used by the hot-search operation.",
            "default": "DAY_7"
          },
          "sort": {
            "title": "Comments or topic sort",
            "type": "string",
            "description": "Use latest/normal for comments and hot/time for topics."
          },
          "format": {
            "title": "Alternate note detail format",
            "type": "boolean",
            "description": "Leave disabled unless confirmed by the API administrator.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}