GET
图片壁纸
壁纸
壁纸,点击查看详细参数与调用示例。
累计调用 15
今日调用 0
更新于 2026-10-16
调用地址
GET
https://itapi.top/api/bz
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| action | int | 可选 | 自动提取的参数 | 暂无 |
| q | string | 可选 | 自动提取的参数 | 80 |
| categories | int | 可选 | 自动提取的参数 | 风景 |
| purity | int | 可选 | 自动提取的参数 | 风景 |
| sorting | int | 可选 | 自动提取的参数 | 风景 |
| order | int | 可选 | 自动提取的参数 | 暂无 |
| page | int | 可选 | 自动提取的参数 | 1 |
| n | int | 可选 | 自动提取的参数 | 1 |
| topRange | int | 可选 | 自动提取的参数 | 风景 |
| id | int | 可选 | 作品id | 1 |
响应示例
200 OK
{"api_name":"Wallhaven API","description":"一个基于Wallhaven壁纸网站的API接口","version":"1.0","endpoints":[{"action":"search","description":"搜索壁纸","parameters":{"q":"搜索关键词","categories":"分类 (默认: 111) - 1:启用, 0:禁用 (顺序: general,anime,people)","purity":"纯度 (默认: 110) - 1:启用, 0:禁用 (顺序: sfw,sketchy,nsfw)","sorting":"排序方式 (默认: relevance) - relevance, random, date_added, views, favorites, toplist, hot","order":"排序顺序 (默认: desc) - desc, asc","page":"页码 (默认: 1)","n":"可选参数,获取第n个壁纸的详细信息"},"example":"\/bz.php?action=search&q=nature&categories=111&purity=110&sorting=relevance&order=desc&page=1"},{"action":"toplist","description":"获取排行榜壁纸","parameters":{"categories":"分类 (默认: 111)","purity":"纯度 (默认: 110)","topRange":"...
在线测试
代码示例
cURL · GET
curl "https://itapi.top/api/bz?action=%E6%9A%82%E6%97%A0&q=80&categories=%E9%A3%8E%E6%99%AF&purity=%E9%A3%8E%E6%99%AF&sorting=%E9%A3%8E%E6%99%AF&order=%E6%9A%82%E6%97%A0&page=1&n=1&topRange=%E9%A3%8E%E6%99%AF&id=1"
PHP
<?php
$res = file_get_contents("https://itapi.top/api/bz?action=%E6%9A%82%E6%97%A0&q=80&categories=%E9%A3%8E%E6%99%AF&purity=%E9%A3%8E%E6%99%AF&sorting=%E9%A3%8E%E6%99%AF&order=%E6%9A%82%E6%97%A0&page=1&n=1&topRange=%E9%A3%8E%E6%99%AF&id=1");
$json = json_decode($res, true);
print_r($json);
JavaScript
const res = await fetch("https://itapi.top/api/bz?action=%E6%9A%82%E6%97%A0&q=80&categories=%E9%A3%8E%E6%99%AF&purity=%E9%A3%8E%E6%99%AF&sorting=%E9%A3%8E%E6%99%AF&order=%E6%9A%82%E6%97%A0&page=1&n=1&topRange=%E9%A3%8E%E6%99%AF&id=1");
const json = await res.json();
console.log(json);
Python
import requests
r = requests.get("https://itapi.top/api/bz?action=%E6%9A%82%E6%97%A0&q=80&categories=%E9%A3%8E%E6%99%AF&purity=%E9%A3%8E%E6%99%AF&sorting=%E9%A3%8E%E6%99%AF&order=%E6%9A%82%E6%97%A0&page=1&n=1&topRange=%E9%A3%8E%E6%99%AF&id=1", timeout=10)
print(r.json())