Skip to content

xhs_publish_video ​

Publish video note or save as draft.

Parameters ​

ParameterTypeRequiredDescription
titlestringYesTitle (max 20 chars)
contentstringYesVideo description
videoPathstringYesAbsolute video file path
coverPathstringNoCover image path
tagsstring[]NoTopic tags
scheduleTimestringNoScheduled time (ISO 8601)
saveDraftbooleanNoSave as draft instead of publishing, default false
accountstringNoAccount to use
accountsstring[] | "all"NoMulti-account publish

Response ​

json
{
  "success": true,
  "noteId": "xxx"
}

Example ​

Basic publish ​

xhs_publish_video({
  title: "My Vlog",
  content: "Today's daily...",
  videoPath: "/path/to/video.mp4"
})

Save as draft ​

xhs_publish_video({
  title: "Video Draft",
  content: "Edit later...",
  videoPath: "/path/to/video.mp4",
  saveDraft: true
})

Custom cover ​

xhs_publish_video({
  title: "Travel Log",
  content: "...",
  videoPath: "/path/to/travel.mp4",
  coverPath: "/path/to/cover.jpg"
})

With tags ​

xhs_publish_video({
  title: "Tutorial",
  content: "...",
  videoPath: "/path/to/tutorial.mp4",
  tags: ["tutorial", "tips", "learning"]
})

Notes ​

  • Video path must be absolute
  • Requires visible browser window
  • Large videos take longer to upload
  • Drafts are saved to Xiaohongshu Creator Center

Released under the MIT License.