二次元图片API - 文档 | Qianyun API

二次元图片API

调用此 API 会返回随机的 acg 图片

请求URL

https://api.zhangxiaojie.tk/api/v1/img
参数名称 模式 参数说明 形式
[默认]直接跳转
JSON 追加 返回JSON 大写
INFO 追加 获取详细信息 大写
search 追加+参数 搜索tag 小写
id 追加+参数 搜索id 小写
author 追加+参数 搜索author 小写
az 追加 指定手机图片 小写
pc 追加 指定电脑图片 小写
很抱歉,从v3.0开始我们不提供 原图 模式。图片量已经来到上千(≈3000张图片)+带宽+服务器成本
若真有想要的图片,也可以发邮件给我。我很乐意的
"JSON" 返回 JSON

响应体

JSON
{
  "code": 200,
  "version": "v1",
  "data": {
    "id": "2",
    "width": "1920",
    "height": "1080",
    "work_for": "az",
    "tags": [
      "测试",
      "风景"
    ],
    "url": "https://api.zhangxiaojie.tk/xxx"
  }
}

解释

参数名称 返回值 参数说明 父集合
code 200 请求状态 null
version v1 版本信息 null
data { } 回调内容 null
id 2 图片id data
width 1920 图片宽 data
height 1080 图片高 data
work_for az az为手机 pc为电脑 data
tags [ ] tags标签 data
url htt…… url data
INFO 返回 详细信息
JSON
{
  "code": 200,
  "version": "v1",
  "data": {
    ……
    "info": {
      "is_checked": "1",
      "website": null,
      "from_source": "pixiv",
      "pid": "91634720",
      "author": "test",
      "author_uid": null,
      "title": "测试图片",
      "get_time": "2026-07-24 10:37:43"
    }
  }
}
参数名称 返回值 参数说明 父集合
info { } 详细信息 data
is_checked 1 已审核 info
website htt…… 来源链接 info
from_source pixiv 来源网站 info
pid 916…… 作品pid info
author test 作者名 info
author_uid null 作者uid info
title 测试图片 图片标题 info
get_time 202…… 获取时间 info

搜索

凡是搜索都用小写

search

  • 搜索tag
  • https://api.zhangxiaojie.tk/api/v1/img?search=HOYO 测试

    id

  • 搜索id
  • https://api.zhangxiaojie.tk/api/v1/img?id=1

    author

  • 搜索author
  • https://api.zhangxiaojie.tk/api/v1/img?author=test

    az & pc

  • 指定适配
  • https://api.zhangxiaojie.tk/api/v1/img?az
    https://api.zhangxiaojie.tk/api/v1/img?pc

    叠加搜索

    https://api.zhangxiaojie.tk/api/v1/img?id=1&author=test