Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

API文档

Coder-Sakura edited this page Mar 15, 2021 · 6 revisions

/api/v2/get-info 获取指定pid的数据

请求类型: POST

参数

字段名 数据类型 默认 说明
pid str / int - 必要,需要查询的插画pid

pid必须为纯数字,不限定str/int类型,pid长度小于20;

响应数据

字段名 数据类型 说明
result json 对应pid插画的数据

请求参数示例

字段名
pid 75165182

响应示例(2021.1)

{
 "result": [
 {
 "bookmarkCount": 4159,
 "commentCount": 16,
 "error": false,	
 "id": 7029,
 "illustType": 0,
 "is_r18": 0,
 "likeCount": 2762,
 "message": "",
 "original": "https://i.pximg.net/img-original/img/2019/06/11/00/13/40/75165182_p0.jpg",
 "pageCount": 1,
 "pid": 75165182,
 "purl": "https://www.pixiv.net/artworks/75165182",
 "reverse_url": "https://pixiv.cat/75165182.jpg",
 "tag": "初音ミク/初音未来、VOCALOID、女の子/女孩子、チャイナ服/中国服装、VOCALOID1000users入り/VOCALOID 1000收藏、",
 "title": "初音ミク",
 "uid": 3779517,
 "userName": "BTraphen",
 "viewCount": 18485
 	}
 ]
}

json字段说明

字段 说明
bookmarkCount 收藏数
commentCount 评论数
error 接口是否出现错误,尚未使用错误码
id -
illustType -
is_r18 -
likeCount 喜欢数
message 错误信息, error为True时, 此处为错误信息
original 反代原图链接
pageCount 页数
pid 作品pid
purl 作品页面
reverse_url 反代链接
tag 标签组,各个标签以、分隔,原标签与翻译以/分隔
title 插画标题
uid 作者uid
userName 作者昵称
viewCount 浏览数

/api/v2/random 随机返回插画

请求类型: POST

参数

字段名 数据类型 默认值 说明
num str / int 1 返回的作品数量, 1~10范围内, 超出则返回1条
extra str None tag,如:原创,女孩子或碧蓝航线,最多2个
limit str / int None 返回作品最低收藏数,如:1000 (纯数字)
illust_level str None 返回作品的稀有度范围(R,SR,SSR,UR)
如:SSR,UR或SR
table str bookmark 指定查询的表,默认为bookmark

num必须为纯数字,不限定str/int类型,1<num<10;

响应数据

字段名 数据类型 说明
result json 对应pid插画的数据

请求参数示例

字段名
num 10
extra 原创,学校生活

响应示例 (2021.1)

{
 "result": [
 {
 "bookmarkCount": 10975,
 "commentCount": 19,
 "error": false,
 "id": 30660,
 "illustType": 0,
 "is_r18": 0,
 "likeCount": 10250,
 "message": "",
 "original": "https://i.pximg.net/img-original/img/2017/12/18/00/07/45/66336051_p0.png",
 "pageCount": 1,
 "pid": 66336051,
 "purl": "https://www.pixiv.net/artworks/66336051",
 "reverse_url": "https://pixiv.cat/66336051.png",
 "tag": "オリジナル/原创、女の子/女孩子、学校生活、グレー系/greyscale、心象風景/mental scenery、オリジナル10000users入り/原创10000users加入书籤、",
 "title": "world end",
 "uid": 772547,
 "userName": "loundraw",
 "viewCount": 112081
 }
 ]
}

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /