调用示例
$url = 'https://api.bugpk.com/api/xhsjx';
$params = [
'key' => 'value' // 请替换实际参数
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
url = "https://api.bugpk.com/api/xhsjx"
params = {
"key": "value" # 请替换实际参数
}
response = requests.get(url, params=params)
print(response.text)
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiTest {
public static void main(String[] args) {
try {
String url = "https://api.bugpk.com/api/xhsjx?key=value";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
const url = 'https://api.bugpk.com/api/xhsjx';
const params = new URLSearchParams({
key: 'value' // 请替换实际参数
});
fetch(`${url}?${params}`)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
返回结果示例
{
"code": 200,
"msg": "解析成功",
"data": {
"author": "小芃壁纸",
"userId": "5fe0102f0000000001004541",
"title": "今日壁纸已到账~",
"desc": "#全网最火壁纸[话题]# #壁纸[话题]# #你的壁纸该换了[话题]#",
"avatar": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo31fruadeggi005nv020ng8ha1ggjj3o0",
"cover": "http://sns-webpic-qc.xhscdn.com/202506161608/4b7c03db93b895513b804bc572ac0a95/notes_pre_post/1040g3k831fmon40404705nv020ng8ha1hm14k7o!nd_prv_wlteh_jpg_3",
"imgurl": [
"http://sns-webpic-qc.xhscdn.com/202506161608/6c95d1b3b125c45321820c06c85718d6/notes_pre_post/1040g3k831fmon40404705nv020ng8ha1hm14k7o!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/023564c72c57eb2def605e45dc7d7604/notes_pre_post/1040g3k831fmon404047g5nv020ng8ha1ha5v08g!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/a3c78a739c81e0325a113cb47e28a72a/notes_pre_post/1040g3k831fmon40404805nv020ng8ha1bqe9na8!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/e9ffc46bc474bc16805368a0a15d68f1/notes_pre_post/1040g3k831fmon404048g5nv020ng8ha1dvg7mhg!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/8e91e99e9c29fb716749a983fdd34f81/notes_pre_post/1040g3k831fmon40404905nv020ng8ha17n4nnpo!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/b97be7e7d12df2510256cc5603642593/notes_pre_post/1040g3k831fmon404049g5nv020ng8ha101i8vj0!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/39bd85a1c5884c8d892b75b71d24d5eb/notes_pre_post/1040g3k831fmon40404a05nv020ng8ha153072vo!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/5dbe57b08cde5b9be69714d45672706d/notes_pre_post/1040g3k831fmon40404ag5nv020ng8ha1k9etfd8!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/d1f7b0b636fe1972a6d96e8449a6cda4/notes_pre_post/1040g3k831fmon40404b05nv020ng8ha1qe22248!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/5b498f7dc604159778814d71fc74b250/notes_pre_post/1040g3k831fmon40404bg5nv020ng8ha17d48h98!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/08ff58ba943adb963afbfc35a4bfb7e4/notes_pre_post/1040g3k831fmon40404c05nv020ng8ha13imp9io!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/fe06bdae63cc3604b42daa61c3e4628b/notes_pre_post/1040g3k831fmon40404cg5nv020ng8ha1mblf8ho!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/eb1f51ec9fa8abbd124498ee2a252521/notes_pre_post/1040g3k831fmon40404d05nv020ng8ha1iul00s0!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/a238218a62d2504a1140ab48e4107bb6/notes_pre_post/1040g3k831fmon40404dg5nv020ng8ha17f5uof0!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/d0ed69f0ba615b19cc708782c027fcc0/notes_pre_post/1040g3k031fmon5nag0005nv020ng8ha1dam89ag!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/8826bf24eb1c9d82c6fb4568142f0b5b/notes_pre_post/1040g3k031fmon5nag00g5nv020ng8ha1hlfhlv8!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/408cfc47a4721101b6c0c4ca5aacc219/notes_pre_post/1040g3k031fmon5nag0105nv020ng8ha1huhoue8!nd_dft_wlteh_jpg_3",
"http://sns-webpic-qc.xhscdn.com/202506161608/f833f75c0f9f3da2130e28de7f4e902b/notes_pre_post/1040g3k031fmon5nag01g5nv020ng8ha1ig6j1i8!nd_dft_wlteh_jpg_3"
]
}
}
返回参数说明
| 参数名 |
类型 |
说明 |
示例 |
| code |
int |
响应码 |
200,404 |
| msg |
string |
解析结果 |
解析成功 |
| data |
Object |
视频数据 |
|
| data.type |
string |
链接类型 |
video,image,live |
| data.title |
string |
标题 |
BugPk-Api |
| data.desc |
string |
描述 |
BugPk-Api |
| data.author |
Object |
作者信息 |
|
| data.cover |
string |
视频封面 |
|
| data.url |
string |
视频直链 |
|
| data.video_backup |
Array |
视频备用链接 |
|
| data.images |
Array |
图集列表 |
|
| data.live_photo |
Array |
实况数据 |
|
| data.music |
string |
音乐数据 |
|