本文收集整理了小红书(Xiaohongshu)App的深度链接协议地址,帮助开发者实现快速跳转。所有Scheme均经真机测试验证,包含实用参数格式及调用方法说明。如果发现失效或需要补充,欢迎在评论区留言@我!

一、为什么需要小红书URL Scheme?

URL Scheme(深度链接)允许App之间实现精准跳转,可直达特定页面(如笔记详情、用户主页、话题页)。适用于:

  1. 社区引流​:公众号/微博 -> 小红书笔记
  2. 活动推广​:活动页 -> 小红书话题页
  3. 技术开发​:自定义跳转逻辑、自动化测试
  4. 用户增长​:外部拉新 -> 小红书个人主页

二、小红书 Scheme 协议清单 (最新实测)

提示​:以下协议需在已安装小红书App的设备上生效。部分Scheme需配合特定参数使用。

 

分类Scheme路径调用示例 & 重要参数功能描述适用版本
基础协议xiaohongshu://xiaohongshu://基础协议(打开App)iOS/Android
发现/首页xhsdiscover://xhsdiscover://发现页/首页(iOS)iOS
xhsdiscovery://xhsdiscovery://发现页/首页(Android)Android
用户主页xhsuserprofile://xhsuserprofile://user_id=5edfbb7a0000000001007ceb用户主页iOS/Android
xhsdiscover://user/<user_id>xhsdiscover://user/5edfbb7a0000000001007ceb?tab=note用户主页(带Tab参数)v5.35+
xhsdiscover://user/<user_id>/followersxhsdiscover://user/5edfbb7a0000000001007ceb/followers用户的粉丝列表v5.9+
xhsdiscover://user/<user_id>/collectsxhsdiscover://user/5edfbb7a0000000001007ceb/collects?tab=boards用户收藏内容v5.8+
xhsdiscover://me/profilexhsdiscover://me/profile我的个人资料页(编辑页面)v4.5+
xhsdiscover://profilexhsdiscover://profile个人主页(简化版)v5.8+
xhsdiscover://me/profilexhsdiscover://me/profile我的个人资料页v4.5+
笔记操作xhsdiscovery://notexhsdiscovery://note?noteId=6483db67000000001303ab3f笔记详情页(Android)Android
xhsdiscover://detailxhsdiscover://detail?noteId=6483db67000000001303ab3f笔记详情页(iOS)iOS
xhsdiscover://item/<note_id>xhsdiscover://item/6483db67000000001303ab3f?type=normal图文作品详情页v3.2+
xhsdiscover://video_feed/<note_id>xhsdiscover://video_feed/6483db67000000001303ab3f视频作品详情页v5.0+
xhsdiscover://guang/<note_id>xhsdiscover://guang/6483db67000000001303ab3f精选视频页-
xhsdiscover://comments/<note_id>xhsdiscover://comments/6483db67000000001303ab3f?uid=5edfbb7a0000000001007ceb笔记评论区-
消息系统xhsdiscover://user/notificationxhsdiscover://user/notification消息通知页iOS
xhsdiscover://message/collectionsxhsdiscover://message/collections赞和收藏v5.0+
xhsdiscover://message/commentsxhsdiscover://message/comments评论和@消息v5.0+
xhsdiscover://message/strangersxhsdiscover://message/strangers陌生人消息-
xhsdiscover://message/notificationsxhsdiscover://message/notifications系统通知v5.0+
内容浏览xhsdiscover://homexhsdiscover://home首页-
xhsdiscover://home/explorexhsdiscover://home/explore发现页v5.8+
xhsdiscover://home/localfeedxhsdiscover://home/localfeed同城内容-
xhsdiscover://hey_home_feedxhsdiscover://hey_home_feed日常记录流-
社交功能xhsdiscover://recommend/userxhsdiscover://recommend/user推荐用户列表v4.5+
xhsdiscover://recommend/contactsxhsdiscover://recommend/contacts通讯录好友推荐v4.5+
xhsdiscover://recommend/weiboxhsdiscover://recommend/weibo微博好友推荐v4.5+
搜索功能xhsdiscover://searchxhsdiscover://search/keyword=科技搜索页(含关键词)iOS
xhsdiscover://search/recommendxhsdiscover://search/recommend?mode=goods搜索推荐页v4.14+
xhsdiscover://search_resultxhsdiscover://search_result?keyword=露营搜索结果页iOS
商城功能xhsdiscover://mallxhsdiscover://mall商城首页iOS
xhsdiscover://home/storexhsdiscover://home/store商城首页v5.8+
xhsdiscover://page/goods/<goods_id>xhsdiscover://page/goods/57c555b78340c36ad3875529商品详情页-
xhsdiscover://spl/<spl_id>xhsdiscover://spl/57c555b78340c36ad3875529商品列表页-
xhsdiscover://spv/<spv_id>xhsdiscover://spv/57c555b78340c36ad3875529商品展示页v4.16+
发布功能xhsdiscover://postxhsdiscover://post?hash_tags=[{"id":"52d0deb1b4c4d655316b7d21"}]发布作品(相册)v5.22+
xhsdiscover://post_notexhsdiscover://post_note?ignore_draft=true发布笔记(忽略草稿)v5.22+
xhsdiscover://post_videoxhsdiscover://post_video发布视频-
xhsdiscover://notes_draft_boxxhsdiscover://notes_draft_box草稿箱-
话题功能xhsdiscover://topicxhsdiscover://topic?topicId=5e9c9d5f0000000001008e19话题/标签页iOS
xhsdiscover://page/topics/<topic_id>xhsdiscover://page/topics/5e9c9d5f0000000001008e19新话题页-
设置中心xhsdiscover://system_settingsxhsdiscover://system_settings系统设置v5.8+
xhsdiscover://account/bindxhsdiscover://account/bind账号绑定v5.0+
xhsdiscover://account/bind/phonexhsdiscover://account/bind/phone?bind_phone=138****1234手机号绑定v5.0+
xhsdiscover://dark_mode_settingxhsdiscover://dark_mode_setting深色模式设置-
其他功能xhsdiscover://choose_share_userxhsdiscover://choose_share_user选择分享用户-
xhsdiscover://reportxhsdiscover://report?type=note举报功能-
xhsdiscover://list/<tag_id>xhsdiscover://list/52d0deb1b4c4d655316b7d21标签页v4.8+
xhsdiscover://board/<board_id>xhsdiscover://board/52d0deb1b4c4d655316b7d21专辑页v3.2+
xhsdiscover://live_audiencexhsdiscover://live_audience?room_id=123456直播播放页-
xhsdiscover://hey_goalxhsdiscover://hey_goal?clockin_count=5打卡目标设置-

📝 核心笔记页调用(重点):​

// Android (常用)
xhsdiscovery://note?noteId=6483db67000000001303ab3f

// iOS (常用)
xhsdiscover://detail?noteId=6483db67000000001303ab3f

🧑 用户主页调用:​

// 通用格式 (需替换真实user_id)
xhsuserprofile://user_id=5edfbb7a0000000001007ceb 

三、技术调用方法 (代码示例)

1. Android 调用

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("xhsdiscovery://note?noteId=6483db67000000001303ab3f")); 
try {
    startActivity(intent);
} catch (ActivityNotFoundException e) {
    // 处理未安装或Scheme失效
    Toast.makeText(context, "小红书未安装", Toast.LENGTH_SHORT).show();
}

2. iOS 调用 (Swift)

let schemeUrl = URL(string: "xhsdiscover://detail?noteId=6483db67000000001303ab3f")!
if UIApplication.shared.canOpenURL(schemeUrl) {
    UIApplication.shared.open(schemeUrl, options: [:], completionHandler: nil)
} else {
    // 跳转到App Store下载页
    let appStoreUrl = URL(string: "https://apps.apple.com/cn/app/id741292507")!
    UIApplication.shared.open(appStoreUrl)
}

3. Auto.js 调用 (Android 自动化)

// 跳转图文作品
function openImageNote(noteId) {
    app.startActivity({
        'data': `xhsdiscover://item/${noteId}?open_url=%2Fdiscovery%2Fitem%2F${noteId}%3Fapp_platform%3Dandroid%26app_version%3D8.29.0%26author_share%3D1%26ignoreEngage%3Dtrue%26share_from_user_hidden%3Dtrue%26type%3Dnormal%26xsec_source%3Dapp_share%26xsec_token%3DBBUg8SvmP53lWTF7qK1buhZdglChCZhiNhfOotmm19UWQ%253D%26xhsshare%3DCopyLink%26appuid%3D671e6b46000000001d021e13%26apptime%3D1730047736&position=to_note-nav-btn&browser=chrome&launch_from=h5_note_detail&launch_strategies=android_other_urlschema_jumpinstallurl&click_point=26417&launch_strategy=wx_tag_unReady&exp_groups=m_fmp_enhance_stream&web_id=fcb67cf03d26f8ff0167711a10aab6d4&searchengine=&launch_method=method_url_schema`
    });
}

// 跳转视频作品
function openVideoNote(noteId) {
    app.startActivity({
        'data': `xhsdiscover://video_feed/${noteId}?open_url=%2Fdiscovery%2Fitem%2F${noteId}%3Fapp_platform%3Dandroid%26app_version%3D8.29.0%26author_share%3D1%26ignoreEngage%3Dtrue%26share_from_user_hidden%3Dtrue%26type%3Dvideo%26xsec_source%3Dapp_share%26xsec_token%3DBB7flhT317-lEiZkFKJbkVnoUI03b1VqatsoVwQ0Hj2kI%253D%26xhsshare%3DCopyLink%26shareRedId%3DOD0zRTlHOD82NzUyOTgwNjdHOTk1Sjc8%26apptime%3D1730047323&position=&browser=chrome&launch_from=h5_note_detail&launch_strategies=android_other_urlschema_jumpinstallurl&launch_method=auto_launch_app&launch_strategy=auto_launch_app&web_id=fcb67cf03d26f8ff0167711a10aab6d4&searchengine= `
    });
}

// 使用示例
let testNoteId = "6483db67000000001303ab3f";
openImageNote(testNoteId);   // 打开图文笔记
// openVideoNote(testNoteId);  // 打开视频笔记

参数说明表

参数名称必填示例值作用说明
noteId6483db67000000001303ab3f笔记唯一标识
typenormal(图文)/video(视频)内容类型标识
xsec_tokenBBUg8SvmP53lWTF7qK1buhZdglCh...授权令牌(动态变化)
app_platformandroid平台标识
app_version8.29.0客户端版本
author_share1作者分享标识
xhsshareCopyLink分享渠道标识
shareRedId视频专属OD0zRTlHOD82NzUyOTgwNjdHOTk1Sjc8视频加密标识


四、注意事项 & 避坑指南

  1. 参数格式​:noteId 和 userId 通常为24位Hex字符串(如 6483db67000000001303ab3f),​切勿省略
  2. 平台差异​:iOS与Android部分Scheme前缀不同(如 xhsdiscover:// vs xhsdiscovery://)。
  3. 版本兼容​:新版小红书可能废弃旧Scheme,需定期测试更新。
  4. 未安装处理​:必须增加异常捕获,引导用户下载App。
  5. URL编码​:关键词含中文时需Encode(如 科技 → %E7%A7%91%E6%8A%80)。

五、待补充 & 失效反馈

以下场景Scheme持续寻找中:​

  • 发布笔记页
  • 商品详情页
  • 私信聊天页
  • 网页通用跳转协议

如果发现本文Scheme失效,或你有未被记录的协议,欢迎在评论区留言!​
(格式:功能描述 + Scheme地址 + 参数示例,例如:“商城优惠券页:xhsdiscover://coupon?tab=1”

Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐