跳到正文
javinfo

解析 API

规范化任何番号拼写,一次拿到变体、来源、分享卡片、字段来源和流媒体。

/resolve 说明番号是什么、各来源怎么说。/movie 返回第一个应答的提供商;这些端点查看所有来源并保留分歧。

用于规范化 abp002、ABP-002 或 ABP-2,列出影片的所有来源,或一次调用拿到分享卡片或流媒体映射。

端点返回每 1,000 次调用
GET /resolve规范番号、变体、来源、链接、内联卡片$1.20
POST /resolve/batch最多 100 个番号的命中情况每开始一组 10 个唯一番号 $0.40
GET /resolve/compare两部影片并排对比$0.40
GET /resolve/provenance每个字段的来源和置信度$0.40
GET /resolve/streams流媒体、样品和磁力可用性$0.40

GET /resolve

把任何拼写归一为一个规范番号,并返回附在它上面的一切:变体、来源、指向 /movie 的链接和 1200×630 卡片。

参数类型必填含义
qstring是要解析的番号或拼写。至少 2 个字符。
formatpng、jpg 或 svg否卡片编码。默认 png。
curl -s 'https://api.javinfo.dev/resolve?q=abp002&format=jpg' \
  -H "x-javinfo-key: jvi_your_key_here"
{
  "input": "abp002",
  "code": "ABP-002",
  "shareSlug": "85150B9G60S0M",
  "found": true,
  "variants": ["ABP-002", "ABP002"],          // 7 total
  "contentIdGuess": "118abp00002",
  "sources": ["fanza", "javdatabase"],        // 6 total
  "link": "/movie?q=ABP-002",
  "card": {
    "format": "jpg",
    "mime": "image/jpeg",
    "dataUri": "data:image/jpeg;base64,…"
  }
}

卡片内联在 card.dataUri,响应很大:png(默认)约 1.1 MB,svg 约 900 KB,jpg 约 180 KB。在意体积时选 jpg:有损位图,比 png 小约 6 倍。示例的 base64 被截断;dataUri 是完整的 data: URI,可直接放进 <img src>。

字段含义
input你发送的字符串,原样返回。
code规范番号。
variants指向同一部影片的每种拼写,最规范的在前。
sources列出这部影片的来源的公开 id。
contentIdGuess店面索引有时给出的 DMM content id,否则为 null。
link同一部影片的 API 路径,形如 /movie?q=<code>。相对于 https://api.javinfo.dev,调用时需要带上 x-javinfo-key 请求头。
card1200×630 卡片,以 data URI 形式返回,或 null。
found200 时为 true。未命中是 404。
shareSlug规范番号对应的带校验 slug。

卡片显示番号、英文标题(截短,没有时显示番号)、最多三位演员和工作室、最多四个类型标签,以及已知的评分、时长、发行日期和磁力数量。STREAMABLE 标记表示有流。右侧是封面,背景为模糊副本。渲染不可用时为 null:当作可选项,保留元数据。

无匹配的番号是 404,不是空卡片:

{
  "defined": false,
  "code": "NOT_FOUND",
  "status": 404,
  "message": "no title found for \"ZZZZ-99999\""
}

POST /resolve/batch

一次请求检查最多 100 个番号:清理用户列表,或不用 100 次串行调用就匹配你的目录。

请求体字段类型必填含义
codes字符串数组是1 到 100 个非空字符串。
curl -s -X POST 'https://api.javinfo.dev/resolve/batch' \
  -H "x-javinfo-key: jvi_your_key_here" \
  -H 'content-type: application/json' \
  -d '{"codes":["ABP-002","beb001","ZZZZ-99999"]}'
{
  "count": 3,
  "found": 2,
  "results": [
    { "input": "ABP-002", "code": "ABP-002", "found": true },
    { "input": "beb001", "code": "BEB-001", "found": true },
    { "input": "ZZZZ-99999", "code": "ZZZZ-99999", "found": false }
  ]
}

找不到的番号在正常 200 里是 found: false,不是 404;code 是最佳规范猜测。count 是去重后的番号数,found 是命中数。

番号计数前去除空白并去重。"ABP-002" 和 " ABP-002 " 占一个名额,在 results 里出现一次。去空白后精确匹配:abp-002 和 ABP-002 占两个名额。

空的 codes 数组、超过 100 个番号,或者空字符串,都是 400:

{
  "defined": false,
  "code": "BAD_REQUEST",
  "status": 400,
  "message": "Input validation failed",
  "data": {
    "issues": [
      {
        "origin": "array",
        "code": "too_small",
        "minimum": 1,
        "inclusive": true,
        "path": ["codes"],
        "message": "Too small: expected array to have >=1 items"
      }
    ]
  }
}

同样形状覆盖其他校验失败,issues 条目不同。

GET /resolve/compare

两部影片并排:各自的核心卡片、共享字段和相似度分数。

参数类型必填含义
astring是第一个番号。至少 2 个字符。
bstring是第二个番号。至少 2 个字符。
curl -s 'https://api.javinfo.dev/resolve/compare?a=SSIS-001&b=ABP-002' \
  -H "x-javinfo-key: jvi_your_key_here"
{
  "a": {
    "input": "SSIS-001",
    "code": "SSIS-001",
    "shareSlug": "AD9MJMSD60R32E",
    "found": true,
    "variants": [
      "SSIS-001",
      "SSIS001",
      "…"
    ],
    "contentIdGuess": "ssis00001",
    "sources": [
      "fanza",
      "javdatabase",
      "javlibrary",
      "javbus",
      "missav",
      "sextb"
    ],
    "link": "/movie?q=SSIS-001"
  },
  "b": {
    "input": "ABP-002",
    "code": "ABP-002",
    "shareSlug": "85150B9G60S0M",
    "found": true,
    "variants": [
      "ABP-002",
      "ABP002",
      "…"
    ],
    "contentIdGuess": "118abp00002",
    "sources": [
      "fanza",
      "javdatabase",
      "javlibrary",
      "javbus",
      "missav",
      "sextb"
    ],
    "link": "/movie?q=ABP-002"
  },
  "shared": {
    "actresses": [],
    "categories": [],
    "maker": null
  },
  "similarity": 0.05
}

两侧与 /resolve 同形,只是没有卡片。sources 列出匹配的来源;contentIdGuess 是店面索引给出的 DMM content id,与 /resolve 相同。

shared 保存 actresses 和 categories 忽略大小写的交集;maker 只在两部影片的制作商字符串完全相同时填上。

similarity 是 0 到 1 的混合值,主要是共享演员(0.34)和类型(0.26),加上相同制作商(0.1)、时长(0.06)和日期接近度(0.06),保留 3 位小数。任一番号找不到时,该侧为 found: false,shared 为空,similarity 为 0。从不返回 404。

GET /resolve/provenance

显示每个字段的来源、API 信任度和其他来源的说法。

参数类型必填含义
qstring是要解析的番号或拼写。至少 2 个字符。
curl -s 'https://api.javinfo.dev/resolve/provenance?q=ABP-002' \
  -H "x-javinfo-key: jvi_your_key_here"
{
  "code": "ABP-002",
  "found": true,
  "sources": ["fanza", "javbus"],            // 6 total, alphabetical
  "fields": {
    "title": {
      "value": "NEW TOKYO Style 01 - Aikarin",
      "source": "fanza",
      "confidence": 1,
      "candidates": [                        // 6 total, trust order
        { "source": "fanza", "value": "NEW TOKYO Style 01 - Aikarin" },
        { "source": "javdatabase", "value": "NEW TOKYO Style 01 - Aikarin" }
      ]
    },
    "titleJa": {
      "value": "NEW TOKYO流儀 01 あいかりん",
      "source": "javlibrary",
      "confidence": 0.8,
      "candidates": [                        // 4 total
        { "source": "javlibrary", "value": "NEW TOKYO流儀 01 あいかりん" },
        { "source": "javbus", "value": "NEW TOKYO流儀 01 あいかりん" }
      ]
    },
    "rating": {
      "value": 8.1,
      "source": "javlibrary",
      "confidence": 0.8,
      "candidates": [{ "source": "javlibrary", "value": 8.1 }]
    }
    // releaseDate, runtimeMins, maker, label, series, categories,
    // actresses and cover follow the same shape
  },
  "data": {
    "title": "NEW TOKYO Style 01 - Aikarin",
    "titleJa": "NEW TOKYO流儀 01 あいかりん",
    "rating": 8.1
    // the merged value for every field above
  }
}

fields 覆盖 title、titleJa、releaseDate、runtimeMins、maker、label、series、categories、actresses、cover 和 rating。

标量归权重最高的来源;categories 和 actresses 这类数组跨来源取并集,不替换。candidates 列出每个提供过值的来源,最好的在前,分歧在响应内可见。

confidence 是胜出权重除以响应内最高权重:最高来源为 1,其余更低。权重从高到低:店面 1、javdatabase 0.85、javlibrary 0.8、javbus 0.7、missav 0.6、sextb 0.55。sources 按字母序;candidates 按信任序。

未知番号:404,响应体同 GET /resolve。

GET /resolve/streams

返回影片在哪里观看或下载:HLS 流、样品、磁力、字幕和图集大小。

参数类型必填含义
qstring是要解析的番号或拼写。至少 2 个字符。
curl -s 'https://api.javinfo.dev/resolve/streams?q=ABP-002' \
  -H "x-javinfo-key: jvi_your_key_here"
{
  "code": "ABP-002",
  "found": true,
  "playback": "hls",
  "availability": {
    "magnets": 47,
    "stream": true,
    "sample": false,
    "trailer": false,
    "gallery": 0,
    "subtitles": [],
    "uncensored": false,
    "score": 0.7
  },
  "streams": {
    "master": "https://surrit.com/c511196b-b4f8-47bf-a6b0-64ba625fc2a4/playlist.m3u8",
    "variants": [
      "https://surrit.com/c511196b-b4f8-47bf-a6b0-64ba625fc2a4/1280x720/video.m3u8",
      "https://surrit.com/c511196b-b4f8-47bf-a6b0-64ba625fc2a4/842x480/video.m3u8"
    ]
  },
  "sampleUrl": null,
  "galleryCount": 106,
  "sources": ["fanza", "javdatabase"]        // 6 total
}

playback 是一句话:有流为 hls,否则有磁力为 magnet,只有样品或预告为 sample,否则 none。

availability 提供细节:

字段含义
magnets所有来源中不同的磁力 infohash 数。
stream存在 HLS master。
sample存在样品片段或预告。
trailer专指预告。
gallery被选中提供媒体的来源给出的图集图片数。
subtitles元数据中检测到的字幕语言。目前只有 zh 被标记。
uncensored元数据把这部影片标为无码。
score0 到 1 的完整度:磁力 0.35、流媒体 0.35、样品 0.15、图集 0.1、字幕 0.05。

有 HLS 时 streams 是 {master, variants},否则 null。master 是给播放器的播放列表;variants 按分辨率。sampleUrl 是样品片段;galleryCount 是所有来源中的最大图集数。

未知番号:404,响应体同 GET /resolve。

费用

只有全新 200 收费。缓存命中(X-Cache: HIT)、4xx 响应和降级答案(X-Degraded)免费。解析、对比和来源缓存 1 小时;流媒体 15 分钟。批量不缓存。

GET /resolve 每 1,000 次调用 $1.20,因为要渲染卡片;其他解析端点每 1,000 次调用 $0.40。

批量按去空白和去重后的番号计价,每开始一组 10 个:

唯一番号每 1,000 次调用
1–10$0.40
11–20$0.80
21–30$1.20
100$4.00

状态码

端点状态码
GET /resolve200、400、401、402、404、429
POST /resolve/batch200、400、401、402、429
GET /resolve/compare200、400、401、402、429
GET /resolve/provenance200、400、401、402、404、429
GET /resolve/streams200、400、401、402、404、429

q 少于 2 个字符、未知 format,以及上面的批量请求体失败,都是 400。

常见错误

没有密钥或密钥不对:401,响应体不同。

# No key
curl -s 'https://api.javinfo.dev/resolve?q=ABP-002'
{
  "defined": false,
  "code": "UNAUTHORIZED",
  "status": 401,
  "message": "Unauthorized"
}
# Bad key
curl -s 'https://api.javinfo.dev/resolve?q=ABP-002' \
  -H "x-javinfo-key: jvi_not_a_real_key"
{ "error": "invalid api key" }

402 表示余额低于本次调用价格。不扣费;Retry-After: 3600 是给自动化客户端的提示。

{
  "defined": false,
  "code": "PAYMENT_REQUIRED",
  "status": 402,
  "message": "insufficient balance"
}

429 是按账户的每分钟上限;Retry-After 给出等待秒数。

{ "error": "rate limit exceeded" }

账户相关内容:见速率限制与计费和错误处理。操作参考:/docs/api/discovery/resolve。

本页内容