返回4k系列壁纸,访问请求地址可查看id
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| count | string | 否 | 返回的图片数量 | 10 |
| id | string | 否 | 类型ID,访问请求地址可查看 | 38 |
| type | string | 否 | 输出格式默认json,可选json/text/image | json |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "count",
"type": "string",
"required": false,
"description": "返回的图片数量",
"example": "10"
},
{
"name": "id",
"type": "string",
"required": false,
"description": "类型ID,访问请求地址可查看",
"example": "38"
},
{
"name": "type",
"type": "string",
"required": false,
"description": "输出格式默认json,可选json/text/image",
"example": "json"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "4K壁纸专区(高质量)",
"description": "返回4k系列壁纸,访问请求地址可查看id",
"version": "1.0.0"
},
"paths": {
"/api/tp/4kbz/4k/api.php": {
"get": {
"summary": "4K壁纸专区(高质量)",
"description": "返回4k系列壁纸,访问请求地址可查看id",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "count",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "10"
},
"description": "返回的图片数量"
},
{
"name": "id",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "38"
},
"description": "类型ID,访问请求地址可查看"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "输出格式默认json,可选json/text/image"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "4K壁纸专区(高质量)",
"description": "返回4k系列壁纸,访问请求地址可查看id",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "count",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "10"
},
"description": "返回的图片数量"
},
{
"name": "id",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "38"
},
"description": "类型ID,访问请求地址可查看"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "输出格式默认json,可选json/text/image"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api-v2.317ak.com",
"description": "当前访问入口(https)"
}
]
}
{
"code": 200,
"tag": "自然风光,风车,蓝天白云,山坡",
"count": "10",
"data": [
"http://cdn-hsyq-static.shanhutech.cn/bizhi/staticwp/202202/61e47760fc24a2ba295bfecf52b58cc9--898919335.jpg",
"http://cdn-hsyq-static.shanhutech.cn/bizhi/staticwp/202202/3a93b6662e41568a81043142c6134e66--1382372235.jpg",
"http://cdn-hsyq-static.shanhutech.cn/bizhi/staticwp/202202/fee1e30a72f3603b5174ca6e92760bc4--2592251876.jpg",
"http://cdn-hsyq-static.shanhutech.cn/bizhi/staticwp/202203/3672a69875e03b527e95573e7f172542--1923657684.jpg",
"http://cdn-hsyq-static.shanhutech.cn/bizhi/staticwp/202204/fb2c41a62b8dbb5f4fef01f4d9866b95--4199795211.jpg",
"http://cdn-hsyq-static.shanhutech.cn/bizhi/staticwp/202202/a99e204511ab012e6a9c82d8a8473b2e--2898509009.jpg",
"http://cdn-hsyq-static.shanhutech.cn/bizhi/staticwp/202202/d911b27f68a0e497519451b0724e8e8f--2064432777.jpg",
"http://cdn-hsyq-static.shanhutech.cn/bizhi/staticwp/202204/62a3bc23e4c073c96f414395789f4d18--3555752755.jpg",
"http://cdn-hsyq-static.shanhutech.cn/bizhi/staticwp/202202/129599c797d89bba06d78c8f229eabde--3881082716.jpg",
"http://cdn-hsyq-static.shanhutech.cn/bizhi/staticwp/202203/8dbc3e72ed182c076e848f6901766c85--4252912255.jpg"
],
"tips": "倾梦API:https://api.317ak.com/"
}
提供4K系列高质量壁纸资源查询服务,适用于需要获取高清图片内容的应用场景。
接口返回对应分类下的壁纸数据,方便开发者快速接入图片展示功能。
https://api-v2.317ak.com/api/tp/4kbz/4k/api.php
GET、POST
本接口调用需要进行鉴权。
首选鉴权方式:Query 参数。
请求时需在地址参数中携带接口调用密钥:
key=…
其中 key 为必填参数,用于接口调用验证。
请求地址:https://api-v2.317ak.com/api/tp/4kbz/4k/api.php
请求方式:GET、POST
鉴权方式:通过 Query 参数 key 传递接口调用密钥。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥 |
| count | string | 否 | 返回的图片数量,例如:10 |
| id | string | 否 | 类型ID,访问请求地址可查看,例如:38 |
| type | string | 否 | 输出格式,默认 json,可选 json、text、image,例如:json |
{
"code": 200,
"tag": "自然风光,风车,蓝天白云,山坡",
"count": "10",
"data": [
"图片地址1",
"图片地址2",
"图片地址3"
],
"tips": "倾梦API"
}
| 字段 | 类型 | 说明 |
|---|---|---|
| code | number | 请求状态标识,成功时返回 200 |
| tag | string | 当前壁纸内容标签信息 |
| count | string | 返回的图片数量 |
| data | array | 图片数据列表,数组内为图片地址 |
| tips | string | 接口提示信息 |
接口发生业务异常时,返回统一错误结构:
{"code":0,"msg":"未提供调用密钥","errcode":11001}
| errcode | 含义 |
|---|---|
| 11001 | 未提供调用密钥 |
| 11002 | 密钥错误 |
| 11003 | 密钥已禁用 |
| 11004 | 积分余额不足 |
| 11005 | 请求过于频繁(QPM 限制) |
| 11006 | 接口维护中 |
| 11007 | 接口已禁用 |
| 11008 | 接口不可用 |
| 11009 | 密钥校验暂不可用 |
| 11010 | 积分系统暂不可用 |
| 11011 | 收费接口须提供有效密钥 |
| 11012 | 鉴权方式错误 |
| 11013 | 接口不存在 |
| 11014 | ***地址无效 |
| 11015 | ***地址不允许 |
| 11016 | ***请求失败 |
| 11017 | 服务暂不可用 |
| 11018 | 请求方式不允许 |
| 11019 | 当前IP不在白名单内 |
| 11020 | 启用出口代理须提供有效密钥 |
| 11021 | 未配置可用出口代理 |
| 11022 | 出口代理不可用 |
| 11023 | 密钥已过期 |
| 11024 | 令牌分配积分不足 |
curl -G "https://api-v2.317ak.com/api/tp/4kbz/4k/api.php" \
--data-urlencode "key=你的接口密钥" \
--data-urlencode "count=10" \
--data-urlencode "id=38" \
--data-urlencode "type=json"
// PHP
$url = "https://api-v2.317ak.com/api/tp/4kbz/4k/api.php";
$params = [
"key" => "你的接口密钥",
"count" => "10",
"id" => "38",
"type" => "json"
];
$response = file_get_contents($url. "?". http_build_query($params));
echo $response;
count 参数用于控制返回图片数量,请根据实际需求设置合理值,避免一次请求获取过多内容。id 参数用于指定壁纸类型,请确认类型 ID 的有效性;不同 ID 对应的图片分类可能不同。type 参数默认返回 JSON 格式,如需其他输出格式,请确保传入值符合接口支持范围。curl "https://api-v2.317ak.com/api/tp/4kbz/4k/api.php?key=YOUR_API_KEY&count=10&id=38&type=json"