各种精美手机壁纸,图片为网络收集,侵权请联系删除
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| tag | string | 是 | 想要搜索的手机壁纸 | |
| page | string | 否 | 翻页效果 | |
| type | string | 否 | json返回JSON的文本,text返回纯文本,image返回图片,默认JSON |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "tag",
"type": "string",
"required": true,
"description": "想要搜索的手机壁纸",
"example": ""
},
{
"name": "page",
"type": "string",
"required": false,
"description": "翻页效果",
"example": ""
},
{
"name": "type",
"type": "string",
"required": false,
"description": "json返回JSON的文本,text返回纯文本,image返回图片,默认JSON",
"example": ""
}
]
{
"openapi": "3.1.1",
"info": {
"title": "某米手机壁纸",
"description": "各种精美手机壁纸,图片为网络收集,侵权请联系删除",
"version": "1.0.0"
},
"paths": {
"\/api\/ziyuan\/mi.php": {
"get": {
"summary": "某米手机壁纸",
"description": "各种精美手机壁纸,图片为网络收集,侵权请联系删除",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "tag",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "想要搜索的手机壁纸"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "翻页效果"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "json返回JSON的文本,text返回纯文本,image返回图片,默认JSON"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application\/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "某米手机壁纸",
"description": "各种精美手机壁纸,图片为网络收集,侵权请联系删除",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "tag",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "想要搜索的手机壁纸"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "翻页效果"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "json返回JSON的文本,text返回纯文本,image返回图片,默认JSON"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application\/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https:\/\/www.xsapi.com",
"description": "当前访问入口(https)"
}
]
}
{
"code": 200,
"msg": "获取成功",
"tag": "美女",
"page": 0,
"total": 12,
"data": [
{
"name": "一瞬晴光惹撕蒜蚯",
"size": 1251226,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/048f16c4654294899b2c7f363c80a627e264d7113"
},
{
"name": "双马尾惹撕蒜蚯",
"size": 1642779,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/075ce07d6b2344d7394fd0dafb6d127185ecfeaff"
},
{
"name": "jk惹撕蒜蚯",
"size": 1370577,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/05f07d1f2e0b14ec5884ef22264bcaac9208f6459"
},
{
"name": "夏日拂光惹撕蒜蚯",
"size": 1482001,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/01246ebd7b9364b548c5da2efc2b0b30689bca027"
},
{
"name": "夏日碎光ootd惹撕蒜蚯",
"size": 1696414,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/08daa147e063e44c7bebce309b743de2bf1840005"
},
{
"name": "潮流风ootd惹撕蒜蚯",
"size": 906682,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/02f7d528994684cf48e4de4058c9c9393f5231012"
},
{
"name": "美女如云",
"size": 1042735,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/0afa4368ae7444457b9d6d1329a1a37753b4963ed"
},
{
"name": "纯欲风美女",
"size": 1546844,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/07e4bf637aabc44bf82ef63efdfa16018d81a6eea"
},
{
"name": "可爱好看美女",
"size": 1084895,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/02d0cfa0e9d2144a08d11ec1a6ca734549b2740e7"
},
{
"name": "少女的世界",
"size": 1205810,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/098a1d5604bb74aecb55461f77be409a088c8139f"
},
{
"name": "纯欲风美女",
"size": 1051563,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/08e851a912ba04090b240d4157d1086da35820f06"
},
{
"name": "少女的世界",
"size": 1442856,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/0faa99e9984d341f7b25d9d161d2de0fe7d5c7b5b"
}
],
"errcode": 0
}
按关键词检索某米手机壁纸资源,返回壁纸名称、体积与图片地址,适合壁纸类应用或内容聚合场景调用。接口免费使用,需携带密钥,每分钟约可请求 100 次。
https://xsapi.com/api/ziyuan/mi.php
支持 GET、POST 两种请求方式。接口免费调用,频率限制约为每分钟 100 次。
本接口必须携带密钥,密钥通过 Query 参数传递,参数名为 key:
https://xsapi.com/api/ziyuan/mi.php?key=你的密钥&tag=美女
未携带密钥或密钥无效时无法获取数据。
调用地址:https://xsapi.com/api/ziyuan/mi.php,请求方式:GET 或 POST。密钥通过 Query 参数传递:key=你的密钥。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥,通过 Query 传递,如 ?key=你的密钥 |
| tag | string | 是 | 想要搜索的手机壁纸关键词,如「美女」「风景」 |
| page | string | 否 | 翻页参数,用于获取后续页数据,不传时返回默认页 |
| type | string | 否 | 返回形式,可选值见下表,不传时默认 JSON |
type 取值说明:
| 取值 | 说明 |
|---|---|
| json | 返回 JSON 文本(默认值) |
| text | 返回纯文本 |
| image | 直接返回图片 |
补充说明:
tag 为必填,缺失或为空时无法确定搜索目标。{
"code": 200,
"msg": "获取成功",
"tag": "美女",
"page": 0,
"total": 12,
"data": [
{
"name": "一瞬晴光惹撕蒜蚯",
"size": 1251226,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/048f16c4654294899b2c7f363c80a627e264d7113"
},
{
"name": "双马尾惹撕蒜蚯",
"size": 1642779,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/075ce07d6b2344d7394fd0dafb6d127185ecfeaff"
},
{
"name": "jk惹撕蒜蚯",
"size": 1370577,
"imgurl": "https://ts.market.mi-img.com/thumbnail/webp/w0q100/ThemeMarket/05f07d1f2e0b14ec5884ef22264bcaac9208f6459"
}
],
"errcode": 0
}
当 type 指定为 text 时,返回纯文本内容;指定为 image 时,直接返回图片数据;未指定或指定为 json 时,返回上述 JSON 结构。
| 字段名 | 类型 | 说明 |
|---|---|---|
| code | integer | 状态码,200 表示获取成功 |
| msg | string | 状态描述信息 |
| tag | string | 本次搜索使用的壁纸关键词 |
| page | integer | 当前返回的翻页位置 |
| total | integer | 本次返回的壁纸数量 |
| data | array | 壁纸列表,元素为壁纸对象 |
| data[].name | string | 壁纸名称 |
| data[].size | integer | 壁纸文件大小,单位为字节 |
| data[].imgurl | string | 壁纸图片地址 |
| errcode | integer | 业务错误码,0 表示无错误 |
当请求未通过校验或接口无法正常处理时,返回体统一为 JSON 结构,其中 code 为业务状态标识,msg 为可读的提示信息,errcode 为具体业务错误码。errcode 为 0 时表示本次调用成功,非 0 时表示调用失败,具体含义见下方错误码表。
未提供调用密钥时的响应示例:
{
"code": 0,
"msg": "未提供调用密钥",
"errcode": 11001
}
密钥错误时的响应示例:
{
"code": 0,
"msg": "密钥错误",
"errcode": 11002
}
积分余额不足时的响应示例:
{
"code": 0,
"msg": "积分余额不足",
"errcode": 11004
}
请求过于频繁时的响应示例:
{
"code": 0,
"msg": "请求过于频繁",
"errcode": 11005
}
接口不存在时的响应示例:
{
"code": 0,
"msg": "接口不存在",
"errcode": 11013
}
| 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 | 令牌分配积分不足 |
| 11025 | 该密钥无权调用此接口 |
说明:本接口为免费接口,正常调用不消耗积分;当密钥缺失、错误、被禁用、已过期或无权调用时,会分别返回对应的错误码。若接口处于维护、禁用或不可用状态,同样会以对应错误码返回。涉及代理类调用时,若目标地址无效、不被允许或请求失败,会分别返回 11013 至 11016,服务整体不可用时返回 11017。
curl "https://xsapi.com/api/ziyuan/mi.php?key=你的密钥&tag=美女&page=0&type=json"
// PHP 示例
$url = "https://xsapi.com/api/ziyuan/mi.php?key=你的密钥&tag=美女&page=0&type=json";
$result = file_get_contents($url);
echo $result;
key 传递,请勿将其写死在前端页面、公开仓库或客户端安装包中,避免被他人抓取后盗用。https://xsapi.com/api/ziyuan/mi.php,避免明文传输导致密钥与参数泄露。tag 为必填,需传入想要搜索的壁纸关键词,建议使用简短中文词,避免特殊符号或空值;page 用于翻页,从 0 开始递增,超出实际页数时返回结果可能为空。type 可选 json、text、image,默认返回 JSON;需要直接展示图片时传 image,需要纯文本时传 text,请根据业务场景选择,避免误解析。imgurl 为图片直链,请勿将其作为本站接口地址二次分发;图片来源于网络收集,若涉及侵权请联系删除。code 与 msg 判断调用结果,data 为空数组时表示该关键词或该页无匹配壁纸,属正常情况,不应视为接口故障。tag 与 page 的结果短期内变化不大,建议在本地做适当缓存,减少重复请求。curl -G "https://xsapi.com/api/ziyuan/mi.php" \
--data-urlencode "key=YOUR_API_KEY" \
--data-urlencode "tag=美女" \
--data-urlencode "page=0" \
--data-urlencode "type=json"