API

目录

支持CORS

接口列表

接口总表

基本请求参数

接口详情

随机图片文件(Random Anime Image File)[GET]接口

默认提供https/http,get请求方式,例:

curl -I -XGET "https://pic.re/image"

除开主要的经随机筛选而来的图片内容外,额外图片信息均储存在Response Header

见响应头,主要可用字段为

HTTP/1.1 200 OK
Date: Sat, 15 May 2021 15:01:25 GMT
Content-Type: image/jpeg
Content-Length: 689008
Connection: keep-alive
image_id: 242637
image_source: https://www.pixiv.net/member_illust.php?mode=medium&illust_id=63026388
image_tags: aqua_eyes,armor,fate/extra,fate/extra_ccc,fate/grand_order,fate_(series),long_hair,meltryllis,polychromatic,purple_hair,tagme_(artist)

随机图片文件 推荐!(Random Anime Image FIle Recommend)[GET]接口

参数与/image接口通用,区别是会使用301跳转到CDN地址。此接口可以很大的降低服务器压力。

正常访问场景和#1接口无区别

随机图片元信息(Random Anime Image Meta Info)[POST]接口

默认提供https/http,POST请求方式,例:

curl -XPOST "https://pic.re/image"

返回Json数据

{
    "file_url":"https://konachan.com/image/c2013204d3c186f0b95e433eea9bce15/Konachan.com%20-%20208569%20animal%20aqua_hair%20bird%20boots%20bow%20building%20city%20clouds%20gloves%20hat%20hinanawi_tenshi%20night%20red_eyes%20short_hair%20skirt_lift%20sky%20touhou%20tree%20waira%20water.jpg",
    "md5":"c2013204d3c186f0b95e433eea9bce15",
    "tags":[
        "animal",
        "aqua_hair",
        "bird",
        "boots",
        "bow",
        "building",
        "city",
        "clouds",
        "gloves",
        "hat",
        "hinanawi_tenshi",
        "night",
        "red_eyes",
        "short_hair",
        "skirt_lift",
        "sky",
        "touhou",
        "tree",
        "waira",
        "water"
    ],
    "width":2047,
    "height":1447,
    "source":"http://i4.pixiv.net/img-original/img/2015/10/24/00/31/25/53177335_p0.jpg",
    "author":"Flandre93",
    "has_children":false,
    "_id":208569
}

随机图片元信息(Random Anime Image Meta Info)[Get]接口

同Post接口内容

获取现有图片标签

获取现有数据库内大于一定图片量的表情

Example:

[
    {
        "name": "long_hair",
        "count": 44045
    },
    {
        "name": "original",
        "count": 24985
    },
    {
        "name": "short_hair",
        "count": 19695
    },
    {
        "name": "blush",
        "count": 17494
    }
]

Last updated