Haijiao Community

海角社区服务:提供社区内容列表(热帖 / 新闻 / 大事记 / 原创 / 精华 / 最新)、帖子搜索、帖子详情与评论(含二级评论)、发帖(板块 / 标签 / 图片视频)与我的帖子(审核状态)、我的收藏(收藏夹的增删改查 / 收藏与批量取消收藏)、给帖子送金币打赏(礼物清单可选)、可直接播放的视频与图片解码,以及账号注册 / 登录、金币签到(含一键全签)与账号库管理;配图为源站混淆地址,需按文档说明解密。

/api/haijiao/

Service Description

海角社区服务提供社区内容数据:内容列表按栏目返回帖子标题、摘要、作者、所属板块、标签、浏览/评论/点赞等互动数据与配图(当前 6 个栏目:热帖 hot、新闻 news、大事记 events、原创 original、精华 essence、最新 latest);搜索接口按关键词查帖并支持分页;帖子详情则返回正文、原图、视频附件、相关推荐等,评论接口分页返回楼层评论与配图(并支持「只看楼主」),二级评论接口再按主评论 ID 分页取子评论;评论正文统一去掉了源站的 HTML 标签,只返回纯文本(配图地址在 images 字段)。

发帖能力提供完整链路:板块列表(层级)与标签池取选择项 → 上传图片 / 视频拿到附件与正文片段 → 提交发帖(标题 / 正文 / 板块 / 标签 / 媒体),并可用「我的帖子」按审核状态查看发布成功 / 审核中 / 审核失败的帖子(含审核失败原因)。发帖需带源站登录态(库内账号或自定义 id + token);源站对所有新帖走人工审核,提交成功即返回成功、审核通过后才对外可见。

另外提供两类「可直接使用」的能力:图片解码(把混淆图片地址转成真实图片)与视频播放列表(已还原源站真密钥的 m3u8);以及账号能力——两步式注册(验证码先人工识别)、账号登录、每日金币签到(单账号签到与一键全部账号签到),注册成功的账号会自动写入本服务的账号库,账号库提供增删改查接口;打赏能力则按「礼物清单 + 给帖子送金币」两步完成(礼物是现买现送,按单价扣金币 / 钻石)。

本服务为公开数据实时爬取 + 文件缓存,无需登录;各栏目内容随时间变动,缓存时间较短以便及时反映更新。海角的大陆可访问域名每日变动,本服务会自动跟随当日可用域名(所有接口都指向当天域名),并提供「今日域名」接口供外部系统查询。本服务需项目签名。

注意:帖内配图为源站混淆地址(形如 …/<hash>_mini.jpg.txt,内容是自定义字母表 base64 编码的 data URI),需按各接口的说明自行解密后才能展示;帖内视频的播放地址需登录态,详情接口会用服务端配置的账号解析出 m3u8(匿名调用时为空)。

Response Format

Every endpoint returns the same JSON envelope; the payload is always inside data:

{
  "code": 10000,
  "msg": "成功",
  "data": { ... }
}
  • code: business status code. 10000 means success; anything else is an error — see the Error Codes page for the full list.
  • msg: a human-readable message you can show to end users, but never use it for program logic.
  • data: the payload; usually null on error. Each endpoint's Response section lists its data fields.

Judge success by code, not by the HTTP status code. View all error codes

Under Maintenance This service is currently in "Under Maintenance" status, the API may be temporarily unavailable. The docs and debug below are for reference only.

Haijiao Community

海角社区(dbaa49fb2c7091.top) Signature Required

实时爬取源站公开接口并缓存(无需登录)。各栏目内容随时间变动,缓存时间较短。

GET /api/haijiao/domain Total calls: 0

今日域名

获取源站当日公布的大陆可访问域名(含备用 / 海外 / 影视站域名与客服邮箱)。

  • 返回 data.domain(今日大陆可直接访问域名,即源站首页弹窗「今日大陆直接访问网址为: xxx」提示的那个)、data.backup_domain(备用域名)、data.abroad_domain(海外永久域名,需海外网络环境)、data.movie_domain(影视站域名)与 data.customer_service(客服邮箱)——手上的域名失效时可发邮件向客服索取最新域名。
  • 源站的大陆可访问域名每日变动:本服务已自动跟随当日域名,所有海角接口都指向当天可用的域名,调用方无需自行更换地址;本接口供外部系统(自建反代 / 书签 / 公告)查询当前域名。
  • 结果为服务端缓存值(默认 30 分钟),无需频繁调用;源站全部入口都探测不到时返回 EXTERNAL_API_FAILED。
Response Common envelope
Field Type Description
domain string Today's mainland domain
backup_domain string Backup domain
abroad_domain string Overseas domain
movie_domain string Movie site domain
customer_service string Support email
Example response
{
  "domain": "https://www.example.com",
  "backup_domain": "https://www.example2.com",
  "abroad_domain": "https://www.example8.com",
  "movie_domain": "https://movie.example.com",
  "customer_service": "service@example.com"
}
GET /api/haijiao/topics Total calls: 0

内容列表

按栏目获取社区内容列表,支持分页。

可选:栏目,默认 hot(热帖)。

可选:页码,从 1 开始,默认 1(源站每页 20 条)。

  • 返回 data.tab(当前栏目)、data.results(帖子列表)与 data.pagination(分页信息:page / page_size / total / total_page)。
  • 每条帖子含 topic_id、title、excerpt、node(板块)、tags(标签)、author(作者)、images(配图)、has_video、money_type、view_count / comment_count / like_count、create_time、last_comment_time。
  • tab 非法返回 PARAM_VALUE_INVALID;page 非整数返回 PARAM_FORMAT_ERROR,小于 1 返回 PARAM_VALUE_INVALID。
  • 配图解密(重要):
  • images 返回的是源站「混淆地址」,形如 https://pic.xxx.top/hjstore/images/…/<hash>_mini.jpg.txt,直接当图片引用只会拿到一段文本,必须先解密。
  • 解密步骤:① 请求该 .txt 地址,得到文本内容;② 去掉文本中所有不属于解码字母表的字符(只保留 A-Za-z0-9 与 * #,等号等一律丢弃);③ 用字母表 "ABCD*EFGHIJKLMNOPQRSTUVWX#YZabcdefghijklmnopqrstuvwxyz1234567890" 按下标取 6bit 值,每 4 个字符还原为 3 字节(末尾不足 4 个字符时按下标 0 即 A 补足);④ 还原出的字节序列按 UTF-8 解码,得到形如 data:image/jpeg;base64,… 的 data URI,即为图片本身。
  • 说明:列表接口下发的是缩略图(文件名带 _mini);正文原图需「帖子详情」,本期暂未开放。
Response Common envelope
Field Type Description
tab string Current tab
pagination object Pagination
pagination.page int Current page
pagination.page_size int Page Size
pagination.total int Total count
pagination.total_page int Total pages
results[].topic_id int Topic ID
results[].title string Title
results[].excerpt string Excerpt
results[].node object Node
results[].node.id int Node ID
results[].node.name string Node name
results[].tags array Tag list
results[].tags[].id int Tag ID
results[].tags[].name string Tag name
results[].author object Author info
results[].author.id int Author user ID
results[].author.nickname string Author nickname
results[].author.vip int Author VIP level
results[].images array Image URL list
results[].has_video bool Has video
results[].money_type int Currency type
results[].view_count int View count
results[].comment_count int Comment count
results[].like_count int Like count
results[].create_time string Publish time
results[].last_comment_time string Last comment time
Example response
{
  "tab": "hot",
  "pagination": {"page": 1, "page_size": 20, "total": 137, "total_page": 7},
  "results": [
    {
      "topic_id": 2274377,
      "title": "Post title",
      "excerpt": "Post excerpt ...",
      "node": {"id": 179, "name": "Node name"},
      "tags": [{"id": 12, "name": "tag name"}],
      "author": {"id": 13820512, "nickname": "nickname", "vip": 0},
      "images": ["https://pic.xxx.top/hjstore/images/xxxx_mini.jpg.txt"],
      "has_video": false,
      "money_type": 0,
      "view_count": 128,
      "comment_count": 3,
      "like_count": 5,
      "create_time": "2026-09-26 12:00:00",
      "last_comment_time": "2026-09-27 08:00:00"
    }
  ]
}
GET /api/haijiao/topic/detail Total calls: 0

帖子详情

获取单个帖子的详情:正文、原图、视频附件、互动数据与相关推荐。

必填:帖子 ID(取自「内容列表」的 results[].topic_id)。

可选:用自己的账号 ID 覆盖默认凭据(需与 user_token 成对),用于获取视频等需登录态的内容。

可选:与 user_id 成对提供。注意 token 走查询串会留在访问日志,请酌情使用。

  • 返回 data 含:topic_id / title / excerpt / node / tags / author / content(正文 HTML)/ images(原图地址)/ videos(视频附件)/ has_video / 互动数据 / 时间 / related(相关推荐)。
  • content 为源站正文 HTML(原样返回):其中 <img> 指向混淆图片地址、<video> 的 src 为空占位。图片请优先用 data.images,正文 HTML 未做改写。
  • 视频:videos[].url 是源站原始 m3u8,不能直接播放(源站密钥是假的,标准播放器会因分片解密失败报 fragParsingError),且随登录态下发(匿名时为空串)。请改用 videos[].play_url —— 那是本服务的「视频播放列表」接口,已还原真密钥,可直接喂给 hls.js 等播放器。
  • 图片同理:images 里的加密地址可交给本服务的「图片解码」接口,直接得到真实图片(见该接口的说明)。
  • topic_id 缺失返回 PARAM_MISSING、非数字返回 PARAM_FORMAT_ERROR;user_id / user_token 只传其一返回 PARAM_MISSING;帖子不存在返回 EXTERNAL_API_FAILED。
  • 作者头像(author.avatar / avatar_encrypted)说明:
  • 配图解密(重要):
  • 头像字段(author.avatar / results[].avatar)有两种形态,服务端都已按源站规则补成完整地址,并额外给出 avatar_encrypted 标明该地址能否直接当图片用:
  • ① 用站点默认头像的用户,源站只给 0~80 的编号 → 已补成 https://dbaa49fb2c7091.top/images/common/avatar/<编号>.jpg,avatar_encrypted=false,可直接 <img src>;
  • ② 用户自定义头像,源站给的是混淆地址(形如 …/<hash>.txt,与帖内图片同一套)→ avatar_encrypted=true,把该地址当 url 传给本服务的「图片解码」接口即可拿到真实图片。
  • images 返回的是源站「混淆地址」,形如 https://pic.xxx.top/hjstore/images/…/<hash>_mini.jpg.txt,直接当图片引用只会拿到一段文本,必须先解密。
  • 解密步骤:① 请求该 .txt 地址,得到文本内容;② 去掉文本中所有不属于解码字母表的字符(只保留 A-Za-z0-9 与 * #,等号等一律丢弃);③ 用字母表 "ABCD*EFGHIJKLMNOPQRSTUVWX#YZabcdefghijklmnopqrstuvwxyz1234567890" 按下标取 6bit 值,每 4 个字符还原为 3 字节(末尾不足 4 个字符时按下标 0 即 A 补足);④ 还原出的字节序列按 UTF-8 解码,得到形如 data:image/jpeg;base64,… 的 data URI,即为图片本身。
  • 说明:列表接口下发的是缩略图(文件名带 _mini);正文原图需「帖子详情」,本期暂未开放。
Response Common envelope
Field Type Description
topic_id int Topic ID
title string Title
excerpt string Excerpt
node object Node
node.id int Node ID
node.name string Node name
tags array Tag list
tags[].id int Tag ID
tags[].name string Tag name
author object Author info
author.id int Author user ID
author.nickname string Author nickname
author.vip int Author VIP level
author.avatar string Author avatar URL
author.avatar_encrypted bool Avatar needs decoding
content string Content HTML (returned as-is)
images array Original image URL list
videos array Video attachments
videos[].id int Attachment ID
videos[].cover string Video cover URL
videos[].url string Source m3u8 (not directly playable)
videos[].play_url string Playable playlist URL (this service)
has_video bool Has video
money_type int Currency type
purchased bool Purchased by caller
view_count int View count
comment_count int Comment count
like_count int Like count
is_cream bool Featured
is_top bool Pinned
is_original bool Original
create_time string Publish time
last_comment_time string Last comment time
related array Related list
related[].topic_id int Topic ID
related[].title string Title
related[].description string Description
related[].cover string Cover URL
related[].view_count int View count
related[].comment_count int Comment count
related[].buy_count int Purchase count
Example response
{
  "topic_id": 2271652,
  "title": "Post title",
  "excerpt": "Post excerpt ...",
  "node": {"id": 179, "name": "Node name"},
  "tags": [{"id": 12, "name": "tag name"}],
  "author": {"id": 13820512, "nickname": "nickname", "vip": 0,
             "avatar": "https://www.xxx.top/images/common/avatar/12.jpg",
             "avatar_encrypted": false},
  "content": "<p>Post content ...</p>",
  "images": ["https://pic.xxx.top/hjstore/images/xxxx.jpg.txt"],
  "videos": [{"id": 14141834, "cover": "https://pic.xxx.top/hjstore/covers/xxxx.jpg",
              "url": "https://cdn.xxx.top/video/xxxx.m3u8",
              "play_url": "/api/haijiao/video/m3u8?topic_id=2271652&attachment_id=14141834"}],
  "has_video": true,
  "money_type": 0,
  "purchased": true,
  "view_count": 1280,
  "comment_count": 23,
  "like_count": 56,
  "is_cream": false,
  "is_top": false,
  "is_original": true,
  "create_time": "2026-09-26 12:00:00",
  "last_comment_time": "2026-09-27 08:00:00",
  "related": [{"topic_id": 2270962, "title": "Related title", "description": "Related desc",
               "cover": "https://pic.xxx.top/hjstore/covers/yyyy.jpg",
               "view_count": 300, "comment_count": 5, "buy_count": 1}]
}
GET /api/haijiao/topic/comments Total calls: 0

帖子评论列表

分页获取帖子的评论(按楼层倒序,最新在前),可按「只看楼主」筛选。

必填:帖子 ID(取自「内容列表」的 results[].topic_id)。

选填:从 1 开始,默认 1(源站每页 20 条)。

选填:与源站评论区的「看全部 / 看楼主」两个 tab 一致。

  • 返回 data:topic_id / search_type / pagination(page、page_size、total、total_page)/ results(评论数组)。
  • 按楼层倒序返回(最新评论在前),源站每页 20 条。
  • results[] 字段:comment_id、floor(楼层)、content(纯文本正文)、images(配图加密地址)、author(id / nickname / avatar / avatar_encrypted / vip / famous / certified)、like_count、liked(我是否点过赞)、reply_count(子评论总数)、replies(源站随本条内联下发的子评论,只作预览)、create_time / pretty_time。
  • content 已由服务端去掉全部 HTML 标签(源站下发的是 <html><body><p>…</p></body></html> 形式的富文本):只留可读文字,块级标签与 <br> 转成换行,HTML 实体已还原。因此正文里的图片位置信息不再保留——配图请用同一条的 images 字段(源站混淆地址,形如 …/<hash>.jpg.txt,与帖内配图同一套),交给本服务的「图片解码」接口即可得到真实图片。
  • 需要某条主评论下的完整子评论列表(可翻页)时,用「二级评论」接口(comment_id 取本接口结果里的 comment_id)。
  • 本接口按调用方登录态返回 liked;匿名调用时恒为 false(默认凭据见服务说明)。
  • topic_id 缺失返回 PARAM_MISSING、非数字返回 PARAM_FORMAT_ERROR;page 非数字 / 小于 1 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID;search_type 非 0 / 1 返回 PARAM_VALUE_INVALID;帖子不存在返回 EXTERNAL_API_FAILED。
  • 作者头像(author.avatar / avatar_encrypted)说明:
  • 头像字段(author.avatar / results[].avatar)有两种形态,服务端都已按源站规则补成完整地址,并额外给出 avatar_encrypted 标明该地址能否直接当图片用:
  • ① 用站点默认头像的用户,源站只给 0~80 的编号 → 已补成 https://dbaa49fb2c7091.top/images/common/avatar/<编号>.jpg,avatar_encrypted=false,可直接 <img src>;
  • ② 用户自定义头像,源站给的是混淆地址(形如 …/<hash>.txt,与帖内图片同一套)→ avatar_encrypted=true,把该地址当 url 传给本服务的「图片解码」接口即可拿到真实图片。
Response Common envelope
Field Type Description
topic_id int Topic ID
search_type int Filter type
pagination object Pagination
pagination.page int Current page
pagination.page_size int Page Size
pagination.total int Total count
pagination.total_page int Total pages
results[].comment_id int Comment ID
results[].floor int Floor
results[].content string Content (plain text)
results[].images array Image URL list
results[].author object Author info
results[].author.id int Author user ID
results[].author.nickname string Author nickname
results[].author.avatar string Author avatar URL
results[].author.avatar_encrypted bool Avatar needs decoding
results[].author.vip int Author VIP level
results[].author.famous bool Famous
results[].author.certified bool Certified
results[].like_count int Like count
results[].liked bool Whether I liked
results[].reply_count int Total child comments
results[].replies array Inline reply preview
results[].is_sale bool Paid comment
results[].price int Paid price
results[].buy_count int Purchase count
results[].create_time string Publish time
results[].pretty_time string Relative time
Example response
{
  "topic_id": 2272780,
  "search_type": 0,
  "pagination": {"page": 1, "page_size": 20, "total": 36, "total_page": 2},
  "results": [
    {
      "comment_id": 51081038,
      "floor": 36,
      "content": "Comment text ...",
      "images": ["https://pic.xxx.top/hjstore/images/cccc.jpg.txt"],
      "author": {"id": 13820512, "nickname": "nickname",
                 "avatar": "https://www.xxx.top/images/common/avatar/12.jpg",
                 "avatar_encrypted": false, "vip": 0,
                 "famous": false, "certified": false},
      "like_count": 2,
      "liked": false,
      "reply_count": 1,
      "replies": [],
      "is_sale": false,
      "price": 0,
      "buy_count": 0,
      "create_time": "2026-09-27 08:00:00",
      "pretty_time": "1 day ago"
    }
  ]
}
GET /api/haijiao/comment/replies Total calls: 0

Replies List

分页获取某条主评论下的二级评论(子评论)。

必填:主评论 ID(取自「帖子评论列表」的 results[].comment_id)。

选填:从 1 开始,默认 1(源站每页 20 条)。

  • 源站里子评论是单独接口(按主评论 ID 查),主评论列表里内联的 replies 只适合预览;要看完整 / 翻页子评论用本接口。
  • 返回 data:comment_id(主评论 ID)/ pagination(page、page_size、total、total_page)/ results(子评论数组)。
  • results[] 字段:comment_id(本条评论 ID)、root_comment_id(所属主评论 ID)、parent_comment_id(直接回复的那条评论 ID,0 表示直接回复主评论,即标准「二级评论」)、author(id / nickname / avatar / avatar_encrypted / vip / famous / certified)、content(纯文本)、quote(被引用的内容,通常为空)、like_count、liked、reply_count(本条自己的子回复数)、last_replies(源站内联的最新一条子回复预览)、create_time / pretty_time。
  • 返回的是扁平列表:同一主评论下的各层级混在一起,层级关系靠 root_comment_id / parent_comment_id 两个 ID 自行组装(源站不做树形返回)。
  • 源站字段里另有 title(用户头衔对象)等展示信息,与业务无关,未收录。
  • comment_id 缺失返回 PARAM_MISSING、非数字返回 PARAM_FORMAT_ERROR;page 非数字 / 小于 1 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID;源站异常返回 EXTERNAL_API_FAILED。
  • 作者头像(author.avatar / avatar_encrypted)说明:
  • 头像字段(author.avatar / results[].avatar)有两种形态,服务端都已按源站规则补成完整地址,并额外给出 avatar_encrypted 标明该地址能否直接当图片用:
  • ① 用站点默认头像的用户,源站只给 0~80 的编号 → 已补成 https://dbaa49fb2c7091.top/images/common/avatar/<编号>.jpg,avatar_encrypted=false,可直接 <img src>;
  • ② 用户自定义头像,源站给的是混淆地址(形如 …/<hash>.txt,与帖内图片同一套)→ avatar_encrypted=true,把该地址当 url 传给本服务的「图片解码」接口即可拿到真实图片。
Response Common envelope
Field Type Description
comment_id int Root comment ID
pagination object Pagination
pagination.page int Current page
pagination.page_size int Page Size
pagination.total int Total count
pagination.total_page int Total pages
results[].comment_id int Comment ID
results[].root_comment_id int Root comment ID
results[].parent_comment_id int Directly replied comment ID
results[].author object Author info
results[].author.id int Author user ID
results[].author.nickname string Author nickname
results[].author.avatar string Author avatar URL
results[].author.avatar_encrypted bool Avatar needs decoding
results[].author.vip int Author VIP level
results[].author.famous bool Famous
results[].author.certified bool Certified
results[].content string Content (plain text)
results[].quote string Quoted content
results[].like_count int Like count
results[].liked bool Whether I liked
results[].reply_count int Reply count
results[].last_replies array Inline latest reply preview
results[].create_time string Publish time
results[].pretty_time string Relative time
Example response
{
  "comment_id": 51081038,
  "pagination": {"page": 1, "page_size": 20, "total": 3, "total_page": 1},
  "results": [
    {
      "comment_id": 51081039,
      "root_comment_id": 51081038,
      "parent_comment_id": 51081038,
      "author": {"id": 1001, "nickname": "user",
                 "avatar": "https://www.xxx.top/images/common/avatar/8.jpg",
                 "avatar_encrypted": false, "vip": 0,
                 "famous": false, "certified": false},
      "content": "Reply text ...",
      "quote": "",
      "like_count": 0,
      "liked": false,
      "reply_count": 0,
      "last_replies": [],
      "create_time": "2026-09-27 08:30:00",
      "pretty_time": "1 day ago"
    }
  ]
}
GET /api/haijiao/topic/nodes Total calls: 0

板块列表

获取发帖可选板块(按层级返回 children,供联动选择)。

  • 无参数:返回 data.list 为顶层板块数组,每个板块含 node_id / name / icon / description / vip_limit / display / children(子板块同结构,可嵌套多层)。
  • 发帖时传所选叶子板块的 node_id(见「发帖」接口)。
  • 板块属站点级公共数据,服务端缓存,变更不频繁。
Response Common envelope
Field Type Description
ver int Node data version
list array Top-level nodes
list[].node_id int Node ID
list[].parent_id int Parent node ID
list[].name string Node name
list[].icon string Node icon URL
list[].description string Node description
list[].vip_limit int Required VIP level
list[].display int Displayed
list[].children array Child nodes (same structure)
Example response
{
  "ver": 12,
  "list": [
    {
      "node_id": 1,
      "parent_id": 0,
      "name": "Node name",
      "icon": "https://www.xxx.top/images/nodes/1.png",
      "description": "Node description",
      "vip_limit": 0,
      "display": 1,
      "children": [
        {"node_id": 179, "parent_id": 1, "name": "Child node", "icon": "",
         "description": "", "vip_limit": 0, "display": 1, "children": []}
      ]
    }
  ]
}
GET /api/haijiao/topic/tags Total calls: 0

标签池

分页获取发帖可选标签(源站标签池,每页 20 条,最新在前)。

选填:从 1 开始,默认 1(源站每页 20 条)。

  • 返回 data.pagination 与 data.results(每项 tag_id / tag_name)。
  • 源站该接口不支持关键词搜索(前端只在已加载的一页里本地过滤),只能翻页;调用方若需要搜索,可在本页结果里自行过滤,或直接用标签名发帖。
  • 发帖的 tags 参数传标签名(不是 tag_id):不在池中的名称会被源站当作新标签,因此自定义标签直接写名称即可。
  • page 非数字 / 小于 1 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID。
Response Common envelope
Field Type Description
pagination object Pagination
pagination.page int Current page
pagination.page_size int Page Size
pagination.total int Total count
pagination.total_page int Total pages
results[].tag_id int Tag ID
results[].tag_name string Tag name
Example response
{
  "pagination": {"page": 1, "page_size": 20, "total": 500, "total_page": 25},
  "results": [{"tag_id": 1024, "tag_name": "tag name"}]
}
POST /api/haijiao/topic/upload Total calls: 0

上传发帖媒体

上传发帖用的图片 / 视频,返回附件 ID 与可直接嵌入正文的 HTML 片段。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

必填:图片(png/jpg/jpeg/gif/bmp,单张 ≤10MB)或视频(mp4)。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 本接口是 multipart/form-data,文件字段名为 file(页面在线调试可直接选文件)。
  • 源站把图片与视频放在同一个上传接口,靠返回的 category 区分类型(images / video)。
  • 返回 data.html 就是可直接拼进发帖 content 的片段:图片为 <img src="真实地址" data-id="附件ID"/>,视频为 <video src="" data-id="附件ID"></video>(源站正文里视频只留空 src 占位)。
  • 图片的 data.url 已去掉源站下发的 _mini 缩略图后缀(正文用的是原图地址);视频没有独立地址,url 为空串。
  • 上传只产生附件、不会自动带进帖子:正文里靠 data-id 关联,未发帖的附件可忽略。
  • 格式不支持 / 图片超过 10MB 返回 PARAM_VALUE_INVALID;未选文件 / 凭据缺失返回 PARAM_MISSING;账号不存在返回 NOT_FOUND(20030)。
Response Common envelope
Field Type Description
attachment_id int Attachment ID
category string Attachment type (images/video)
url string Attachment URL (empty for video)
html string HTML snippet for post content
Example response
{
  "attachment_id": 14166286,
  "category": "images",
  "url": "https://pic.xxx.top/hjstore/images/xxxx.jpg",
  "html": "<img src=\"https://pic.xxx.top/hjstore/images/xxxx.jpg\" data-id=\"14166286\"/>"
}
POST /api/haijiao/topic/create Total calls: 0

Post

发布帖子(板块 / 标签 / 标题 / 正文 / 图片视频)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

必填:板块 ID(取自「板块列表」的叶子节点 node_id)。

必填:标题,源站上限 36 字。

必填:正文 HTML;图片 / 视频片段用「上传发帖媒体」返回的 data.html 拼接。

必填:标签名,多个用英文(或中文)逗号分隔;不存在的名称会被源站当作新标签。

选填:默认普通贴。

选填:仅出售 / 悬赏有意义。

选填:默认 0;源站前端对金币按 ×100 换算(服务端已同口径处理)。

选填:仅悬赏贴,需 72-240 的整数。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 发布必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 源站对所有新帖走人工审核:提交成功时返回 data.pending=true 且 data.topic_id 通常为空,此时源站前端提示「发布成功,待审核通过后便可查看」——这不是失败。审核通过后 topic_id 才是可访问的帖子 ID(/post/details?pid=&lt;topic_id&gt;)。
  • 源站有发帖频率风控:短时间内重复发帖会直接失败并提示「请勿灌水,耐心等待4分钟再操作吧」,请控制频率。
  • 发布前服务端会按源站前端的做法先查询一次人机验证:若源站要求验证(滑块拼图),接口会直接返回错误——滑块必须人工完成,本服务无法代过,请换账号或稍后重试。
  • 正文里的图片 / 视频必须先用「上传发帖媒体」上传并拿到 data.html 片段再拼进来;只写 <img> 而没有对应 attachment 不会生效。
  • node_id / title / content / tags 缺失返回 PARAM_MISSING;title 超过 36 字、type 不在 0-2、reward_hours 不在 72-240 等返回 PARAM_VALUE_INVALID;账号不存在返回 NOT_FOUND(20030)。
Response Common envelope
Field Type Description
topic_id int Topic ID (empty while pending review)
pending bool Pending review
Example response
{"topic_id": 2274377, "pending": false}
GET /api/haijiao/topic/mine Total calls: 0

My posts

查看自己账号的帖子:发布成功 / 审核中 / 审核失败(含审核失败原因)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

选填:与源站「我的帖子」页三个 tab 一致。

选填:从 1 开始,默认 1(源站每页 10 条)。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data.status(语义化取值)、data.pagination(page / page_size / total / total_page)与 data.results(帖子数组)。
  • results[] 字段与「内容列表」基本一致(topic_id / title / excerpt / node / tags / author / images / 互动数据 / 时间),另加:pending_id(待审 ID)、source_status(源站状态码)、remarks(审核失败原因)、has_pic / has_video / has_audio、is_top / is_cream / is_original。
  • 三种状态的区别:published 与 pending 的条目有 topic_id,可拼成 https://dbaa49fb2c7091.top/post/details?pid=<topic_id>;rejected 的条目 topic_id 为空、只有 pending_id,失败原因见 remarks(源站人工审核给的说明)。
  • 源站状态码对应关系:published=3 / pending=2 / rejected=4(服务端已转换,调用方无需关心)。
  • status 非三种取值返回 PARAM_VALUE_INVALID;page 非数字 / 小于 1 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID;凭据缺失返回 PARAM_MISSING;账号不存在返回 NOT_FOUND(20030)。
Response Common envelope
Field Type Description
status string Review status
pagination object Pagination
pagination.page int Current page
pagination.page_size int Page Size
pagination.total int Total count
pagination.total_page int Total pages
results[].topic_id int Topic ID
results[].title string Title
results[].excerpt string Excerpt
results[].node object Node
results[].node.id int Node ID
results[].node.name string Node name
results[].tags array Tag list
results[].tags[].id int Tag ID
results[].tags[].name string Tag name
results[].author object Author info
results[].author.id int Author user ID
results[].author.nickname string Author nickname
results[].author.vip int Author VIP level
results[].images array Image URL list
results[].has_video bool Has video
results[].money_type int Currency type
results[].view_count int View count
results[].comment_count int Comment count
results[].like_count int Like count
results[].create_time string Publish time
results[].last_comment_time string Last comment time
results[].pending_id int Pending ID
results[].source_status int Source status code
results[].remarks string Rejection reason
results[].has_pic bool Has image
results[].has_audio bool Has audio
results[].is_top bool Pinned
results[].is_cream bool Featured
results[].is_original bool Original
Example response
{
  "status": "published",
  "pagination": {"page": 1, "page_size": 10, "total": 3, "total_page": 1},
  "results": [
    {
      "topic_id": 2274377,
      "title": "Post title",
      "excerpt": "Post excerpt ...",
      "node": {"id": 179, "name": "Node name"},
      "tags": [{"id": 12, "name": "tag name"}],
      "author": {"id": 13820512, "nickname": "nickname", "vip": 0},
      "images": [],
      "has_video": false,
      "money_type": 0,
      "view_count": 0,
      "comment_count": 0,
      "like_count": 0,
      "create_time": "2026-09-26 12:00:00",
      "last_comment_time": "",
      "pending_id": null,
      "source_status": 0,
      "remarks": "",
      "has_pic": false,
      "has_audio": false,
      "is_top": false,
      "is_cream": false,
      "is_original": false
    }
  ]
}
GET /api/haijiao/gift/list Total calls: 0

礼物列表

打赏可选的礼物清单(金币 / 钻石礼物),含各自价格。

Gift panel Click a gift to fill its item_id into the form below; the price is per gift, and the quantity comes from the quantity field.

选填:与源站打赏弹窗的两个 tab 一一对应。

选填:从 1 开始,默认 1。

  • 礼物是站点级公共数据,无需登录;一次取回该类型全部礼物(源站礼物很少)。
  • 返回 data:kind / pagination(page、page_size、total、total_page)/ results。
  • results[] 字段:item_id(礼物 ID,打赏时传它)、name、desc、kind、money_type(1=金币 2=钻石)、price(原价)、sale_price(实际单价)、img、expire_time、vip_limit。
  • 实际花费 = sale_price × 赠送数量(源站前端同样按 sale_price 计费)。
  • 当前金币礼物里最便宜的是 item_id=1「棒棒糖」(5 金币)。
  • kind 非两种取值返回 PARAM_VALUE_INVALID;page 非数字 / 小于 1 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID。
Response Common envelope
Field Type Description
kind string Gift type
pagination object Pagination
pagination.page int Current page
pagination.page_size int Page Size
pagination.total int Total count
pagination.total_page int Total pages
results[].item_id int Gift ID
results[].name string Gift name
results[].desc string Gift description
results[].kind string Gift type (gold/diamond)
results[].money_type int Currency type (1 gold, 2 diamond)
results[].price int Original price
results[].sale_price int Sale price
results[].img string Gift image URL
results[].expire_time string Expiry Time
results[].vip_limit int Required VIP level
Example response
{
  "kind": "gold",
  "pagination": {"page": 1, "page_size": 20, "total": 6, "total_page": 1},
  "results": [
    {"item_id": 1, "name": "Lollipop", "desc": "Gift description", "kind": "gold",
     "money_type": 1, "price": 5, "sale_price": 5,
     "img": "https://www.xxx.top/images/gifts/1.png",
     "expire_time": "", "vip_limit": 0}
  ]
}
GET /api/haijiao/topic/give Total calls: 0

给帖子送金币(打赏)

给帖子的作者赠送一份礼物(默认最便宜的那个),即站点的「打赏」。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.
Gift panel Click a gift to fill its item_id into the form below; the price is per gift, and the quantity comes from the quantity field.

必填:帖子 ID(取自「内容列表」/「帖子详情」的 topic_id)。

选填:取自「礼物列表」的 item_id;不传则自动选该类型里最便宜的礼物。

选填:默认 1、最大 99;实际花费 = 礼物单价 × 数量。

选填:与源站打赏弹窗的两个 tab 一一对应。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 收礼人 = 帖子作者(源站打赏弹窗传的就是作者的用户 ID),服务端自动解析,调用方只需给帖子 ID。
  • 礼物是「现买现送」:账号不需要事先拥有该礼物,直接按单价扣金币 / 钻石。
  • 会真实扣费:每次调用都会花掉 total_cost 个金币 / 钻石,同一帖子可重复打赏,请确认后再调。
  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:topic_id / item(所赠礼物)/ quantity / total_cost(本次花费)/ receiver(收礼的作者 user_id、nickname)/ money(赠送后余额)。
  • topic_id 缺失返回 PARAM_MISSING、非数字返回 PARAM_FORMAT_ERROR;quantity 非数字 / 小于 1 / 大于 99 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID;帖子不存在、礼物不存在、金币不足等源站拒绝返回 EXTERNAL_API_FAILED(以错误消息区分)。
Response Common envelope
Field Type Description
topic_id int Topic ID
item object Gift
item.item_id int Gift ID
item.name string Gift name
item.desc string Gift description
item.kind string Gift type
item.money_type int Currency type (1 gold, 2 diamond)
item.price int Original price
item.sale_price int Sale price
item.img string Gift image URL
item.expire_time string Expiry Time
item.vip_limit int Required VIP level
quantity int Quantity
total_cost int Total cost
receiver object Receiver info
receiver.user_id int Receiver user ID
receiver.nickname string Receiver nickname
money object Balance after gifting
Example response
{
  "topic_id": 2274377,
  "item": {"item_id": 1, "name": "Lollipop", "desc": "Gift description", "kind": "gold",
           "money_type": 1, "price": 5, "sale_price": 5,
           "img": "https://www.xxx.top/images/gifts/1.png",
           "expire_time": "", "vip_limit": 0},
  "quantity": 1,
  "total_cost": 5,
  "receiver": {"user_id": 13820512, "nickname": "author nickname"},
  "money": {"gold": 995, "diamond": 0}
}
GET /api/haijiao/user/follow Total calls: 0

关注 / 取消关注用户

关注某个用户,或取消对 TA 的关注(相当于个人主页的「关注」按钮)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

必填:目标用户 ID,即个人主页地址里的那段数字(https://dbaa49fb2c7091.top/homepage/<user_id>)。

选填:关注按钮的两种状态。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起关注的账号(注意不是目标用户),与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:target_user_id / action(follow / unfollow)/ followed(操作后的关注状态)。
  • 源站成功时只回状态(没有数据体),因此返回里没有对方的昵称等信息。
  • 不能关注自己;重复关注会失败(错误消息「你已关注此用户」),取关未关注的用户同样失败(「用户并未关注被取消的用户」),都返回 EXTERNAL_API_FAILED。
  • target_user_id 缺失返回 PARAM_MISSING、非数字 / 小于 1 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID;action 非两种取值返回 PARAM_VALUE_INVALID;凭据缺失返回 PARAM_MISSING;账号不存在返回 NOT_FOUND(20030)。
Response Common envelope
Field Type Description
target_user_id int Target user ID
action string Action (follow/unfollow)
followed bool Follow state after action
Example response
{"target_user_id": 13820512, "action": "follow", "followed": true}
POST /api/haijiao/user/follow/batch Total calls: 0

批量关注 / 取消关注

让账号库里全部账号,都对同一个目标用户执行关注(或取关)。

必填:目标用户 ID,即个人主页地址里的那段数字(https://dbaa49fb2c7091.top/homepage/<user_id>)。

选填:对全部账号执行的动作。

选填:从账号库的第几条开始(默认 0)。单次最多处理 account_limit 个账号;还有剩余时用返回的 next_offset 续跑。

  • 不用传凭据:直接用账号库里每个账号自己的登录态执行,遍历范围是账号库的全部账号。
  • 分批执行:单次最多处理 account_limit 个账号(默认 100,按入库顺序),返回 account_total / offset / next_offset / has_more;账号数超过上限时用上一次的 next_offset 再调一次,has_more=false 即已覆盖全部账号(函数返回文案里也会给出续跑提示)。单次 100 个约需 3~4 分钟,请把客户端超时留够。
  • 没有 token 的账号(无法登录)与「目标就是该账号自己」的账号都计入 skipped 并注明原因,不发起请求。
  • 逐个串行执行、不并发;单个账号失败不影响其它账号。整批比较慢,请把客户端超时留够:单次关注请求实测 1.7~2.7 秒。
  • 已经是目标状态(已关注 / 本来就没关注)计入 already,不记为失败。
  • 返回 data:target_user_id / action / total / success_count / already_count / skipped_count / failed_count / account_total / account_limit / offset / next_offset / has_more / items(逐账号的 account_id、user_id、username、state(done / already / skipped / failed)、message)。
  • 风控提醒:一次让大量账号关注同一目标属于明显异常行为,源站可能限制甚至封号,请自行控制频率;需要更保守可改用「关注 / 取消关注用户」逐个、间隔执行。
  • target_user_id 缺失返回 PARAM_MISSING、非数字 / 小于 1 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID;action 非两种取值返回 PARAM_VALUE_INVALID;offset 缺失按 0 处理、非整数 / 负数返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID。
Response Common envelope
Field Type Description
target_user_id int Target user ID
action string Action (follow/unfollow)
total int Account count
success_count int Success count
already_count int Already-in-target-state count
skipped_count int Skipped count
failed_count int Failed count
account_total int 账号库总条数
account_limit int 单次处理的账号数上限
offset int 本次的起始序号
next_offset int 续跑时应传的 offset
has_more bool 是否还有未处理的账号(true=需带 next_offset 再调一次)
items array Per-account results
items[].account_id string Account ID
items[].user_id string Source user ID
items[].username string Username
items[].state string State (done/already/skipped/failed)
items[].message string Result message
Example response
{
  "target_user_id": 13820512,
  "action": "follow",
  "total": 3,
  "success_count": 2,
  "already_count": 0,
  "skipped_count": 1,
  "failed_count": 0,
  "items": [
    {"account_id": "0b2e6f4a-1c3d-4e5f-8a9b-0c1d2e3f4a5b", "user_id": "13820512",
     "username": "xy_abc123456", "state": "done", "message": ""},
    {"account_id": "1c3d4e5f-2a3b-4c5d-8e9f-0a1b2c3d4e5f", "user_id": "13820513",
     "username": "xy_def789012", "state": "skipped", "message": "目标用户就是该账号自己"}
  ]
}
GET /api/haijiao/ranking Total calls: 0

排行榜

首页排行榜:粉丝榜 / 点赞榜 / 人气榜,每个榜单另有总榜 / 月榜 / 周榜。

选填:与源站首页排行榜的 tab 一一对应。

选填:榜单统计的时间范围。

  • 公开数据、无需登录;源站一次返回整张榜单、不翻页(实测粉丝 / 点赞 / 人气榜约 101 条,冷门维度与周榜可能更少)。
  • 返回 data:board / board_label / period / period_label / total / results。
  • results[] 字段:rank(名次)、user_id、nickname、avatar(头像地址)、avatar_encrypted(该头像是否需要解码)、vip / famous / certified、value(该榜单的数值:粉丝数 / 点赞数 / 人气值)、title(用户头衔:id / name / icon)。
  • 每位用户的主页地址为 https://dbaa49fb2c7091.top/homepage/<user_id>,需要看 TA 的帖子可用「关注 / 取消关注用户」同款的用户 ID。
  • 源站首页排行榜还有消费榜(consume),本服务未开放。
  • board、period 传入约定外的取值都返回 PARAM_VALUE_INVALID(20003)。
  • 头像说明:
  • 头像字段(author.avatar / results[].avatar)有两种形态,服务端都已按源站规则补成完整地址,并额外给出 avatar_encrypted 标明该地址能否直接当图片用:
  • ① 用站点默认头像的用户,源站只给 0~80 的编号 → 已补成 https://dbaa49fb2c7091.top/images/common/avatar/<编号>.jpg,avatar_encrypted=false,可直接 <img src>;
  • ② 用户自定义头像,源站给的是混淆地址(形如 …/<hash>.txt,与帖内图片同一套)→ avatar_encrypted=true,把该地址当 url 传给本服务的「图片解码」接口即可拿到真实图片。
Response Common envelope
Field Type Description
board string Ranking board
board_label string Ranking board label
period string Ranking period
period_label string Ranking period label
total int Ranking size
results array Ranking data
results[].rank int Rank
results[].user_id int User ID
results[].nickname string Nickname
results[].avatar string Avatar URL
results[].avatar_encrypted bool Avatar needs decoding
results[].vip int VIP level
results[].famous bool Famous
results[].certified bool Certified
results[].value int Ranking value
results[].title object User title
results[].title.id int Title ID
results[].title.name string Title name
results[].title.icon string Title icon
Example response
{
  "board": "fans",
  "board_label": "粉丝",
  "period": "all",
  "period_label": "总榜",
  "total": 101,
  "results": [
    {"rank": 1, "user_id": 13820512, "nickname": "nickname",
     "avatar": "https://www.xxx.top/images/common/avatar/12.jpg",
     "avatar_encrypted": false, "vip": 0, "famous": false, "certified": false,
     "value": 12000, "title": {"id": 3, "name": "Title name", "icon": ""}}
  ]
}
GET /api/haijiao/user/info Total calls: 0

用户主页信息

按用户 ID 查一个人的主页信息:昵称、头像、签名、发帖数、粉丝数、我是否已关注。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

必填:目标用户 ID(个人主页 /homepage/<user_id> 里的数字)。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 查别人主页不需要登录;但 is_followed(我是否已关注 TA)跟着调用方账号走,不带凭据时恒为 false。
  • 返回 data:user_id / nickname / avatar / avatar_encrypted / description(个性签名)/ fans_count(粉丝数)/ vip / famous / certified / is_followed / topic_count(发帖数)/ video_count / comment_count / favorite_count / like_count。
  • 排行榜、评论、帖子详情里都只有 user_id 和昵称,想了解「这个人是谁」就用本接口。
  • 配合「关注 / 取消关注用户」可完成「查人 → 关注」的闭环。
  • target_user_id 缺失返回 PARAM_MISSING、非数字 / 小于 1 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID;用户不存在返回 EXTERNAL_API_FAILED。
  • 头像说明(author.avatar / results[].avatar):
  • 头像字段(author.avatar / results[].avatar)有两种形态,服务端都已按源站规则补成完整地址,并额外给出 avatar_encrypted 标明该地址能否直接当图片用:
  • ① 用站点默认头像的用户,源站只给 0~80 的编号 → 已补成 https://dbaa49fb2c7091.top/images/common/avatar/<编号>.jpg,avatar_encrypted=false,可直接 <img src>;
  • ② 用户自定义头像,源站给的是混淆地址(形如 …/<hash>.txt,与帖内图片同一套)→ avatar_encrypted=true,把该地址当 url 传给本服务的「图片解码」接口即可拿到真实图片。
Response Common envelope
Field Type Description
user_id int User ID
nickname string Nickname
avatar string Avatar URL
avatar_encrypted bool Avatar needs decoding
description string Signature
fans_count int Follower count
vip int VIP level
famous bool Famous
certified bool Certified
is_followed bool Whether I follow
topic_count int Post count
video_count int Video count
comment_count int Comment count
favorite_count int Favorite count
like_count int Likes received
Example response
{
  "user_id": 13820512,
  "nickname": "nickname",
  "avatar": "https://www.xxx.top/images/common/avatar/12.jpg",
  "avatar_encrypted": false,
  "description": "Signature text",
  "fans_count": 1200,
  "vip": 0,
  "famous": false,
  "certified": false,
  "is_followed": false,
  "topic_count": 12,
  "video_count": 3,
  "comment_count": 45,
  "favorite_count": 8,
  "like_count": 260
}
GET /api/haijiao/user/wealth Total calls: 0

账号余额

查当前账号的金币 / 钻石余额(打赏、签到的配套)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:gold(金币)/ diamond(钻石)。
  • 打赏(给帖子送金币)前可先用本接口确认余额够不够,避免提交后才被源站拒绝。
  • 凭据缺失返回 PARAM_MISSING;账号不存在返回 NOT_FOUND(20030)。
Response Common envelope

data is passed through from the upstream balance object as-is; it currently contains gold and diamond fields; the exact fields are defined by the upstream.

GET /api/haijiao/user/wealth/log Total calls: 0

金币 / 钻石流水

查当前账号的金币 / 钻石收支流水(分页,最新在前)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

选填:金币与钻石是两套流水。

选填:从 1 开始,默认 1(源站每页 20 条)。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:kind / pagination(page、page_size、total、total_page)/ results。
  • results[] 字段:amount(正数=收入、负数=支出)、balance_after(变动后余额)、time、description(如「购买赠送物品[1-棒棒糖]1件赠送给[…]」「任务:每日签到」)。
  • 打赏 / 签到是否真的到账,用本接口核对最直接。
  • kind 非两种取值返回 PARAM_VALUE_INVALID;page 非数字 / 小于 1 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID;凭据缺失返回 PARAM_MISSING。
Response Common envelope
Field Type Description
kind string Log type
pagination object Pagination
pagination.page int Current page
pagination.page_size int Page Size
pagination.total int Total count
pagination.total_page int Total pages
results[].amount int Amount (positive income, negative expense)
results[].balance_after int Balance after
results[].time string Time
results[].description string Log description
Example response
{
  "kind": "gold",
  "pagination": {"page": 1, "page_size": 20, "total": 42, "total_page": 3},
  "results": [
    {"amount": 20, "balance_after": 1020, "time": "2026-10-01 09:00:00",
     "description": "Task: daily sign-in"}
  ]
}
GET /api/haijiao/user/following Total calls: 0

我关注的人

列出当前账号关注了哪些人(源站一次返回全部、不翻页)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:total / results(用户名片数组)。
  • results[] 字段与「用户主页信息」一致:user_id / nickname / avatar / avatar_encrypted / description / fans_count / vip / famous / certified / is_followed。
  • 源站不分页,一次全给;关注人数很多时响应会比较大。
  • 提醒:列表项里的 is_followed 实测源站恒返回 false(列表里的人本来就是已关注),别用它做判断;「用户主页信息」里的 is_followed 才可信。
  • 凭据缺失返回 PARAM_MISSING;账号不存在返回 NOT_FOUND(20030)。
Response Common envelope
Field Type Description
total int Following count
results[].user_id int User ID
results[].nickname string Nickname
results[].avatar string Avatar URL
results[].avatar_encrypted bool Avatar needs decoding
results[].description string Signature
results[].fans_count int Follower count
results[].vip int VIP level
results[].famous bool Famous
results[].certified bool Certified
results[].is_followed bool Whether I follow
Example response
{
  "total": 1,
  "results": [
    {"user_id": 13820512, "nickname": "nickname",
     "avatar": "https://www.xxx.top/images/common/avatar/12.jpg",
     "avatar_encrypted": false, "description": "Signature text", "fans_count": 1200,
     "vip": 0, "famous": false, "certified": false, "is_followed": false}
  ]
}
GET /api/haijiao/user/fans Total calls: 0

我的粉丝

分页列出当前账号的粉丝。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

选填:从 1 开始,默认 1(源站每页 20 条)。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:pagination / results(用户名片数组,字段同「我关注的人」)。
  • 粉丝数可在「用户主页信息」的 fans_count 里直接看到,本接口用来翻具体是谁。
  • page 非数字 / 小于 1 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID;凭据缺失返回 PARAM_MISSING。
Response Common envelope
Field Type Description
pagination object Pagination
pagination.page int Current page
pagination.page_size int Page Size
pagination.total int Total count
pagination.total_page int Total pages
results[].user_id int User ID
results[].nickname string Nickname
results[].avatar string Avatar URL
results[].avatar_encrypted bool Avatar needs decoding
results[].description string Signature
results[].fans_count int Follower count
results[].vip int VIP level
results[].famous bool Famous
results[].certified bool Certified
results[].is_followed bool Whether I follow
Example response
{
  "pagination": {"page": 1, "page_size": 20, "total": 88, "total_page": 5},
  "results": [
    {"user_id": 13820512, "nickname": "nickname",
     "avatar": "https://www.xxx.top/images/common/avatar/12.jpg",
     "avatar_encrypted": false, "description": "Signature text", "fans_count": 1200,
     "vip": 0, "famous": false, "certified": false, "is_followed": false}
  ]
}
GET /api/haijiao/topic/like/state Total calls: 0

查询是否已点赞

查当前账号是否已经给某帖子点过赞(点赞前先查,避免重复提交)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

必填:帖子 ID。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:topic_id / liked(是否已点赞)。
  • 「点赞 / 取消点赞」是按目标状态提交的,重复点赞不会重复计数,但先查一次可以少发一次无效请求。
  • topic_id 缺失返回 PARAM_MISSING、非数字返回 PARAM_FORMAT_ERROR;凭据缺失返回 PARAM_MISSING。
Response Common envelope
Field Type Description
topic_id int Topic ID
liked bool Liked
Example response
{"topic_id": 2274377, "liked": false}
POST /api/haijiao/topic/like Total calls: 0

点赞 / 取消点赞

给帖子点赞,或取消点赞(源站按「点赞后的目标状态」提交)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

必填:帖子 ID。

选填:明确的动作,不是「切换」。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 源站提交的是「点赞后的目标状态」(status=true/false),所以 action 传的是明确动作:传 like 就是确保点赞,传 unlike 就是确保取消,不存在「反着来」的情况。
  • 返回 data:topic_id / action / liked(操作后的状态)。
  • 点赞数变化可在「帖子详情」的 like_count 看到;点赞过的帖子用「我点赞过的帖子」查。
  • topic_id 缺失返回 PARAM_MISSING、非数字返回 PARAM_FORMAT_ERROR;action 非两种取值返回 PARAM_VALUE_INVALID;帖子不存在返回 EXTERNAL_API_FAILED。
Response Common envelope
Field Type Description
topic_id int Topic ID
action string Action (like/unlike)
liked bool State after action
Example response
{"topic_id": 2274377, "action": "like", "liked": true}
POST /api/haijiao/topic/like/batch Total calls: 0

批量点赞 / 取消点赞

让账号库里全部账号,都给同一篇帖子点赞(或取消点赞)。

必填:帖子 ID。

选填:对全部账号执行的动作。

选填:从账号库的第几条开始(默认 0)。单次最多处理 account_limit 个账号;还有剩余时用返回的 next_offset 续跑。

  • 不用传凭据:直接用账号库里每个账号自己的登录态执行,遍历范围是账号库的全部账号。
  • 分批执行:单次最多处理 account_limit 个账号(默认 100,按入库顺序),返回 account_total / offset / next_offset / has_more;账号数超过上限时用上一次的 next_offset 再调一次,has_more=false 即已覆盖全部账号(函数返回文案里也会给出续跑提示)。单次 100 个约需 3~4 分钟,请把客户端超时留够。
  • 没有 token 的账号(无法登录)计入 skipped 并注明原因,不发起请求。
  • 逐个串行执行、不并发;单个账号失败不影响其它账号。整批比较慢,请把客户端超时留够(单次点赞请求实测 1.7~2.1 秒)。
  • 已经是目标状态的账号(已点过赞 / 本来就没点赞)计入 already,不记为失败,所以重复调用是安全的。
  • 返回 data:topic_id / action / total / success_count / already_count / skipped_count / failed_count / account_total / account_limit / offset / next_offset / has_more / items(逐账号的 account_id、user_id、username、state(done / already / skipped / failed)、message)。
  • 风控提醒:一次让大量账号给同一篇帖子点赞属于明显的刷赞行为,源站可能限制甚至封号,请自行控制频率;需要更保守就用「点赞 / 取消点赞」逐个执行。
  • topic_id 缺失返回 PARAM_MISSING、非数字返回 PARAM_FORMAT_ERROR;action 非两种取值返回 PARAM_VALUE_INVALID;offset 缺失按 0 处理、非整数 / 负数返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID。
Response Common envelope
Field Type Description
topic_id int Topic ID
action string Action (like/unlike)
total int Account count
success_count int Success count
already_count int Already-in-target-state count
skipped_count int Skipped count
failed_count int Failed count
account_total int 账号库总条数
account_limit int 单次处理的账号数上限
offset int 本次的起始序号
next_offset int 续跑时应传的 offset
has_more bool 是否还有未处理的账号(true=需带 next_offset 再调一次)
items array Per-account results
items[].account_id string Account ID
items[].user_id string Source user ID
items[].username string Username
items[].state string State (done/already/skipped/failed)
items[].message string Result message
Example response
{
  "topic_id": 2274377,
  "action": "like",
  "total": 3,
  "success_count": 3,
  "already_count": 0,
  "skipped_count": 0,
  "failed_count": 0,
  "items": [
    {"account_id": "0b2e6f4a-1c3d-4e5f-8a9b-0c1d2e3f4a5b", "user_id": "13820512",
     "username": "xy_abc123456", "state": "done", "message": ""}
  ]
}
GET /api/haijiao/topic/liked Total calls: 0

我点赞过的帖子

分页列出当前账号点过赞的帖子。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

选填:从 1 开始,默认 1(源站每页 20 条)。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:pagination / results(帖子数组,字段与「内容列表」一致)。
  • page 非数字 / 小于 1 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID;凭据缺失返回 PARAM_MISSING。
  • 配图解密(重要):
  • images 返回的是源站「混淆地址」,形如 https://pic.xxx.top/hjstore/images/…/<hash>_mini.jpg.txt,直接当图片引用只会拿到一段文本,必须先解密。
  • 解密步骤:① 请求该 .txt 地址,得到文本内容;② 去掉文本中所有不属于解码字母表的字符(只保留 A-Za-z0-9 与 * #,等号等一律丢弃);③ 用字母表 "ABCD*EFGHIJKLMNOPQRSTUVWX#YZabcdefghijklmnopqrstuvwxyz1234567890" 按下标取 6bit 值,每 4 个字符还原为 3 字节(末尾不足 4 个字符时按下标 0 即 A 补足);④ 还原出的字节序列按 UTF-8 解码,得到形如 data:image/jpeg;base64,… 的 data URI,即为图片本身。
  • 说明:列表接口下发的是缩略图(文件名带 _mini);正文原图需「帖子详情」,本期暂未开放。
Response Common envelope
Field Type Description
pagination object Pagination
pagination.page int Current page
pagination.page_size int Page Size
pagination.total int Total count
pagination.total_page int Total pages
results[].topic_id int Topic ID
results[].title string Title
results[].excerpt string Excerpt
results[].node object Node
results[].node.id int Node ID
results[].node.name string Node name
results[].tags array Tag list
results[].tags[].id int Tag ID
results[].tags[].name string Tag name
results[].author object Author info
results[].author.id int Author user ID
results[].author.nickname string Author nickname
results[].author.vip int Author VIP level
results[].images array Image URL list
results[].has_video bool Has video
results[].money_type int Currency type
results[].view_count int View count
results[].comment_count int Comment count
results[].like_count int Like count
results[].create_time string Publish time
results[].last_comment_time string Last comment time
Example response
{
  "pagination": {"page": 1, "page_size": 20, "total": 15, "total_page": 1},
  "results": [
    {
      "topic_id": 2274377,
      "title": "Post title",
      "excerpt": "Post excerpt ...",
      "node": {"id": 179, "name": "Node name"},
      "tags": [{"id": 12, "name": "tag name"}],
      "author": {"id": 13820512, "nickname": "nickname", "vip": 0},
      "images": ["https://pic.xxx.top/hjstore/images/xxxx_mini.jpg.txt"],
      "has_video": false,
      "money_type": 0,
      "view_count": 128,
      "comment_count": 3,
      "like_count": 5,
      "create_time": "2026-09-26 12:00:00",
      "last_comment_time": "2026-09-27 08:00:00"
    }
  ]
}
GET /api/haijiao/favorite/folders Total calls: 0

我的收藏夹

列出当前账号的收藏夹(「我的收藏」页左侧那一栏)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:total / results(每个收藏夹含 folder_id / name / count)。
  • count 是该收藏夹里的帖子数(源站提供)。一个收藏都没有时 results 为空数组。
  • folder_id 可回填到「我收藏的帖子」按夹筛选。
  • 凭据缺失返回 PARAM_MISSING;源站拒绝(如登录态失效)返回 EXTERNAL_API_FAILED。
Response Common envelope
Field Type Description
total int Folder count
results array Folder list
results[].folder_id int Folder ID
results[].name string Folder name
results[].count int Topic count in folder
Example response
{
  "total": 2,
  "results": [
    {"folder_id": 26918701, "name": "My favorites", "count": 12},
    {"folder_id": 26918702, "name": "Later", "count": 3}
  ]
}
GET /api/haijiao/favorite/topics Total calls: 0

我收藏的帖子

分页列出当前账号收藏的帖子,可按收藏夹筛选。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

选填:从 1 开始,默认 1(源站每页 20 条)。

选填:取自「我的收藏夹」的 folder_id;不传或传 0 = 全部收藏(跨所有收藏夹,源站语义如此)。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:pagination / results(帖子数组,字段与「内容列表」一致)。
  • folder_id 不传或传 0 时返回全部收藏(跨收藏夹);传具体收藏夹 ID 才只返回该夹。
  • page 非数字 / 小于 1 返回 PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID;folder_id 非数字返回 PARAM_FORMAT_ERROR、小于 0 返回 PARAM_VALUE_INVALID;凭据缺失返回 PARAM_MISSING。
  • 配图解密(重要):
  • images 返回的是源站「混淆地址」,形如 https://pic.xxx.top/hjstore/images/…/<hash>_mini.jpg.txt,直接当图片引用只会拿到一段文本,必须先解密。
  • 解密步骤:① 请求该 .txt 地址,得到文本内容;② 去掉文本中所有不属于解码字母表的字符(只保留 A-Za-z0-9 与 * #,等号等一律丢弃);③ 用字母表 "ABCD*EFGHIJKLMNOPQRSTUVWX#YZabcdefghijklmnopqrstuvwxyz1234567890" 按下标取 6bit 值,每 4 个字符还原为 3 字节(末尾不足 4 个字符时按下标 0 即 A 补足);④ 还原出的字节序列按 UTF-8 解码,得到形如 data:image/jpeg;base64,… 的 data URI,即为图片本身。
  • 说明:列表接口下发的是缩略图(文件名带 _mini);正文原图需「帖子详情」,本期暂未开放。
Response Common envelope
Field Type Description
pagination object Pagination
pagination.page int Current page
pagination.page_size int Page Size
pagination.total int Total count
pagination.total_page int Total pages
results[].topic_id int Topic ID
results[].title string Title
results[].excerpt string Excerpt
results[].node object Node
results[].node.id int Node ID
results[].node.name string Node name
results[].tags array Tag list
results[].tags[].id int Tag ID
results[].tags[].name string Tag name
results[].author object Author info
results[].author.id int Author user ID
results[].author.nickname string Author nickname
results[].author.vip int Author VIP level
results[].images array Image URL list
results[].has_video bool Has video
results[].money_type int Currency type
results[].view_count int View count
results[].comment_count int Comment count
results[].like_count int Like count
results[].create_time string Publish time
results[].last_comment_time string Last comment time
Example response
{
  "pagination": {"page": 1, "page_size": 20, "total": 12, "total_page": 1},
  "results": [
    {
      "topic_id": 2232393,
      "title": "Post title",
      "excerpt": "Post excerpt ...",
      "node": {"id": 179, "name": "Node name"},
      "tags": [{"id": 12, "name": "tag name"}],
      "author": {"id": 13820512, "nickname": "nickname", "vip": 0},
      "images": ["https://pic.xxx.top/hjstore/images/xxxx_mini.jpg.txt"],
      "has_video": false,
      "money_type": 0,
      "view_count": 128,
      "comment_count": 3,
      "like_count": 5,
      "create_time": "2026-09-26 12:00:00",
      "last_comment_time": "2026-09-27 08:00:00"
    }
  ]
}
POST /api/haijiao/favorite/add Total calls: 0

收藏帖子

把帖子收藏到指定收藏夹(不传 folder_id 即默认收藏夹)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

必填:要收藏的帖子 ID(取自内容列表 results[].topic_id)。

选填:目标收藏夹 ID(取自「我的收藏夹」);不传或传 0 = 默认收藏夹。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:topic_id / folder_id / action(add)。
  • 重复收藏是安全的:同一帖子重复调用源站仍回成功,无需先查再收藏。
  • 帖子不存在时返回 EXTERNAL_API_FAILED(源站消息「收藏的内容不存在」)。
  • topic_id 缺失 / 非数字返回 PARAM_MISSING / PARAM_FORMAT_ERROR;folder_id 非数字返回 PARAM_FORMAT_ERROR、小于 0 返回 PARAM_VALUE_INVALID。
  • 收藏结果可用「我的收藏夹」(count 变化)与「我收藏的帖子」核对。
Response Common envelope
Field Type Description
topic_id int Topic ID
folder_id int Folder ID
action string Action (add)
Example response
{"topic_id": 2232393, "folder_id": 26918701, "action": "add"}
POST /api/haijiao/favorite/delete Total calls: 0

取消收藏帖子

取消对某篇帖子的收藏。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

必填:要取消收藏的帖子 ID。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:topic_id / action(remove)。
  • 取消未收藏的帖子源站会拒绝(消息「无法删除无效的数据」),返回 EXTERNAL_API_FAILED。
  • topic_id 缺失 / 非数字返回 PARAM_MISSING / PARAM_FORMAT_ERROR。
Response Common envelope
Field Type Description
topic_id int Topic ID
action string Action (remove)
Example response
{"topic_id": 2232393, "action": "remove"}
POST /api/haijiao/favorite/delete/batch Total calls: 0

批量取消收藏

一次取消多篇帖子的收藏(逐条串行,单次最多 50 个)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

必填:帖子 ID,多个用逗号分隔(中英文逗号都可以);自动去重,单次最多 50 个。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:total / success_count / skipped_count / failed_count / items(items[].state:done=已取消 / skipped=本来就没收藏 / failed=失败)。
  • 服务端逐条串行取消(不是源站的批量提交):源站的原生批量是「按顺序删、遇到没收藏的就报错中止、已删的不回滚」,会返回「失败但实际删了一半」的误导结果,所以这里改为一条条调,每条结果都是确定的;本来就没收藏的计入 skipped、不算失败。
  • 耗时:逐条串行,单条约 1~2 秒——50 条最坏约 1~2 分钟,请把客户端超时留够;只取消几篇时和「取消收藏帖子」没有区别。
  • topic_ids 缺失 / 全为空返回 PARAM_MISSING;含非整数项返回 PARAM_FORMAT_ERROR;含小于 1 的项、或超过 50 个返回 PARAM_VALUE_INVALID。
Response Common envelope
Field Type Description
total int Total count
success_count int Success count
skipped_count int Not-collected count
failed_count int Failed count
items array Per-item results
items[].topic_id int Topic ID
items[].state string State (done/skipped/failed)
items[].message string Result message
Example response
{
  "total": 2,
  "success_count": 1,
  "skipped_count": 1,
  "failed_count": 0,
  "items": [
    {"topic_id": 2232393, "state": "done", "message": ""},
    {"topic_id": 2270962, "state": "skipped", "message": "本来就没收藏"}
  ]
}
POST /api/haijiao/favorite/folder/add Total calls: 0

新建收藏夹

新建一个收藏夹(源站规则:名称 1-12 位字符、不可同名)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

必填:1-12 位字符(源站限制);重名会被源站拒绝。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:folder_id / name / count(新建出来的收藏夹,folder_id 可直接用于「收藏帖子」)。
  • 源站限制:名称为 1-12 位字符、不可与已有收藏夹同名(重名返回 RESOURCE_ALREADY_EXISTS)。
  • ⚠️ 源站的名字占用缺陷:收藏夹被删除或改名后,它的旧名字并不会释放——再用同一个名字新建会报「已存在!」。若确实要复用某个名字,请另换一个。
  • folder_name 缺失返回 PARAM_MISSING;超过 12 位返回 PARAM_VALUE_INVALID(不必等源站拒绝)。
  • 本接口只做「新建」;重命名请用「重命名收藏夹」。
Response Common envelope
Field Type Description
folder_id int Folder ID
name string Folder name
count int Topic count in folder
Example response
{"folder_id": 26918701, "name": "My favorites", "count": 0}
POST /api/haijiao/favorite/folder/rename Total calls: 0

重命名收藏夹

给收藏夹改名(源站规则:名称 1-12 位字符、不可同名)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

必填:要重命名的收藏夹 ID(取自「我的收藏夹」)。

必填:1-12 位字符;不可与已有收藏夹同名(含它自己当前的名字)。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:folder_id / name / action(rename)——folder_id 与 name 都是本次请求的值(源站成功后回的那个对象 id 恒为 0,不能拿来用,故不采用)。
  • 只改名字,不影响夹内的帖子(收藏内容不变)。
  • 源站限制:名称 1-12 位字符;与已有收藏夹重名会拒绝(返回 RESOURCE_ALREADY_EXISTS,消息「收藏夹【x】已存在!」);不可改成保留名「默认收藏夹」(返回 EXTERNAL_API_FAILED)。
  • 收藏夹不存在 / 不属于该账号时拒绝(消息「修改的收藏夹不存在」)。
  • ⚠️ 改完名字不会释放旧名(源站的名字占用缺陷):改名后想用回旧名字会报「已存在!」。
  • folder_id 缺失 / 非数字 / 小于 1 返回 PARAM_MISSING / PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID;folder_name 缺失返回 PARAM_MISSING、超过 12 位返回 PARAM_VALUE_INVALID。
Response Common envelope
Field Type Description
folder_id int Folder ID
name string New name
action string Action (rename)
Example response
{"folder_id": 26918701, "name": "New name", "action": "rename"}
POST /api/haijiao/favorite/folder/delete Total calls: 0

删除收藏夹

删除一个收藏夹(源站要求夹内为空)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

必填:要删除的收藏夹 ID(取自「我的收藏夹」)。

选填:传「账号列表」返回的 account_id;与 user_id + user_token 二选一。

选填:发起操作的账号,与 user_token 成对使用。

选填:与 user_id 成对使用。

  • 必须带登录态:用 account_id(库内账号),或直传 user_id + user_token。
  • 返回 data:folder_id / action(delete)。
  • 源站要求收藏夹为空:夹内还有帖子时会拒绝(消息「不能删除非空收藏夹」),返回 EXTERNAL_API_FAILED;请先用「取消收藏帖子」清空,或先移到别的夹。
  • 收藏夹不存在或不属于该账号时同样拒绝(消息「无权限操作他人的收藏夹」)。
  • ⚠️ 删掉的名字不会释放(源站的名字占用缺陷):删除后想再建同名收藏夹会报「已存在!」。
  • folder_id 缺失 / 非数字 / 小于 1 返回 PARAM_MISSING / PARAM_FORMAT_ERROR / PARAM_VALUE_INVALID。
Response Common envelope
Field Type Description
folder_id int Folder ID
action string Action (delete)
Example response
{"folder_id": 26918701, "action": "delete"}
GET /api/haijiao/image Total calls: 0

图片解码

传入加密图片地址,服务端解码后返回真实图片,可直接用于 <img src>。

必填:帖内图片的加密地址(取自内容列表 / 详情接口的 images 字段,形如 …/<hash>_mini.jpg.txt)。

  • 响应不是 JSON,而是真实图片二进制(Content-Type 为 image/jpeg 等),可直接用于 <img src>,也可下载保存。
  • 该端点已默认设为「开放」(随迁移 0032 落库):<img> 无法为请求附带签名参数,故不参与签名校验;如需收紧,可在超管控制台「服务策略」里改回「需要签名」。
  • 安全约束:只接受 http/https 公网地址(拒绝内网 / 回环 / 保留地址)、不跟随重定向、单张体积上限 5MB,且校验解码结果必须是图片(data:image/*),否则返回 EXTERNAL_API_FAILED——不能被当作通用网页代理使用。
  • url 缺失返回 PARAM_MISSING;地址非法返回 PARAM_VALUE_INVALID。
  • 不清楚加密地址怎么解?点上方「解密说明」,里面有完整的原理、步骤与 Python / JS 参考代码。
Response Common envelope

The response is not a {code, msg, data} envelope but raw image bytes (Content-Type such as image/jpeg); it can be used directly in <img src>.

Image decoding preview Server-side decoding Paste an encrypted image URL (like …/xxxx_mini.jpg.txt) and click “Decode and show” to see the real image.
GET /api/haijiao/video/m3u8 Total calls: 0

视频播放列表

获取可直接播放的 m3u8(已在服务端还原源站真密钥),供 HLS 播放器直接加载。

必填:帖子 ID(取自内容列表 results[].topic_id)。

必填:视频附件 ID(取自详情接口 videos[].id)。

  • 响应不是 JSON,而是 m3u8 播放列表文本(Content-Type: application/vnd.apple.mpegurl),可直接交给 hls.js / DPlayer 播放;视频分片仍来自源站 CDN,本服务不代理分片。
  • 源站对视频做了自定义保护:清单里的密钥是假的,真 AES-128 密钥需源站 WASM 还原。本接口已在服务端完成还原并把真密钥内嵌进清单,播放器无需再取密钥、也无需特殊处理。
  • 需要服务端配置可用的海角登录凭据(.env 的 HAIJIAO_USER_ID / HAIJIAO_USER_TOKEN),否则取不到视频地址,返回 EXTERNAL_API_FAILED。
  • 该端点已默认设为「开放」(随迁移 0031 落库):它返回播放列表文本,播放器无法为请求附带签名参数,故不参与签名校验;如需收紧,可在超管控制台「服务策略」里改回「需要签名」。
  • topic_id / attachment_id 缺失返回 PARAM_MISSING,非整数返回 PARAM_FORMAT_ERROR。
Response Common envelope

The response is not a {code, msg, data} envelope but an m3u8 playlist text (Content-Type: application/vnd.apple.mpegurl); it can be loaded directly by a player.

POST /api/haijiao/register/captcha Total calls: 0

取注册验证码

两步式注册的第一步:取注册验证码图片(供人工识别),可选经 51代理 请求。

可选:源站对注册有 IP 限制。选 true 时经 51代理 请求,提交注册会自动复用同一次出口 IP。

  • 返回 data.captcha_token(提交注册时回传)、data.captcha_image(验证码图片,data URI,可直接 <img> 展示给人工识别)、data.expires_in(有效期秒)、data.use_proxy 与 data.proxy(走代理时的出口 IP:端口)。
  • 为什么分两步:源站注册必须填图形验证码,当前先人工识别;后续接入验证码识别即可自动化(本服务已有 ddddocr 线路,但该站点验证码目前识别率不足,先用人工)。
  • 验证码会话有效期 600 秒:期间需完成「提交注册」,超时请重新获取。
  • use_proxy 仅支持 true / false,非法值返回 PARAM_VALUE_INVALID。
  • 本页下方提供「批量注册」面板:填数量 → 取多张验证码 → 每张图旁输入框逐个填码 →「一键注册」,用户名 / 密码 / 邮箱由服务端自动生成(用户名统一 xy_ 前缀)。
Response Common envelope
Field Type Description
captcha_token string Captcha session token
captcha_image string Captcha image (data URI)
expires_in int TTL (seconds)
use_proxy bool Via proxy
proxy string Proxy endpoint (IP:port)
Example response
{
  "captcha_token": "Xq3fZk9m1nPQ...",
  "captcha_image": "data:image/png;base64,iVBORw0KGgo...",
  "expires_in": 600,
  "use_proxy": false,
  "proxy": null
}
Batch registration Manual captcha entry Enter the count → fetch captchas → type each captcha next to its image → one-click register (username / password / email are generated server-side; click a captcha image to swap in a new one if unreadable)
Up to 20 per batch
POST /api/haijiao/register Total calls: 0

提交注册

两步式注册的第二步:用识别出的验证码提交注册(走代理时自动复用同一出口 IP)。

必填:上一步「取注册验证码」返回的 captcha_token。

必填:人工识别的验证码(源站要求 4-6 位)。

必填:用户名(源站上限 12 个字符)。

必填:密码,源站要求 ≥ 6 位。

必填:邮箱,需符合邮箱格式。

  • 本表单上方提供「一键填写」按钮:调用「生成注册账号凭据」接口,自动生成并填入用户名 / 邮箱 / 密码(用户名统一 xy_ 前缀、合计 12 位)。
  • 成功返回 data.user_id / username / nickname / email / token(token 为该账号的登录凭证)。
  • 参数缺失返回 PARAM_MISSING;密码不足 6 位返回 PARAM_VALUE_INVALID;验证码会话不存在或已过期返回 PARAM_VALUE_INVALID(需重新取验证码)。
  • 源站拒绝时 msg 为源站原因:「验证码错误」等业务校验不通过返回 PARAM_VALUE_INVALID,「用户名已存在 / 邮箱已被注册」等返回 RESOURCE_ALREADY_EXISTS(20031)。
  • 验证码一次性:无论成功与否,该 captcha_token 都会立即作废。
  • 本接口会在对方站点真实创建账号,请合规使用;如需限制调用方,可在超管控制台「服务策略」调整本服务的状态。
Response Common envelope
Field Type Description
user_id int Source user ID
username string Username
nickname string Nickname
email string Email
token string Login token
Example response
{
  "user_id": 13820512,
  "username": "xy_abc123456",
  "nickname": "nickname",
  "email": "xy_abc123456@abcxyz.com",
  "token": "eyJ0eXAiOiJKV1QiLCJhbGci..."
}
Generate username / email / password and fill the form above (usernames use the xy_ prefix)
POST /api/haijiao/register/credentials Total calls: 0

生成注册账号凭据

生成一组注册用的用户名 / 密码 / 邮箱(不注册、不入库),供「一键填写」或自行批量注册使用。

  • 返回 data.username / data.password / data.email。
  • 生成规则:用户名 = xy_ + 9 位随机(小写字母/数字,合计 12 位,符合源站用户名长度上限);密码 10 位(必含大写/小写/数字);邮箱 = <用户名>@<6 位随机小写字母>.com。
  • 本接口只生成不注册:需要创建账号请用「提交注册」或「批量注册」。
Response Common envelope
Field Type Description
username string Username
password string Password
email string Email
Example response
{
  "username": "xy_abc123456",
  "password": "Ab3xY9kLm2",
  "email": "xy_abc123456@abcxyz.com"
}
POST /api/haijiao/register/batch Total calls: 0

Batch registration

批量注册:按验证码逐条注册,用户名 / 密码 / 邮箱由服务端自动生成,用户名统一 xy_ 前缀。

必填:JSON 数组字符串,每项含 captcha_token 与 captcha_code;可另带 username / password / email 覆盖自动生成值。单次上限 20 项。

  • 返回 data.total / success_count / failed_count 与 data.items(逐项结果):成功项含 username / password / email / user_id / token,失败项含 msg(源站原因)。
  • 每项的 captcha_token 都来自「取注册验证码」的一次调用,需与该次识别的验证码成对使用;提交时会自动复用取码时的出口 IP(走代理时)。
  • 成功注册的账号会自动写入本服务的账号库(见「账号列表」)。
  • items 缺失返回 PARAM_MISSING;不是合法 JSON 数组返回 PARAM_FORMAT_ERROR;超过 20 项返回 PARAM_VALUE_INVALID。
Response Common envelope
Field Type Description
total int Total count
success_count int Success count
failed_count int Failed count
items array Per-item results
items[].index int Index (from 0)
items[].success bool Success
items[].username string Username
items[].password string Password
items[].email string Email
items[].user_id int Source user ID
items[].token string Login token
items[].msg string Failure reason
Example response
{
  "total": 1,
  "success_count": 1,
  "failed_count": 0,
  "items": [
    {"index": 0, "success": true, "username": "xy_abc123456", "password": "Ab3xY9kLm2",
     "email": "xy_abc123456@abcxyz.com", "user_id": 13820512, "token": "eyJ0eXAiOiJKV1Qi..."}
  ]
}
POST /api/haijiao/login Total calls: 0

Account Login

登录海角社区账号,返回可用 token;支持直传账号或按库内账号 ID 登录。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

选填:与 password 成对使用;与 account_id 二选一。

选填:与 username 成对使用。

选填:传「账号列表」返回的 account_id,服务端从账号表取用户名/密码登录,成功后回写最新 token。

  • 两种用法二选一:username + password 直传,或 account_id(库内账号)。
  • 返回 data.token(登录凭证)与 user_id / username / nickname / email。
  • 登录成功后会按源站 user_id 同步库内账号(命中才同步、不新增):刷新 token,并用源站返回的用户名 / 邮箱 / 昵称覆盖本地资料;库里没有该账号则只返回登录结果。
  • 源站登录签名为 md5(Username + Password + User-Agent),由服务端自动计算;正常风控下无需图形验证码。
  • 参数缺失返回 PARAM_MISSING;账号不存在返回 NOT_FOUND(20030);密码错误等校验不通过返回 PARAM_VALUE_INVALID(msg 为源站原因)。
Response Common envelope
Field Type Description
account_id string Account ID
user_id int Source user ID
username string Username
nickname string Nickname
email string Email
token string Login token
Example response
{
  "account_id": "0b2e6f4a-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
  "user_id": 13820512,
  "username": "xy_abc123456",
  "nickname": "nickname",
  "email": "xy_abc123456@abcxyz.com",
  "token": "eyJ0eXAiOiJKV1QiLCJhbGci..."
}
POST /api/haijiao/sign-in Total calls: 0

金币签到

每日金币签到(20 金币/天);支持按库内账号或直传登录凭据。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

选填:传「账号列表」返回的 account_id,服务端用该账号的 user_id + token 签到;与直传凭据二选一。

选填:与 user_token 成对使用,直接签到指定账号(不入库)。

选填:与 user_id 成对使用。

  • 原理:源站 POST /api/user/user_sign_in(无请求体),靠登录态请求头鉴权,故本服务用账号表里存的 user_id + token 直接签到。
  • 双重保险 + 每日本地记录:① 先查库内该账号的「最近签到日期」,等于今天即视为今日已签到,直接返回、不发任何源站请求;② 未命中才查源站任务状态,确认可签到后才真正提交;签到成功后把日期记为今天,当天后续调用都走 ①。日期按自然日比较,跨天自动失效,无需定时任务重置。
  • 返回 data.state:signed=本次签到成功(amount 为到账金币)/ already=今天已签到 (含「本地记录」/「源站确认」两种来源,见 message)/ closed=签到任务未开放。
  • 参数缺失返回 PARAM_MISSING;库内账号不存在返回 NOT_FOUND(20030);账号未存 token 时按参数缺失处理。
Response Common envelope
Field Type Description
account_id string Account ID
user_id string Source user ID
username string Username
state string Sign-in state (signed/already/closed)
amount int Coins credited
message string Description
Example response
{
  "account_id": "0b2e6f4a-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
  "user_id": "13820512",
  "username": "xy_abc123456",
  "state": "signed",
  "amount": 20,
  "message": ""
}
POST /api/haijiao/sign-in/batch Total calls: 0

一键签到全部账号

对账号表里所有已存 token 的账号逐个执行金币签到(一键全签)。

  • 无参数:一键签到「账号列表」里的全部账号。
  • 逐条走与「金币签到」相同的双重保险:今天已签到的账号命中库内记录的「最近签到日期」后不发任何源站请求,因此重复调用很快;只有未签到的账号才会查询源站并提交签到(逐个串行,避免触发源站风控)。
  • 已签到的账号计入 already_count,不算失败。
  • 返回 data.total / success_count(本次新签成功)/ already_count(今天已签)/ failed_count 与 data.items(逐账号结果:account_id / user_id / username / state / amount / msg)。
  • 本接口不修改密码 / token 等账号资料,仅回写各账号的「最近签到日期」,可安全重复调用。
Response Common envelope
Field Type Description
total int Account count
success_count int Newly signed count
already_count int Already signed count
failed_count int Failed count
items array Per-account results
items[].account_id string Account ID
items[].user_id string Source user ID
items[].username string Username
items[].state string State (signed/already/failed)
items[].amount int Coins credited
items[].msg string Result message
Example response
{
  "total": 2,
  "success_count": 1,
  "already_count": 1,
  "failed_count": 0,
  "items": [
    {"account_id": "0b2e6f4a-1c3d-4e5f-8a9b-0c1d2e3f4a5b", "user_id": "13820512",
     "username": "xy_abc123456", "state": "signed", "amount": 20, "msg": ""},
    {"account_id": "1c3d4e5f-2a3b-4c5d-8e9f-0a1b2c3d4e5f", "user_id": "13820513",
     "username": "xy_def789012", "state": "already", "amount": 0, "msg": "今天已签到(本地记录)"}
  ]
}
GET /api/haijiao/accounts Total calls: 0

Account list

分页查询已入库的海角社区账号(注册成功会自动入库)。

选填:模糊匹配 用户名 / 邮箱 / 昵称 / 源站用户ID。

选填:默认 1。

选填:1-100,默认 10。

选填:是否在列表项中携带密码明文,默认 false。

  • 返回 data.total 与 data.items;列表项包含 account_id(UUID)、user_id、username、email、nickname、remark 与 has_password / has_token 标记。
  • 出于安全,列表不回传密码与 token 明文;需要密码请传 with_password=true,需要 token 请查「账号详情」,或直接调「账号登录」(会回写最新 token)。
Response Common envelope
Field Type Description
total int Account count
page int Current page
page_size int Page Size
items array Account list
items[].account_id string Account ID
items[].user_id string Source user ID
items[].username string Username
items[].email string Email
items[].nickname string Nickname
items[].remark string Remark
items[].has_password bool Has password
items[].has_token bool Has token
items[].create_time string Created
items[].updated_time string Updated time
items[].password string Plain password (only when with_password=true)
Example response
{
  "total": 1,
  "page": 1,
  "page_size": 10,
  "items": [
    {"account_id": "0b2e6f4a-1c3d-4e5f-8a9b-0c1d2e3f4a5b", "user_id": "13820512",
     "username": "xy_abc123456", "email": "xy_abc123456@abcxyz.com", "nickname": "nickname",
     "remark": "", "has_password": true, "has_token": true,
     "create_time": "2026-09-26 12:00:00", "updated_time": "2026-09-27 08:00:00"}
  ]
}
POST /api/haijiao/accounts Total calls: 0

Add account

手动新增一条账号记录(注册成功也会自动入库,此接口用于补录/导入)。

必填:海角社区用户 ID(全局唯一,重复返回 20031)。

必填:用户名。

必填:密码(落库 AES 加密)。

选填:邮箱。

选填:昵称。

选填:登录凭证(落库 AES 加密)。

选填:备注。

  • 必填项缺失返回 PARAM_MISSING;源站用户 ID 已存在返回 RESOURCE_ALREADY_EXISTS(20031)。
Response Common envelope
Field Type Description
account_id string Account ID
user_id string Source user ID
username string Username
email string Email
nickname string Nickname
remark string Remark
has_password bool Has password
has_token bool Has token
create_time string Created
updated_time string Updated time
token string Login token
Example response
{
  "account_id": "0b2e6f4a-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
  "user_id": "13820512",
  "username": "xy_abc123456",
  "email": "xy_abc123456@abcxyz.com",
  "nickname": "nickname",
  "remark": "",
  "has_password": true,
  "has_token": true,
  "create_time": "2026-09-26 12:00:00",
  "updated_time": "2026-09-26 12:00:00",
  "token": "eyJ0eXAiOiJKV1QiLCJhbGci..."
}
GET /api/haijiao/accounts/<uuid> Total calls: 0

账号详情

按账号 ID 查询单条账号(含 token 明文)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

路径参数:账号 UUID(文档页代调时填入 account_id 即可)

选填:是否在返回中携带密码明文,默认 false。

  • 账号不存在返回 NOT_FOUND(20030)。
Response Common envelope
Field Type Description
account_id string Account ID
user_id string Source user ID
username string Username
email string Email
nickname string Nickname
remark string Remark
has_password bool Has password
has_token bool Has token
create_time string Created
updated_time string Updated time
token string Login token
password string Plain password (only when with_password=true)
Example response
{
  "account_id": "0b2e6f4a-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
  "user_id": "13820512",
  "username": "xy_abc123456",
  "email": "xy_abc123456@abcxyz.com",
  "nickname": "nickname",
  "remark": "",
  "has_password": true,
  "has_token": true,
  "create_time": "2026-09-26 12:00:00",
  "updated_time": "2026-09-27 08:00:00",
  "token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
  "password": "Ab3xY9kLm2"
}
PATCH /api/haijiao/accounts/<uuid> Total calls: 0

更新账号

部分字段更新账号(username / password / email / nickname / token / remark)。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

路径参数:账号 UUID(文档页代调时填入 account_id 即可)

选填:置空会被拒绝。

选填:置空会被拒绝。

选填。

选填。

选填。

选填。

  • user_id 是源站身份标识,不可修改;账号不存在返回 NOT_FOUND(20030)。
Response Common envelope
Field Type Description
account_id string Account ID
user_id string Source user ID
username string Username
email string Email
nickname string Nickname
remark string Remark
has_password bool Has password
has_token bool Has token
create_time string Created
updated_time string Updated time
token string Login token
Example response
{
  "account_id": "0b2e6f4a-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
  "user_id": "13820512",
  "username": "xy_abc123456",
  "email": "xy_abc123456@abcxyz.com",
  "nickname": "nickname",
  "remark": "updated",
  "has_password": true,
  "has_token": true,
  "create_time": "2026-09-26 12:00:00",
  "updated_time": "2026-09-27 09:00:00",
  "token": "eyJ0eXAiOiJKV1QiLCJhbGci..."
}
DELETE /api/haijiao/accounts/<uuid> Total calls: 0

删除账号

删除账号记录。

Account picker Search accounts in the database Search by username / user ID / nickname / remark; click a result to auto-fill account_id and user_id.

路径参数:账号 UUID(文档页代调时填入 account_id 即可)

  • 仅删除本服务的记录,不会影响源站账号;账号不存在返回 NOT_FOUND(20030)。
Response Common envelope

No business data on success (data is null).

XiaoYingAPI · Unified API Aggregation Service