Xiaohongshu (RedNote) Video Downloader API – No xsec_token avatar

Xiaohongshu (RedNote) Video Downloader API – No xsec_token

Pricing

from $30.00 / 1,000 video results

Go to Apify Store
Xiaohongshu (RedNote) Video Downloader API – No xsec_token

Xiaohongshu (RedNote) Video Downloader API – No xsec_token

Get downloadable video URLs from public Xiaohongshu (RedNote) video notes without requiring xsec_token. Submit note IDs, URLs, short links, or share text and receive structured video data for automation.

Pricing

from $30.00 / 1,000 video results

Rating

0.0

(0)

Developer

LanceAPI

LanceAPI

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

RedNote (Xiaohongshu) Video Downloader API – No xsec_token Required

Turn public RedNote/Xiaohongshu video notes into direct, download-ready video URLs with optional metadata and multiple available qualities—without storing large MP4 files in your Apify storage.

No xsec_token is required for normal use. If you already have a valid token in the URL or provide one separately, the Actor can use it when resolving that public note.

Submit a 24-character note ID, full Xiaohongshu URL, supported XHS short link, or app share text. Process 1–1,000 inputs and receive one structured Dataset record per submitted item, with a playback-friendly bestVideoUrl, optional stream variants, and optional note metadata.

  • Direct video URLs for download and downstream storage workflows
  • H.264-first best-video selection for broad playback compatibility
  • Optional metadata and alternate-quality output
  • Batch processing with isolated failures
  • Duplicate-aware resolution: one record per input, one charge per canonical success
  • No valid video URL, no video-result charge

✨ Key features

Direct download-ready video URLs

Receive media.bestVideoUrl without first saving the MP4 file in Apify storage. Pass the URL to your downloader, backend, automation, or authorized storage workflow.

Playback-friendly best video selection

When multiple streams are available, the Actor prioritizes codecs in this order: H.264, H.265, AV1, then unknown codecs. Within the same codec, it prefers higher resolution, bitrate, and file size when those values are available.

Optional multiple qualities

Keep only bestVideoUrl for a smaller response, or include every detected stream variant when you need a choice of codec, resolution, or quality. Multiple returned qualities do not create additional video-result charges.

Flexible RedNote/Xiaohongshu inputs

Use bare note IDs, supported full URLs, xhslink.com or xhslink.cn short links, Markdown-wrapped links, and complete app share text.

Batch up to 1,000 inputs

Process large lists with bounded concurrency. An invalid, deleted, inaccessible, image-only, or unparseable item does not stop the remaining inputs.

Duplicate-aware processing

Every submitted input receives its own Dataset record. Equivalent notes are resolved and charged only once; later records are marked with duplicate and duplicateOf.

🚀 Quick start

Use the Actor in Apify Console:

  1. Add one RedNote/Xiaohongshu video note to urls.
  2. Click Start.
  3. Open the run's Dataset.
  4. Read media.bestVideoUrl.
  5. Turn metadata or alternate qualities off when you want a smaller response.

The smallest valid input is:

{
"urls": ["6a87dbad0000000005030ca4"]
}

Supported RedNote / Xiaohongshu inputs

The Actor accepts:

  • A 24-character hexadecimal note ID, such as 6a87dbad0000000005030ca4
  • https://www.xiaohongshu.com/explore/{noteId}
  • https://www.xiaohongshu.com/discovery/item/{noteId}
  • https://www.xiaohongshu.com/red_video/{noteId}
  • HTTP or HTTPS short links from xhslink.com and xhslink.cn
  • Complete app share text containing a supported link
  • Markdown-wrapped supported links

A note ID is usually the cleanest input. You can find it in a supported note URL after /explore/, /discovery/item/, or /red_video/, or in the noteId/id field returned by another RedNote search or user-notes workflow.

Profile URLs, user pages, search pages, and unrelated Xiaohongshu pages are not supported. Image-only note URLs can be submitted, but they return unsupported_note_type because this Actor requires a downloadable video.

Short-link redirects, tracking parameters, and equivalent supported paths are normalized to a canonical explore URL. Duplicate detection uses the canonical note ID.

Note IDs and xsec_token

xsec_token is optional. Normally, submit a note ID or URL without one. If a public note URL already contains a valid token, the Actor can use it, or you can provide the token through the separate xsecToken input.

If both are supplied, the separate xsecToken field takes precedence over the URL token. It is a run-level value, so keep different note-specific tokens in their matching URLs when processing a batch. A missing token is allowed. An expired or mismatched token can cause resolution to fail and does not provide access to private content or bypass permissions.

The separate xsecToken field is not returned in Dataset records, and request URLs are sanitized before logging. However, input preserves the exact submitted value, so a token embedded directly in a submitted URL remains visible in that record's input field.

Input

FieldTypeRequiredDefaultLimitsDescription
urlsstring[]YesNone1–1,000 itemsNote IDs, supported full URLs, short links, Markdown links, or app share text. Items are normalized and deduplicated by canonical note identity.
xsecTokenstringNoEmptyOne run-level valueOptional token for a public note. It overrides a token found in the URL and is best suited to a single-note run. For note-specific batch tokens, keep each token in its corresponding URL.
includeMetadatabooleanNotrueInclude title, description, timestamps, author, engagement, and tags. Turn off for a smaller video-focused response.
includeAllQualitiesbooleanNotrueInclude media.variants in addition to media.bestVideoUrl. Turning it off changes output size, not the number of result charges.
webSessionstringNoEmptyOne run-level valueOptional Xiaohongshu session value for public content you are authorized to access. Most users do not need it. It does not automate login, expose private content, or bypass access controls.

Need only the download URL? Set both output switches to false for a smaller, cleaner response.

Need codec or resolution choice? Keep includeAllQualities enabled.

Input examples

Download URL only

{
"urls": ["6a87dbad0000000005030ca4"],
"includeMetadata": false,
"includeAllQualities": false
}

Video URL with metadata and all qualities

{
"urls": ["https://www.xiaohongshu.com/explore/6a87dbad0000000005030ca4"],
"includeMetadata": true,
"includeAllQualities": true
}

Batch input

{
"urls": [
"6a87dbad0000000005030ca4",
"https://www.xiaohongshu.com/red_video/6a84418900000000270212b1",
"https://www.xiaohongshu.com/explore/6a840ef900000000270231e6"
],
"includeMetadata": false,
"includeAllQualities": false
}

Separate xsecToken

Replace <matching xsec_token> with an optional valid token that belongs to the public note you are processing.

{
"urls": ["6a87dbad0000000005030ca4"],
"xsecToken": "<matching xsec_token>",
"includeAllQualities": false
}

Short output example

{
"input": "6a87dbad0000000005030ca4",
"normalizedUrl": "https://www.xiaohongshu.com/explore/6a87dbad0000000005030ca4",
"success": true,
"status": "success",
"noteId": "6a87dbad0000000005030ca4",
"noteType": "video",
"coverUrl": "https://sns-webpic.example/cover.webp",
"media": {
"durationSeconds": 32.4,
"bestVideoUrl": "https://sns-video.example/video.mp4"
},
"scrapedAt": "2026-08-22T02:00:00.000Z"
}

Output

Results are written to the default Dataset in the same order as the submitted inputs. Every input receives one record, including failures and duplicates.

Successful video records always contain media.bestVideoUrl. Metadata fields are included only when includeMetadata is enabled. media.variants is included only when includeAllQualities is enabled.

Image-only notes and notes without an accessible video stream return failure records. They do not return bestVideoUrl and do not trigger video-result charges.

Complete output field reference

Core result

FieldTypeAvailabilityMeaning
inputstringAlwaysExact submitted input value.
normalizedUrlstringSuccessful videoCanonical https://www.xiaohongshu.com/explore/{noteId} URL without tracking parameters.
successbooleanAlwaystrue only when a valid downloadable video URL was returned.
statusstringAlwaysStable processing outcome. See Status values.
noteIdstringSuccessful videoCanonical RedNote/Xiaohongshu note ID.
noteTypestringSuccessful videovideo. Non-video notes return a failure record instead.
scrapedAtstringSuccessful videoUTC ISO 8601 timestamp for result creation.

Video and media

FieldTypeAvailabilityMeaning
coverUrlstringWhen availableDirect cover-image URL. This remains available when metadata is disabled.
media.durationSecondsnumberSuccessful videoVideo duration in seconds. May be 0 if the source provides no duration.
media.bestVideoUrlstringSuccessful videoSelected direct video URL. The Actor requires this field before marking a result successful or charging it.
media.variantsobject[]When includeAllQualities is trueDetected stream variants in source order. May be an empty array.
media.variants[].codecstringPer varianth264, h265, av1, or unknown.
media.variants[].urlstringPer variantDirect URL for that representation.
media.variants[].widthnumberWhen availablePixel width.
media.variants[].heightnumberWhen availablePixel height.
media.variants[].durationnumberWhen availableVariant duration in seconds.
media.variants[].bitratenumberWhen availableSource-provided bitrate value.
media.variants[].sizeBytesnumberWhen availableSource-provided file size in bytes.
media.variants[].qualityLabelstringWhen availableSource-provided quality label.

The output does not invent MIME type, extension, or unavailable codec metadata.

Optional note metadata

These fields are omitted when includeMetadata is false.

FieldTypeAvailabilityMeaning
titlestringMetadata enabledNative note title. It can be an empty string; share text is not used as a fallback title.
descriptionstringMetadata enabledNative note description.
createdAtintegerWhen availableSource creation time as a Unix timestamp in milliseconds.
createdAtIsostringWhen validcreatedAt converted to UTC ISO 8601.
updatedAtintegerWhen availableSource update time as a Unix timestamp in milliseconds.
updatedAtIsostringWhen validupdatedAt converted to UTC ISO 8601.
tagsobject[]Metadata enabledNote topics/tags. Timestamp-style moment tags are excluded.
tags[].idstringWhen availableSource tag ID.
tags[].namestringPer tagTag name.

Author

FieldTypeAvailabilityMeaning
author.userIdstringMetadata enabledXiaohongshu user ID; can be empty if unavailable.
author.nicknamestringMetadata enabledDisplay name.
author.avatarUrlstringWhen availableDirect avatar URL.
author.profileUrlstring | nullMetadata enabledLocally generated public profile URL, or null without a user ID.
author.redIdstringWhen availableSource-provided Red ID.
author.verifiedbooleanWhen availableSource-provided verification flag.

Engagement

FieldTypeAvailabilityMeaning
engagement.likesnumberMetadata enabledNormalized like count.
engagement.commentsnumberMetadata enabledNormalized comment count.
engagement.collectsnumberMetadata enabledNormalized collection/save count.
engagement.sharesnumberMetadata enabledNormalized share count.

Duplicate and error fields

FieldTypeAvailabilityMeaning
duplicatebooleanDuplicate inputstrue when the canonical note was already processed earlier in the same run.
duplicateOfstringDuplicate inputsOriginal input value of the first matching record.
error.codestringFailed resultsStable machine-readable failure code.
error.messagestringFailed resultsSafe user-facing explanation.

Status values

status describes the overall result category. error.code gives the more specific failure reason.

StatusMeaningVideo URLCharged?
successA valid video note and bestVideoUrl were returned.YesOne canonical video-result
invalid_inputInput was empty, malformed, or could not become a note URL.NoNo
unsupported_urlDomain, protocol, or Xiaohongshu path is unsupported.NoNo
short_link_resolution_failedA supported short link could not be resolved.NoNo
note_not_foundThe note was missing or no longer publicly accessible.NoNo
access_deniedThe public note request was denied.NoNo
page_fetch_failedNote data could not be retrieved after retries.NoNo
parse_failedRetrieved note data could not be parsed safely.NoNo
unsupported_note_typeThe submitted note is image-only or otherwise not a video note.NoNo
media_not_foundA video note was found but no accessible video stream was returned.NoNo
internal_errorAn unexpected per-input error occurred.NoNo

A duplicate of a successful canonical record can also have status: "success", but the duplicate record does not trigger another charge.

Error codes

Error codeStatusMeaning
EMPTY_INPUTinvalid_inputThe item was empty.
URL_NOT_FOUNDinvalid_inputNo supported URL or note ID was found.
INVALID_URLinvalid_inputExtracted URL syntax was invalid.
INPUT_REQUIRES_RESOLVABLE_URLinvalid_inputInput could not be converted into a public note URL.
UNSUPPORTED_PROTOCOLunsupported_urlProtocol is not HTTP or HTTPS.
UNSUPPORTED_DOMAINunsupported_urlDomain is not supported.
UNSUPPORTED_PATHunsupported_urlURL is not a supported note page.
SHORT_LINK_RESOLUTION_FAILEDshort_link_resolution_failedShort-link redirect failed or returned an invalid destination.
NOTE_NOT_FOUNDnote_not_foundNote was missing or unavailable.
ACCESS_DENIEDaccess_deniedPublic note request was denied.
PAGE_FETCH_FAILEDpage_fetch_failedPublic note page could not be fetched after retries.
INITIAL_STATE_NOT_FOUNDparse_failedExpected public note state was missing.
INITIAL_STATE_INVALIDparse_failedPublic note state was incomplete or invalid.
NOTE_DATA_INVALIDparse_failedNote data had an unexpected structure.
NOT_A_VIDEO_NOTEunsupported_note_typeThe note contains no downloadable video.
VIDEO_MEDIA_NOT_FOUNDmedia_not_foundNo accessible video stream was found.
INTERNAL_ERRORinternal_errorUnexpected per-input processing error.

Output examples

Successful video note with all qualities

{
"input": "https://www.xiaohongshu.com/explore/6a87dbad0000000005030ca4",
"normalizedUrl": "https://www.xiaohongshu.com/explore/6a87dbad0000000005030ca4",
"success": true,
"status": "success",
"noteId": "6a87dbad0000000005030ca4",
"noteType": "video",
"coverUrl": "https://sns-webpic.example/cover.webp",
"media": {
"durationSeconds": 56,
"bestVideoUrl": "https://sns-video.example/h264-1080.mp4",
"variants": [
{
"codec": "h264",
"url": "https://sns-video.example/h264-1080.mp4",
"width": 1080,
"height": 1920,
"duration": 56,
"bitrate": 2400000,
"qualityLabel": "HD"
},
{
"codec": "h265",
"url": "https://sns-video.example/h265-2160.mp4",
"width": 2160,
"height": 3840
}
]
},
"title": "Example video note",
"description": "Example description",
"createdAt": 1766571252000,
"createdAtIso": "2025-12-24T10:14:12.000Z",
"author": {
"userId": "66ec990b000000001d031c8b",
"nickname": "Example creator",
"avatarUrl": "https://sns-avatar.example/avatar.webp",
"profileUrl": "https://www.xiaohongshu.com/user/profile/66ec990b000000001d031c8b"
},
"engagement": {
"likes": 1200,
"comments": 18,
"collects": 44,
"shares": 9
},
"tags": [{ "id": "topic", "name": "Swimming" }],
"scrapedAt": "2026-08-22T02:00:00.000Z"
}

Successful video note with only the best URL

{
"input": "6a87dbad0000000005030ca4",
"normalizedUrl": "https://www.xiaohongshu.com/explore/6a87dbad0000000005030ca4",
"success": true,
"status": "success",
"noteId": "6a87dbad0000000005030ca4",
"noteType": "video",
"coverUrl": "https://sns-webpic.example/cover.webp",
"media": {
"durationSeconds": 56,
"bestVideoUrl": "https://sns-video.example/h264-1080.mp4"
},
"scrapedAt": "2026-08-22T02:00:00.000Z"
}

Duplicate input

{
"input": "https://www.xiaohongshu.com/red_video/6a87dbad0000000005030ca4",
"normalizedUrl": "https://www.xiaohongshu.com/explore/6a87dbad0000000005030ca4",
"success": true,
"status": "success",
"noteId": "6a87dbad0000000005030ca4",
"noteType": "video",
"media": {
"durationSeconds": 56,
"bestVideoUrl": "https://sns-video.example/h264-1080.mp4"
},
"duplicate": true,
"duplicateOf": "6a87dbad0000000005030ca4",
"scrapedAt": "2026-08-22T02:00:00.000Z"
}

Image-only note

{
"input": "6a840ef900000000270231e6",
"success": false,
"status": "unsupported_note_type",
"error": {
"code": "NOT_A_VIDEO_NOTE",
"message": "This RedNote post does not contain a downloadable video."
}
}

Invalid input

{
"input": "https://www.xiaohongshu.com/user/profile/example",
"success": false,
"status": "unsupported_url",
"error": {
"code": "UNSUPPORTED_PATH",
"message": "This Xiaohongshu URL is not a supported note page."
}
}

Deleted or inaccessible note

{
"input": "6a67603c000000000503be3f",
"success": false,
"status": "note_not_found",
"error": {
"code": "NOTE_NOT_FOUND",
"message": "The RedNote note could not be found or is no longer publicly accessible."
}
}

API usage

The Actor slug is lance_api/rednote-video-downloader-api.

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('lance_api/rednote-video-downloader-api').call({
urls: ['6a87dbad0000000005030ca4'],
includeMetadata: true,
includeAllQualities: false,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]?.media?.bestVideoUrl);

Python

import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("lance_api/rednote-video-downloader-api").call(run_input={
"urls": ["6a87dbad0000000005030ca4"],
"includeMetadata": True,
"includeAllQualities": False,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items[0].get("media", {}).get("bestVideoUrl"))

cURL

This synchronous endpoint runs the Actor and returns the default Dataset items:

curl -X POST \
"https://api.apify.com/v2/acts/lance_api~rednote-video-downloader-api/run-sync-get-dataset-items?format=json" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"urls": ["6a87dbad0000000005030ca4"],
"includeMetadata": false,
"includeAllQualities": false
}'

In the returned JSON array, read [0].media.bestVideoUrl.

💰 Simple, transparent pricing

You pay only for canonical results that successfully return a valid media.bestVideoUrl.

  • Standard Free price: $0.040 per successful video result — $40 per 1,000
  • Lowest eligible discounted price: from $0.030 per successful video result — $30 per 1,000

Check the Actor's Pricing tab for the current rate available to your Apify plan.

One successful canonical video emits one video-result. Returning multiple available qualities still emits only one event.

Invalid inputs, unsupported URLs, failed short links, deleted or inaccessible notes, image-only notes, missing video media, parse/fetch failures, invalid or expired token failures, unsuccessful session-assisted requests, and duplicate-only records do not add a video-result charge.

No valid video URL, no video-result charge.

Use cases

  • Video download automation: Pass temporary download-ready URLs to your own downloader or storage workflow.
  • Media catalogs: Build structured catalogs with video URLs, covers, note metadata, authors, and engagement.
  • Creator and competitor research: Analyze public video-note metadata that you are authorized to collect.
  • Content research: Combine video URLs and structured context in downstream datasets.
  • Backup and archival workflows: Copy permitted media to your storage before temporary CDN URLs expire.
  • AI and RAG workflows: Use public note text and metadata as context for downstream language-model systems.
  • API automation: Connect a Xiaohongshu Video Downloader to n8n, Make, Zapier, backend jobs, or data pipelines.

How it works

  1. Parse the note ID, full URL, short link, Markdown link, or share text.
  2. Normalize it to a canonical RedNote/Xiaohongshu note identity.
  3. Deduplicate equivalent inputs while preserving one record per submitted item.
  4. Resolve the public video note and its available streams.
  5. Select the best compatible video and optionally include all detected variants.
  6. Save normalized success or failure records to the default Dataset in input order.

🤖 Use with AI agents

Use this Actor through the Apify MCP Server from ChatGPT, Claude, Cursor, Codex, or another MCP-compatible client. MCP runs use the same Actor pricing as normal Apify runs.

Example prompt:

Use the Apify Actor lance_api/rednote-video-downloader-api to resolve download-ready video URLs from these public RedNote/Xiaohongshu video notes. Return the input, note ID, title, best video URL, available qualities, author, engagement, and processing status. Prefer only the best compatible video unless I explicitly ask for all qualities.

FAQ

Which RedNote/Xiaohongshu URLs are supported?

Supported note paths are /explore/{id}, /discovery/item/{id}, and /red_video/{id}. The Actor also accepts xhslink.com/xhslink.cn short links and app share text containing a supported link.

Can I submit note IDs directly?

Yes. A 24-character hexadecimal note ID is the preferred input.

Can I process up to 1,000 notes?

Yes. urls accepts 1–1,000 items, and each submitted item receives one Dataset record.

Does the Actor download MP4 files into Apify storage?

No. It returns direct media URLs. Download or copy permitted media separately if you need permanent storage.

What is bestVideoUrl?

It is the direct video URL selected for broad playback compatibility and then quality within the selected codec.

How does the Actor choose the best video?

It prefers H.264, then H.265, AV1, and unknown codecs. Within one codec, it prefers higher resolution, bitrate, and size when available.

Can I get multiple video qualities?

Yes. Keep includeAllQualities: true to receive media.variants. Set it to false to keep only bestVideoUrl.

Does returning multiple qualities cost more?

No. A canonical successful note is charged once even when multiple qualities are returned.

Are duplicate inputs charged twice?

No. Canonical duplicates keep individual Dataset records but are resolved and charged only once per run.

What happens if I submit an image-only note?

It returns success: false, status: "unsupported_note_type", and error.code: "NOT_A_VIDEO_NOTE". It has no bestVideoUrl and no video-result charge. Metadata is not returned for this failure record.

Are video URLs permanent?

No. They are RedNote/Xiaohongshu CDN URLs returned at processing time, and some include temporary signatures. Download or copy permitted media to your own storage promptly when you need long-term access.

Do I need xsec_token?

Usually not. Provide a valid matching token only when you already have one for a public note that requires it. The separate field overrides a token in the URL.

Do I need webSession?

Usually not. Use it only for direct public-page requests with a session you are authorized to use. It does not automate login, expose private content, or bypass permissions.

Can this Actor access private content?

No. It is designed for publicly accessible notes and does not bypass login or access controls.

How am I charged?

Only a canonical successful result with a valid media.bestVideoUrl emits one video-result. Failures and duplicate-only records do not add that charge.

Can an AI agent use this Actor?

Yes. Use lance_api/rednote-video-downloader-api through the Apify API or Apify MCP Server.

Limitations

  • Publicly accessible content only; no login automation or access-control bypass
  • Image-only notes do not produce video URLs
  • Deleted, unavailable, or restricted notes can fail
  • Profile, user, and search pages are unsupported
  • Short-link handling depends on a valid redirect response
  • xsec_token values can expire or become invalid
  • Returned CDN media URLs can expire or stop working
  • Available codec, resolution, bitrate, and quality fields vary by note
  • Optional metadata fields can be empty, null, or omitted when unavailable
  • Platform changes can temporarily affect resolution or parsing
  • The Actor does not permanently host or store video files

Public data and responsible use

Use this Actor only for lawful access to public content. Respect RedNote/Xiaohongshu terms, Apify terms, copyright, privacy, and applicable law. Do not use it for harassment, spam, unlawful profiling, attempts to access private information, or access-control bypass.

Support

For help, contact lanceapi2026@hotmail.com and include:

  • Apify Run ID
  • A non-sensitive note ID or public URL
  • Returned status and error.code
  • Expected result and actual result

Do not send Apify tokens, cookies, webSession values, xsec_token values, API keys, or passwords.