search
models.search
Search API 返回模型定义.
SongSearch
pydantic-model
Bases: Song
搜索场景下的歌曲详尽模型.
| ATTRIBUTE | DESCRIPTION |
|---|---|
search_title |
搜索命中的标题 (可能包含高亮标签).
TYPE:
|
title_main |
歌曲主标题.
TYPE:
|
title_extra |
歌曲附加标题.
TYPE:
|
fav_show |
收藏数展示文案 (如 "5500w+").
TYPE:
|
tag |
标签 ID.
TYPE:
|
desc |
歌曲描述文案.
TYPE:
|
desc_icon |
描述文案前的图标链接.
TYPE:
|
content |
搜索结果内容摘要,当搜索命中歌词或特定评论时,该字段存放命中的文本片段.
TYPE:
|
hotness |
热度数据对象. |
hotness_desc |
热度描述 (如榜单名).
TYPE:
|
vec_hotness |
热度榜单详情列表. |
new_status |
新版状态位 (2: 正常).
TYPE:
|
protect |
是否受到版权保护.
TYPE:
|
relatedword_group |
相关搜索词推荐组. |
Config:
populate_by_name:Trueextra:ignorefrozen:True
Fields:
-
id(int) -
mid(str) -
name(str) -
type(int) -
title(str) -
subtitle(str) -
singer(list[Singer]) -
album(Album) -
mv(MV) -
file(File) -
pay(Pay) -
interval(int) -
isonly(int) -
language(int) -
genre(int) -
index_cd(int) -
index_album(int) -
time_public(str) -
status(int) -
label(str) -
bpm(int) -
ov(int) -
sa(int) -
es(str) -
vs(list[str]) -
vi(list[int]) -
vf(list[float]) -
search_title(str) -
title_main(str) -
title_extra(str) -
fav_show(str) -
desc(str) -
desc_icon(str) -
hotness(dict[str, Any]) -
hotness_desc(str) -
vec_hotness(list[dict[str, Any]]) -
content(str) -
new_status(int) -
protect(int) -
relatedword_group(dict[str, Any])
AlbumSearch
pydantic-model
Bases: Album
搜索场景下的专辑详尽模型.
| ATTRIBUTE | DESCRIPTION |
|---|---|
album_type |
专辑类型标识 (来自 $.core_album_config.album_type).通常 1 代表正规专辑.
|
singer |
搜索命中的高亮歌手名称.通常包含
TYPE:
|
singer_list |
结构化的歌手对象列表.包含歌手的数字 ID 和标准名称. |
pic |
专辑封面图片 URL (通常为 180x180 或 300x300 规格).
TYPE:
|
pic_icon |
封面配套显示的勋章或类型图标链接.
TYPE:
|
publish_date |
专辑发行日期 (YYYY-MM-DD).
TYPE:
|
description |
简短描述文案.在搜索结果中常存放发行日期或厂牌.
TYPE:
|
description2 |
备用描述文案.
TYPE:
|
desc_detail |
详尽描述对象.包含长篇专辑介绍及背景信息. |
hotness |
热度数据对象.包含收藏量、趋势等原始数值. |
hotness_desc |
热度简述文案.如“全网热搜”、“飙升榜前十”.
TYPE:
|
audio_play |
播放排行信息.包含榜单名称及具体排名.
TYPE:
|
label_new |
专辑关联的特性标签对象. |
tag_list |
专辑标签列表.用于 UI 显示“数字专辑”、“独家”等勋章. |
url |
静态元数据下载链接.
TYPE:
|
Fields:
-
id(int) -
mid(str) -
name(str) -
title(str) -
subtitle(str) -
time_public(str) -
pmid(str) -
desc_detail(dict[str, Any]) -
description(str) -
description2(str) -
type(int) -
award_label(str) -
hotness(dict[str, Any]) -
hotness_desc(str) -
label_new(dict[str, Any]) -
audio_play(RankingInfo) -
pic(str) -
pic_icon(str) -
singer(str) -
singer_list(list[Singer]) -
tag_list(list[str]) -
url(str)
SongListSearch
pydantic-model
SingerSearch
pydantic-model
Bases: Singer
搜索场景下的歌手模型.
| ATTRIBUTE | DESCRIPTION |
|---|---|
pic |
歌手头像地址.
TYPE:
|
song_num |
歌曲数量.
TYPE:
|
album_num |
专辑数量.
TYPE:
|
mv_num |
MV 数量.
TYPE:
|
subtitle |
补充描述文案.
TYPE:
|
Fields:
-
id(int) -
mid(str) -
name(str) -
title(str) -
type(int) -
uin(int) -
pmid(str) -
pic(str) -
song_num(int) -
album_num(int) -
mv_num(int) -
subtitle(str)
MvSearch
pydantic-model
Bases: MV
搜索场景下的 MV 模型.
| ATTRIBUTE | DESCRIPTION |
|---|---|
pic |
MV 封面地址.
TYPE:
|
play_count |
MV 播放量.
TYPE:
|
duration |
MV 时长.
TYPE:
|
publish_date |
发布时间.
TYPE:
|
singer_id |
歌手 ID.
TYPE:
|
singer_mid |
歌手 MID.
TYPE:
|
singer_name |
歌手名称.
TYPE:
|
Fields:
-
id(int) -
vid(str) -
type(int) -
name(str) -
title(str) -
pic(str) -
play_count(int) -
duration(int) -
publish_date(str) -
singer_id(int) -
singer_mid(str) -
singer_name(str)
GeneralSearchRequestBody
pydantic-model
RelatedSearchWord
pydantic-model
SearchSelector
pydantic-model
SearchByTypeResponse
pydantic-model
Bases: Response
按指定类型搜索时的响应模型.
它将元信息与对应分类的实体列表放在同一对象中,便于直接消费该类型下的当前页结果.
| ATTRIBUTE | DESCRIPTION |
|---|---|
searchid |
搜索会话 ID,用于后续相关请求.
TYPE:
|
perpage |
每页结果数量.
TYPE:
|
nextpage |
下一页页码,-1 表示已加载全部结果.
TYPE:
|
estimate_sum |
搜索命中的预估总记录数.
TYPE:
|
total_num |
搜索命中的确切总记录数.
TYPE:
|
song |
单曲、歌词或节目类型下的结果列表.
TYPE:
|
singer |
歌手结果列表.
TYPE:
|
album |
专辑结果列表.
TYPE:
|
songlist |
歌单结果列表.
TYPE:
|
user |
用户结果列表. |
audio_alum |
节目专辑结果列表.
TYPE:
|
mv |
MV 结果列表. |
selectors |
搜索筛选器列表.
TYPE:
|
Fields:
-
searchid(str) -
perpage(int) -
nextpage(int) -
estimate_sum(int) -
total_num(int) -
song(list[SongSearch]) -
singer(list[SingerSearch]) -
album(list[AlbumSearch]) -
songlist(list[SongListSearch]) -
user(list[dict[str, Any]]) -
audio_alum(list[AlbumSearch]) -
mv(list[MvSearch]) -
selectors(list[list[SearchSelector]])
GeneralSearchResponse
pydantic-model
Bases: Response
综合搜索响应模型.
每个分类字段都是独立的结果容器,既给出当前已返回的数据,也保留该分类继续翻页所需的上下文.
| ATTRIBUTE | DESCRIPTION |
|---|---|
searchid |
搜索会话 ID,用于后续相关请求.
TYPE:
|
perpage |
每页结果数量.
TYPE:
|
nextpage |
下一页页码,-1 表示已加载全部结果.
TYPE:
|
nextpage_start |
综合搜索继续翻页的关键参数. |
song |
单曲结果容器. |
singer |
歌手结果容器. |
album |
专辑结果容器. |
mv |
MV 结果容器.
TYPE:
|
songlist |
歌单结果容器. |
audio |
节目结果容器. |
direct |
直接命中结果分组. |
related |
相关搜索词推荐结果容器. |
Fields:
-
searchid(str) -
perpage(int) -
nextpage(int) -
nextpage_start(dict[str, Any]) -
song(GeneralSearchRequestBody[SongSearch]) -
singer(GeneralSearchRequestBody[SingerSearch]) -
mv(GeneralSearchRequestBody[MvSearch]) -
album(GeneralSearchRequestBody[AlbumSearch]) -
songlist(GeneralSearchRequestBody[SongListSearch]) -
audio(GeneralSearchRequestBody[AlbumSearch]) -
direct(list[dict[str, Any]]) -
related(GeneralSearchRequestBody[RelatedSearchWord])
QuickSearchItem
pydantic-model
QuickSearchCategory
pydantic-model
QuickSearchResponse
pydantic-model
Bases: Response
快速搜索响应.
| ATTRIBUTE | DESCRIPTION |
|---|---|
song |
单曲结果.
TYPE:
|
singer |
歌手结果.
TYPE:
|
album |
专辑结果.
TYPE:
|
mv |
MV 结果.
TYPE:
|
Fields:
-
song(QuickSearchCategory) -
singer(QuickSearchCategory) -
album(QuickSearchCategory) -
mv(QuickSearchCategory)
Hotkey
pydantic-model
Bases: Response
热搜词条目.
| ATTRIBUTE | DESCRIPTION |
|---|---|
hotkey_id |
热搜词唯一标识.
TYPE:
|
query |
热搜关键词.
TYPE:
|
title |
热搜展示标题.
TYPE:
|
score |
热度得分.
TYPE:
|
kind |
条目类别.
TYPE:
|
type |
条目类型.
TYPE:
|
source |
数据来源.
TYPE:
|
need_top |
是否置顶.
TYPE:
|
subpos |
排序位置.
TYPE:
|
song_type |
关联歌曲类型.
TYPE:
|
direct_id |
直接关联的歌曲 ID.
TYPE:
|
jump_tab |
跳转标签页.
TYPE:
|
jump_url |
跳转链接.
TYPE:
|
cover_pic_url |
封面图片地址.
TYPE:
|
pic_url |
图片地址.
TYPE:
|
description |
描述文案.
TYPE:
|
Fields:
-
hotkey_id(str) -
query(str) -
title(str) -
score(str) -
kind(int) -
type(int) -
source(int) -
need_top(int) -
subpos(int) -
song_type(int) -
direct_id(int) -
jump_tab(str) -
jump_url(str) -
cover_pic_url(str) -
pic_url(str) -
description(str)
HotkeyResponse
pydantic-model
CompleteItem
pydantic-model
Bases: Response
搜索补全建议条目.
| ATTRIBUTE | DESCRIPTION |
|---|---|
hint |
补全提示文本.
TYPE:
|
hint_hilight |
高亮后的提示文本 (含
TYPE:
|
docid |
docid.
TYPE:
|
type |
条目类型.
TYPE:
|
res_type |
结果类型.
TYPE:
|
score |
匹配得分.
TYPE:
|
pre_search |
是否直接发起搜索.
TYPE:
|
icon |
图标地址.
TYPE:
|
icon_type |
图标类型.
TYPE:
|
jumptab |
跳转标签页.
TYPE:
|
jump_type |
跳转类型.
TYPE:
|
jump_url |
跳转链接.
TYPE:
|
pic_url |
图片地址.
TYPE:
|
Fields:
-
hint(str) -
hint_hilight(str) -
docid(str) -
type(int) -
res_type(str) -
score(float) -
pre_search(bool) -
icon(str) -
icon_type(int) -
jumptab(int) -
jump_type(int) -
jump_url(str) -
pic_url(str)
CompleteResponse
pydantic-model
Bases: Response
搜索词补全响应.
| ATTRIBUTE | DESCRIPTION |
|---|---|
items |
补全建议条目列表.
TYPE:
|
total_num |
补全结果总数.
TYPE:
|
search_id |
搜索会话 ID.
TYPE:
|
expire_time |
过期时间戳.
TYPE:
|
use_default_search |
是否使用默认搜索词.
TYPE:
|
vec_direct_items |
直达结果列表. |
vec_related_items |
相关搜索词列表. |
history_items |
历史搜索词列表. |
Fields:
-
items(list[CompleteItem]) -
total_num(int) -
search_id(str) -
expire_time(int) -
use_default_search(int) -
debug_info(str) -
expid(str) -
history_items(list[dict[str, Any]]) -
vec_direct_items(list[dict[str, Any]]) -
vec_related_items(list[dict[str, Any]])