HTTP · JSON

JMComic 社区推荐JMComic Community

JMComic Next 和 JMComic Web 共用的社区推荐池。

The community recommendation pool shared by JMComic Next and JMComic Web.

BASEhttps://api.ignat.ai/jm/api

不需要登录或密钥;允许任意来源跨域读取(Access-Control-Allow-Origin: *),不使用 Cookie。响应都是 Cache-Control: no-store 的实时数据。

No login or key needed. Any origin may read it cross-origin (Access-Control-Allow-Origin: *); no cookies are used. Every response is live data sent with Cache-Control: no-store.

条目格式Item format

两个接口返回的每本漫画都是同一种对象。

Both endpoints describe each comic with the same object.

json
{
  "id": "474369",
  "recommenders": 3,
  "good": 5,
  "bad": 1,
  "reactions": { "lol": 4, "fire": 2 },
  "firstAt": 1794918544,
  "lastAt": 1794931200,
  "mine": { "recommended": false, "vote": null, "reactions": [] }
}
字段Field类型Type说明Description
idstringJM 漫画 ID(纯数字字符串)。标题、封面等资料不在这里,用 JM 接口按 ID 查询JM comic ID (numeric string). Titles, covers and other details are not included; look them up from JM by ID
recommendersnumber推荐人数(每个匿名访客对同一本只算一次)Number of people who recommended it (once per anonymous visitor)
goodnumber“好看”票数“Good” votes
badnumber“不好看”票数“Not good” votes
reactionsobjectemoji 表情回应人数,键见表情回应;只列出至少有 1 人的,没有时为 {}Emoji reaction counts keyed as in Reactions; only keys with at least one reaction appear, {} when none
firstAtnumber | null第一次被推荐的时间,Unix 秒;没人推荐时为 nullWhen it was first recommended, Unix seconds; null if never
lastAtnumber | null最近一次被推荐的时间,Unix 秒;没人推荐时为 nullWhen it was last recommended, Unix seconds; null if never
mineobjectJMComic 前端内部使用,可忽略Used internally by the JMComic apps; can be ignored

表情回应Reactions

reactions 里用英文键表示 emoji,共 14 个。每个访客对同一本可以选多个,每个 emoji 只算一次。

reactions uses an English key for each of the 14 emoji. A visitor may pick several for the same comic; each emoji counts once per visitor.

键KeyEmoji含义Meaning
love😍喜欢Love
hot🥵好涩Hot
lol🤣笑死LOL
mindblown🤯震撼Mind blown
think🤔疑惑Hmm
cry😭哭了Crying
angry😡生气Angry
fire🔥火Fire
zap⚡️带电Zap
cow🐮牛Cow
chicken🐔鸡Chicken
milk🍼奶Milk
nails💅优雅Nails
zero0️⃣零Zero

GET/recommendations

分页读取推荐池,每页 24 条。

Reads the pool page by page, 24 items per page.

查询参数Query parameters

参数Parameter类型Type说明Description
sortstring排序,默认 hot:
hot 热门,综合推荐数和投票,并随最近一次推荐的时间逐渐降权
new 最新,按第一次被推荐的时间倒序
top 最多推荐,按推荐人数倒序
Order, hot by default:
hot trending: recommendations and votes, decaying with time since the last recommendation
new most recently added first
top most recommended first
pagenumber页码,从 1 开始,默认 1,最大 500Page number from 1, default 1, at most 500

请求示例Example request

shell
curl 'https://api.ignat.ai/jm/api/recommendations?sort=hot&page=1'

响应 200Response 200

json
{
  "items": [
    {
      "id": "474369",
      "recommenders": 3,
      "good": 5,
      "bad": 1,
      "reactions": { "lol": 4, "fire": 2 },
      "firstAt": 1794918544,
      "lastAt": 1794931200,
      "mine": { "recommended": false, "vote": null, "reactions": [] }
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 24
}
字段Field类型Type说明Description
itemsItem[]本页条目,格式见条目格式Items on this page, see Item format
totalnumber推荐池里的作品总数Total comics in the pool
pagenumber当前页码Current page
pageSizenumber每页条数(24)Items per page (24)

读完所有页:page × pageSize ≥ total,或某页 items 为空时停止。hot 的顺序会随时间变化,翻页期间可能有条目前后移动。

You have every page once page × pageSize ≥ total or a page comes back with no items. The hot order shifts over time, so items may move between pages while you read.

GET/comic/{id}

读取一本漫画在推荐池里的数据。不在推荐池里的漫画同样返回 200,计数全为 0,firstAt / lastAt 为 null。

Reads one comic's entry in the pool. A comic that is not in the pool still returns 200, with every count at 0 and firstAt / lastAt set to null.

路径参数Path parameters

参数Parameter类型Type说明Description
idstringJM 漫画 ID,1–12 位数字JM comic ID, 1–12 digits

请求示例Example request

shell
curl 'https://api.ignat.ai/jm/api/comic/474369'

响应 200Response 200

一个条目对象。

One item object.

错误Errors

出错时返回 JSON:{"error": "…"}。

Errors come back as JSON: {"error": "…"}.

状态码Statuserror原因Cause
400invalid sortsort 不是 hot、new、top 之一sort is not hot, new or top
400invalid numberpage 不是整数page is not an integer
400invalid comic漫画 ID 不是 1–12 位数字The comic ID is not 1–12 digits
404not found路径或方法不存在Unknown path or method
502—服务器暂时离线(由 Cloudflare 返回,不是 JSON)The server is offline (sent by Cloudflare, not JSON)