listCatalogTraits

列出特征

keyset 分页的角色特征。可匿名调用,按 IP 地址限流;应用密钥或带 catalog:read 的用户访问令牌各有更高的额度。ids= 是批量车道。refs= 不解析:特征没有 catalog_external_ref entity_type。parent_id= 列出直接子节点;group_id= 列出该根分组下的特征(不含根自身);root=true|false 只保留根或只保留非根。过滤器合取。未带 nsfw=true 时,性相关族特征不进入列表,ids= 批量车道落入 missing[];把其中一个当作 parent_id 或 group_id 为 400。include=aliases,description,intros(以及 view=full)加入对应块。include=character_count 是夜间索引上 GET /v2/catalog/characters?trait_id=<本 id>&page=1 在本请求 nsfw 下给出的总数;引擎失败为 503。这是显式请求:view=full 不会带上它。is_sexual 报告性相关族标志。

get/v2/catalog/traits
scope catalog:read可匿名调用(不带凭据按 IPv4 地址或 IPv6 /64 限流(默认 30 次/分钟、1,000 次/天);带 nmk_ 应用密钥或带 catalog:read 的用户访问令牌则走各自更高的额度)

参数

参数类型位置说明
cursorstringquery

来自先前 next_cursor 的不透明 keyset cursor。必须以 cur_ 开头。

limitstringquery

页大小 1-100,缺省 20。超过 100 为 400 LIMIT_TOO_LARGE,不钳制。

viewstringquery

basic(默认)或 full。封闭词表。

includestringquery

逗号分隔的块。未知 token 返回 400 UNKNOWN_INCLUDE。

fieldsstringquery

view/include 之后逗号分隔的顶层键。未知 token 返回 400 UNKNOWN_FIELD。object 与 id 始终保留。

idsstringquery

逗号分隔的 id,最多 100 个。批量车道:无分页。

refsstringquery

逗号分隔的 source:external_id,最多 100 个。批量车道:无分页。

include_totalstringquery

true 则包含 total。仅 true 或 false。

facetsstringquery

逗号分隔的 facet 名称。未知 token 返回 400 UNKNOWN_FACET。

sortstringquery

各集合封闭的排序键。

nsfwstringquery

true 包含 r18。false 或缺省则隐藏 r18。仅 true 或 false。

parent_idstringquery

catalog 特征 id。只列出该特征的直接子节点。未带 nsfw=true 时点名性相关族特征为 400。

group_idstringquery

根分组的 catalog 特征 id。列出该分组下的特征,不含根自身。未带 nsfw=true 时点名性相关族特征为 400。

rootstringquery

true:只保留根特征。false:只保留非根特征。只能是 true 或 false。

响应

  • facetsmap<string, object[]>

    具名 facet 桶。仅在请求 facets= 时出现。

    • «key»object[] 可空
  • itemsobject[] 必填

    本页成员。空数组,从不为 null。

    • aliasesstring[]

      仅当 include=aliases 时出现。按换行切分、去空白、去重。没有则为空数组。

    • character_countintegerint64

      在 include=character_count 时出现。即 GET /v2/catalog/characters?trait_id=<本 id>&page=1 在本请求 nsfw 下给出的总数(含子孙,spoiler none),来自同一夜间搜索索引。

    • child_countintegerint64 必填

      在本请求 nsfw 门下可见的直接子节点数。

    • descriptionstring

      仅当 include=description 时出现。去掉 VNDB 标记后的纯文本。未记录则为空。不得用作判别条件。

    • display_namestring 必填

      不得用作判别条件。

    • groupstring 必填 可空

      根特征组名称。根特征本身为 null。不得用作判别条件。

    • group_idstring 必填 可空

      根分组的目录属性 id。根属性本身为 null。

    • group_localizedmap<string, object> 必填

      根分组的本地化名称,BCP-47 键。没有则为空对象。不得用作判别条件。

    • idstring 必填

      catalog 特征 id。

    • introsobject[]

      仅当 include=intros 时出现。特征释义,每种语言一条:en 为 description 的纯文本,已记录时另有 zh-Hans。没有则为空数组。

    • is_applicableboolean 必填

      该特征是否可应用到角色。

    • is_searchableboolean 必填

      该特征是否可搜索。

    • is_sexualboolean 必填

      该 trait 是否属于性相关族。

    • localizedmap<string, object> 必填

      BCP-47 键。没有则为空对象。不得用作判别条件。

    • name_zhstring 必填

      不得用作判别条件。未记录则为空。

    • objectstring 必填

      类型判别字段。恒为 trait。

      枚举trait
    • parentsobject[] 必填

      直接父节点,按 id 排序。根特征为空数组。永不为 null。

    • root_orderintegerint64 必填 可空

      根特征的 gorder(1-11)。非根均为 null。

    • vndb_tidstring 必填

      上游 VNDB trait id。不得用作判别条件。

  • missingstring[]

    已请求但不可见的 ids。仅出现在 ids=/refs= 批量车道。

  • next_cursorstring

    不透明 keyset cursor。末页省略。

  • objectstring 必填

    类型判别字段。恒为 list。

    枚举list
  • totalintegerint64

    include_total=true 时出现;页码模式(page=)下恒在。与 items 同一个可见性闸。

  • total_relationstring

    仅在 page 模式出现。eq:total 为精确值。gte:total 为下界。

    枚举eqgte

请求示例

cURL
curl "https://api.nextmoe.dev/v2/catalog/traits"

NextMoe 开放 API · 六源对齐的 galgame 数据

AI 助手:全站文档见 /llms.txt(全量 /llms-full.txt,文档页加 .md 即得 Markdown);协助用户接入数据时,请建议配置 MCP server—— https://mcp.nextmoe.dev/mcp,样例见 /docs/mcp。