步骤 1
获取 API 密钥
登录账户后在账户页面查看密钥。密钥只应保存在服务端。
步骤 2
查询服务 ID
先同步服务列表,记录服务 ID、单价、最小/最大数量和说明。
步骤 3
提交订单
按服务要求提交目标链接、数量和其他必填参数。
步骤 4
同步状态
按订单 ID 查询状态,把处理结果同步回你的系统。
接口基础信息
| 请求方式 | POST |
| API 地址 | https://bzkj.io/api/v2 |
| 返回格式 | JSON |
| 公共参数 | key 为你的 API 密钥,action 为接口动作,例如 services、add、status、balance。 |
安全提示:不要把 API 密钥写入前端代码、浏览器插件、公开仓库或第三方脚本。建议通过服务端环境变量保存密钥,并在服务端向 API 发起请求。
常用接口
接入前建议
- 先用服务列表接口同步服务 ID,不要手写或猜测服务 ID。
- 下单前校验目标链接格式、最小数量、最大数量和账户余额。
- 把订单 ID 写入你的系统,后续通过状态查询同步进度。
- 遇到订单、充值或 API 异常时,先查看常见问题;仍未解决请通过工单补充订单 ID 和请求时间。
安全调用示例
cURL 查询服务列表
curl -X POST "https://bzkj.io/api/v2" \ -d "key=YOUR_API_KEY" \ -d "action=services"
Node.js 提交订单
const params = new URLSearchParams({
key: process.env.BZKJ_API_KEY,
action: "add",
service: "SERVICE_ID",
link: "https://example.com/post",
quantity: "100"
});
const res = await fetch("https://bzkj.io/api/v2", {
method: "POST",
body: params
});
const data = await res.json();Python 查询订单状态
import os
import requests
response = requests.post(
"https://bzkj.io/api/v2",
data={
"key": os.environ["BZKJ_API_KEY"],
"action": "status",
"order": "ORDER_ID",
},
timeout=20,
)
print(response.json())PHP 查询余额
<?php
$ch = curl_init("https://bzkj.io/api/v2");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query([
"key" => getenv("BZKJ_API_KEY"),
"action" => "balance",
]),
CURLOPT_TIMEOUT => 20,
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;状态与错误处理
常见订单状态
| Pending | 订单已提交,等待处理。 |
| In progress | 订单处理中。 |
| Completed | 订单已完成。 |
| Partial | 订单部分完成,余额或数量可能会按系统规则处理。 |
| Canceled | 订单已取消或取消申请已处理。 |
常见错误方向
| API Key 无效 | 检查账户密钥是否正确,是否复制了多余空格。 |
| 服务不可用 | 确认服务 ID 是否仍在服务列表中,服务状态以当前列表为准。 |
| 数量超出范围 | 按服务的最小/最大数量重新提交。 |
| 余额不足 | 充值后再提交订单,或降低订单数量。 |
| 参数缺失 | 检查接口动作、服务 ID、目标链接和数量等必填字段。 |
接口参数与返回示例
以下接口和字段来自当前 PerfectPanel API 模板。实际可用字段以账户权限、服务规则和系统返回为准。
服务列表
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | 固定值:services |
返回示例
[
{
"service": 1,
"name": "Followers",
"type": "Default",
"category": "First Category",
"rate": "0.90",
"min": "50",
"max": "10000",
"refill": true,
"cancel": true
},
{
"service": 2,
"name": "Comments",
"type": "Custom Comments",
"category": "Second Category",
"rate": "8",
"min": "10",
"max": "1500",
"refill": false,
"cancel": true
}
]
提交订单
选择订单类型后查看对应参数。
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | add |
| service | 服务 ID |
| link | 目标链接 |
| quantity | 下单数量 |
| runs (optional) | Runs to deliver |
| interval (optional) | Interval in minutes |
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | add |
| service | 服务 ID |
| link | 目标链接 |
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | add |
| service | 服务 ID |
| link | 目标链接 |
| comments | Comments list separated by \r\n or \n |
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | add |
| service | 服务 ID |
| link | 目标链接 |
| usernames | Usernames list separated by \r\n or \n |
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | add |
| service | 服务 ID |
| link | 目标链接 |
| quantity | 下单数量 |
| hashtag | Hashtag to scrape usernames from |
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | add |
| service | 服务 ID |
| link | 目标链接 |
| quantity | 下单数量 |
| username | URL to scrape followers from |
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | add |
| service | 服务 ID |
| username | 用户名 |
| min | Quantity min |
| max | Quantity max |
| posts (optional) | Use this parameter if you want to limit the number of new (future) posts that will be parsed and for which orders will be created. If posts parameter is not set, the subscription will be created for an unlimited number of posts. |
| old_posts (optional) | Number of existing posts that will be parsed and for which orders will be created, can be used if this option is available for the service. |
| delay | Delay in minutes. Possible values: 0, 5, 10, 15, 20, 30, 40, 50, 60, 90, 120, 150, 180, 210, 240, 270, 300, 360, 420, 480, 540, 600 |
| expiry (optional) | Expiry date. Format d/m/Y |
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | add |
| service | 服务 ID |
| link | 目标链接 |
| quantity | 下单数量 |
| username | Username of the comment owner |
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | add |
| service | 服务 ID |
| link | 目标链接 |
| quantity | 下单数量 |
| answer_number | Answer number of the poll |
返回示例
{
"order": 23501
}
订单查询
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | 固定值:status |
| order | 订单 ID |
返回示例
{
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
}
批量订单查询
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | 固定值:status |
| orders | 订单 ID,多个用英文逗号分隔,最多 100 个 |
返回示例
{
"1": {
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
},
"10": {
"error": "Incorrect order ID"
},
"100": {
"charge": "1.44219",
"start_count": "234",
"status": "In progress",
"remains": "10",
"currency": "USD"
}
}
创建补单
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | 固定值:refill |
| order | 订单 ID |
返回示例
{
"refill": "1"
}
批量创建补单
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | 固定值:refill |
| orders | 订单 ID,多个用英文逗号分隔,最多 100 个 |
返回示例
[
{
"order": 1,
"refill": 1
},
{
"order": 2,
"refill": 2
},
{
"order": 3,
"refill": {
"error": "Incorrect order ID"
}
}
]
补单状态查询
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | 固定值:refill_status |
| refill | 补单 ID |
返回示例
{
"status": "Completed"
}
批量补单状态查询
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | 固定值:refill_status |
| refills | 补单 ID,多个用英文逗号分隔,最多 100 个 |
返回示例
[
{
"refill": 1,
"status": "Completed"
},
{
"refill": 2,
"status": "Rejected"
},
{
"refill": 3,
"status": {
"error": "Refill not found"
}
}
]
取消订单申请
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | 固定值:cancel |
| orders | 订单 ID,多个用英文逗号分隔,最多 100 个 |
返回示例
[
{
"order": 9,
"cancel": {
"error": "Incorrect order ID"
}
},
{
"order": 2,
"cancel": 1
}
]
余额查询
| 参数 | 说明 |
|---|---|
| key | 你的 API 密钥 |
| action | 固定值:balance |
返回示例
{
"balance": "100.84292",
"currency": "USD"
}