查询服务
提供专业的序列号查询API服务,支持快速接入
正在加载服务列表...
开发文档
提供完整的序列号查询API接口,支持多种编程语言快速接入。
接口地址
GET api/apple/activationlock
基础URL: http://api.snchaxun.com
请求方式
GET 请求
数据格式
请求和响应均使用 JSON 格式
字符编码
UTF-8
接口认证
所有API请求需要携带密钥进行身份认证,支持两种认证方式:
# 方式一:在Header中传递(推荐) key: [您的密钥] # 方式二:在URL参数中传递 http://api.snchaxun.com/api/apple/activationlock?key=[您的密钥]&sn=359167074097936
API密钥可在登录后的控制台中获取和管理。请妥善保管您的API密钥,不要在公开场合泄露。
请求参数说明
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | API密钥,在控制台获取 |
| sn | string | 是 | 设备序列号或IMEI号码 |
响应数据格式
所有接口返回统一的JSON格式数据:
查询成功示例 (code === 0)
{
"code": 0,
"data": {
"sn": "354434065184270",
"model": "iPhone 6",
"fmi": "On"
},
"source": "f-i",
"cost": 0.4,
"balance": 3023
}
查询失败示例
{
"code": 400,
"message": "请输入正确的IMEI/序列号",
"cost": 0.02,
"balance": 3023
}
| 字段名 | 类型 | 说明 |
|---|---|---|
| code | int | 状态码,0表示成功,其他表示失败 |
| message | string | 错误详细信息(失败时返回) |
| data | object | 查询结果数据,成功时返回 |
| source | string | 数据来源标识 |
| cost | float | 本次查询扣费金额 |
| balance | float | 当前账户余额 |
错误码说明
| 错误码 | 说明 | 备注 |
|---|---|---|
| 0 | 查询成功 | - |
| 400 | 请求参数错误 | 扣费0.1元 |
| 404 | 无效或不存在 | 扣费0.1元 |
| 401 | 密钥无效 | - |
| 402 | 余额不足 | - |
| 403 | 无权限(IP白名单限制) | - |
| 410 | 接口已失效/下线 | - |
| 502 | 不支持或查询失败 | - |
| 503 | 服务繁忙/维护中 | - |
标准API代码示例
PHP 示例(标准API)
<?php
$key = 'YOUR_API_KEY';
$sn = '359167074097936';
$url = 'http://api.snchaxun.com/api/apple/activationlock';
$param = [
'key' => $key,
'sn' => $sn
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . http_build_query($param));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 300);
$response = curl_exec($ch);
$result = json_decode($response, true);
print_r($result);
?>
Java 示例(标准API)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SNCHAXUNExample {
public static void main(String[] args) throws Exception {
String key = "YOUR_API_KEY";
String sn = "359167074097936";
String url = "{{SYSTEM_BASE_URL}}/api/apple/activationlock?key=" + key + "&sn=" + sn;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.timeout(java.time.Duration.ofSeconds(300))
.GET()
.build();
HttpResponse response = client.send(
request, HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
}
}
Python 示例(标准API)
import requests
import json
key = 'YOUR_API_KEY'
sn = '359167074097936'
url = '{{SYSTEM_BASE_URL}}/api/apple/activationlock'
params = {
'key': key,
'sn': sn
}
response = requests.get(url, params=params, timeout=300)
result = response.json()
print(json.dumps(result, indent=2, ensure_ascii=False))
Node.js 示例(标准API)
const http = require('http');
const key = 'YOUR_API_KEY';
const sn = '359167074097936';
const url = new URL('{{SYSTEM_BASE_URL}}/api/apple/activationlock');
url.searchParams.append('key', key);
url.searchParams.append('sn', sn);
http.get(url, (res) => {
let data = '';
res.on('data', (chunk) => data += chunk);
res.on('end', () => {
console.log(data);
});
}).on('error', (err) => {
console.error(err);
});
cURL 示例(标准API)
curl "{{SYSTEM_BASE_URL}}/api/apple/activationlock?key=YOUR_API_KEY&sn=359167074097936"
接口特性
超时时间
建议将超时时间设置为300秒,避免因网络延迟导致查询失败
并发限制
耗时1秒以上查询,并发数控制在10以内
余额监控
响应中会返回当前账户余额,建议定期检查余额避免查询中断
扣费说明
每次查询会根据接口类型扣除相应费用,失败时也可能扣费(如参数错误)
技术支持
如有任何问题,欢迎通过以下方式联系我们: