HTTP · JSON
JMComic 社区推荐JMComic Community
JMComic Next 和 JMComic Web 共用的社区推荐池。
The community recommendation pool shared by JMComic Next and JMComic Web.
https://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.
{
"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 |
|---|---|---|---|---|---|
id | string | JM 漫画 ID(纯数字字符串)。标题、封面等资料不在这里,用 JM 接口按 ID 查询 | JM comic ID (numeric string). Titles, covers and other details are not included; look them up from JM by ID | ||
recommenders | number | 推荐人数(每个匿名访客对同一本只算一次) | Number of people who recommended it (once per anonymous visitor) | ||
good | number | “好看”票数 | “Good” votes | ||
bad | number | “不好看”票数 | “Not good” votes | ||
reactions | object | emoji 表情回应人数,键见表情回应;只列出至少有 1 人的,没有时为 {} | Emoji reaction counts keyed as in Reactions; only keys with at least one reaction appear, {} when none | ||
firstAt | number | null | 第一次被推荐的时间,Unix 秒;没人推荐时为 null | When it was first recommended, Unix seconds; null if never | ||
lastAt | number | null | 最近一次被推荐的时间,Unix 秒;没人推荐时为 null | When it was last recommended, Unix seconds; null if never | ||
mine | object | JMComic 前端内部使用,可忽略 | 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.
| 键 | Key | Emoji | 含义 | 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 | |
zero | 0️⃣ | 零 | Zero |
GET/recommendations
分页读取推荐池,每页 24 条。
Reads the pool page by page, 24 items per page.
查询参数Query parameters
| 参数 | Parameter | 类型 | Type | 说明 | Description |
|---|---|---|---|---|---|
sort | string | 排序,默认 hot:hot 热门,综合推荐数和投票,并随最近一次推荐的时间逐渐降权new 最新,按第一次被推荐的时间倒序top 最多推荐,按推荐人数倒序 | Order, hot by default:hot trending: recommendations and votes, decaying with time since the last recommendationnew most recently added firsttop most recommended first | ||
page | number | 页码,从 1 开始,默认 1,最大 500 | Page number from 1, default 1, at most 500 |
请求示例Example request
curl 'https://api.ignat.ai/jm/api/recommendations?sort=hot&page=1'响应 200Response 200
{
"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 |
|---|---|---|---|---|---|
items | Item[] | 本页条目,格式见条目格式 | Items on this page, see Item format | ||
total | number | 推荐池里的作品总数 | Total comics in the pool | ||
page | number | 当前页码 | Current page | ||
pageSize | number | 每页条数(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 |
|---|---|---|---|---|---|
id | string | JM 漫画 ID,1–12 位数字 | JM comic ID, 1–12 digits |
请求示例Example request
curl 'https://api.ignat.ai/jm/api/comic/474369'响应 200Response 200
一个条目对象。
One item object.
错误Errors
出错时返回 JSON:{"error": "…"}。
Errors come back as JSON: {"error": "…"}.
| 状态码 | Status | error | 原因 | Cause |
|---|---|---|---|---|
400 | invalid sort | sort 不是 hot、new、top 之一 | sort is not hot, new or top | |
400 | invalid number | page 不是整数 | page is not an integer | |
400 | invalid comic | 漫画 ID 不是 1–12 位数字 | The comic ID is not 1–12 digits | |
404 | not found | 路径或方法不存在 | Unknown path or method | |
502 | — | 服务器暂时离线(由 Cloudflare 返回,不是 JSON) | The server is offline (sent by Cloudflare, not JSON) |