可以搜索4k的壁纸
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| msg | string | 是 | 搜索的壁纸内容 | 动漫 |
| count | string | 否 | 返回数据个数 | 10 |
| n | string | 否 | 用于决定是否进行随机输出图片,默认为no,当启用时则会忽视count参数 | yes |
| type | string | 否 | 输出格式默认json,可选json/text/image | json |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "msg",
"type": "string",
"required": true,
"description": "搜索的壁纸内容",
"example": "动漫"
},
{
"name": "count",
"type": "string",
"required": false,
"description": "返回数据个数",
"example": "10"
},
{
"name": "n",
"type": "string",
"required": false,
"description": "用于决定是否进行随机输出图片,默认为no,当启用时则会忽视count参数",
"example": "yes"
},
{
"name": "type",
"type": "string",
"required": false,
"description": "输出格式默认json,可选json/text/image",
"example": "json"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "壁纸搜索",
"description": "可以搜索4k的壁纸",
"version": "1.0.0"
},
"paths": {
"/api/tp/4kbz/4kss/api.php": {
"get": {
"summary": "壁纸搜索",
"description": "可以搜索4k的壁纸",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "msg",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "动漫"
},
"description": "搜索的壁纸内容"
},
{
"name": "count",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "10"
},
"description": "返回数据个数"
},
{
"name": "n",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "yes"
},
"description": "用于决定是否进行随机输出图片,默认为no,当启用时则会忽视count参数"
},
{
"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": "壁纸搜索",
"description": "可以搜索4k的壁纸",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "msg",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "动漫"
},
"description": "搜索的壁纸内容"
},
{
"name": "count",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "10"
},
"description": "返回数据个数"
},
{
"name": "n",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "yes"
},
"description": "用于决定是否进行随机输出图片,默认为no,当启用时则会忽视count参数"
},
{
"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.317ak.com",
"description": "当前访问入口(https)"
}
]
}
{
"code": 200,
"tags": "动漫,动漫唯美场景",
"count": 10,
"data": [
"http://cdn-hsyq-static-bak.shanhutech.cn/bizhi/staticwp/201212/b945771b917d5818d6f2b114f2b9c20311.jpg",
"http://cdn-hsyq-static-bak.shanhutech.cn/bizhi/staticwp/201212/004e9eb23538c757986c3f6075ec92239.jpg",
"http://cdn-hsyq-static-bak.shanhutech.cn/bizhi/staticwp/201301/35171b25a62cb778d6004967a792384211.jpg",
"http://cdn-hsyq-static-bak.shanhutech.cn/bizhi/staticwp/201301/e1e6a98f1498fac97562cf838462da0c16.jpg",
"http://cdn-hsyq-static.shanhutech.cn/bizhi/staticwp/202010/852d80e493b3d979c138ec2a87f8a0ad--1722871008.jpg",
"http://cdn-hsyq-static-bak.shanhutech.cn/bizhi/staticwp/201810/c2676b50e3b0773d14dcf393ea908b67.jpg",
"http://cdn-hsyq-static-bak.shanhutech.cn/bizhi/staticwp/201810/0dcac5b76a61a2337ba4b3be8f2fa3a2.jpg",
"http://cdn-hsyq-static-bak.shanhutech.cn/bizhi/staticwp/201810/8452f9d5febb74d81ef423521c1fc71c.jpg",
"http://cdn-hsyq-static-bak.shanhutech.cn/bizhi/staticwp/201810/ad4a6a2bfd5d56b9413060b910bd2df2.jpg",
"http://cdn-hsyq-static-bak.shanhutech.cn/bizhi/staticwp/201810/e43a1a3497cf59527a893486188c8773.jpg"
],
"tips": "倾梦API:https://api.317ak.com"
}
提供 4K 壁纸搜索能力,支持根据关键词查找相关壁纸内容。
适用于需要获取高清壁纸资源的应用或服务。
https://api-v2.317ak.com/api/tp/4kbz/4kss/api.php
GET、POST
本接口必须使用密钥鉴权。
首选鉴权方式:Query 参数传递。
请求时添加参数:
key=接口调用密钥
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥,通过 Query 参数 key 传递 |
| msg | string | 是 | 搜索的壁纸内容,例如:动漫 |
| count | string | 否 | 返回数据个数,例如:10 |
| n | string | 否 | 用于决定是否进行随机输出图片,默认值为 no;启用时会忽略 count 参数,例如:yes |
| type | string | 否 | 输出格式,默认 json,可选值:json、text、image |
请求地址:
https://api-v2.317ak.com/api/tp/4kbz/4kss/api.php
请求方式:GET、POST
参数说明:
key 为必填参数,用于接口调用验证。msg 用于指定搜索关键词。count 用于控制返回数据数量。n 设置为 yes 时启用随机输出图片。type 用于选择返回内容格式。{
"code": 200,
"tags": "动漫,动漫唯美场景",
"count": 10,
"data": [
"http://cdn-hsyq-static-bak.shanhutech.cn/bizhi/staticwp/201212/b945771b917d5818d6f2b114f2b9c20311.jpg",
"http://cdn-hsyq-static-bak.shanhutech.cn/bizhi/staticwp/201212/004e9eb23538c757986c3f6075ec92239.jpg",
"http://cdn-hsyq-static-bak.shanhutech.cn/bizhi/staticwp/201301/35171b25a62cb778d6004967a792384211.jpg"
],
"tips": "倾梦API:https://api.317ak.com"
}
| 字段 | 类型 | 说明 |
|---|---|---|
| code | number | 请求状态标识,成功时返回 200 |
| tags | string | 搜索结果对应的壁纸标签信息 |
| count | number | 返回的壁纸数量 |
| data | array | 壁纸地址列表,每项为一张壁纸资源地址 |
| tips | string | 接口提示信息 |
接口发生业务异常时,将返回 JSON 格式错误信息:
{
"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/4kss/api.php" \
--data-urlencode "key=你的接口密钥" \
--data-urlencode "msg=动漫" \
--data-urlencode "count=10" \
--data-urlencode "type=json"
## 注意事项
- 调用接口前需妥善保管接口密钥,请勿将密钥直接暴露在公开页面、前端代码或可被他人获取的位置。
- 本接口采用 Query 参数进行鉴权,请按照 `key=...` 的方式传递调用密钥,并确保密钥参数完整有效。
- 建议使用 HTTPS 方式请求接口,保障请求参数及返回数据传输过程中的安全性。
- `msg` 为必填搜索内容,建议填写明确的壁纸关键词,例如“动漫”“风景”“科技”等,以提升搜索结果匹配度。
- `count` 用于控制返回数据数量,未填写时使用接口默认返回数量;设置较大数量时请根据实际需求调用。
- 当 `n` 设置为 `yes` 时,将启用随机输出图片,此时 `count` 参数不会生效。
- `type` 参数用于指定返回格式,默认返回 JSON 格式;如需其他格式,请确保传入接口支持的取值。
- 请根据实际业务场景合理控制调用频率,避免短时间内大量重复请求影响正常使用。
- 返回的壁纸数据可能包含多个图片地址,使用时请根据应用场景处理图片加载、缓存及展示逻辑。# 壁纸搜索示例
curl "https://api-v2.317ak.com/api/tp/4kbz/4kss/api.php?key=YOUR_API_KEY&msg=动漫&count=10&type=json"