全网cps商品
RESTful
HTTPS
JSON
API Key
https://mcp.ap139.cn/api/spcps
平均响应时间低于200ms,保证您的应用流畅运行
全程HTTPS加密传输,多重安全防护保障数据安全
多区域部署,全球加速网络,低延迟访问体验
提供详细的API调用统计和性能分析报表
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| api_key | Header | String | 是 | API访问密钥 |
public static void main(String[] args) {
String url = "https://mcp.ap139.cn/api/spcps";
Map<String, String> headers = new HashMap<String, String>();
headers.put("X-API-KEY", "你的API密钥");
headers.put("Content-Type", "application/json");
Map<String, Object> bodyParams = new HashMap<>();
bodyParams.put("param1", "value1");
bodyParams.put("param2", "value2");
try {
HttpClient client = HttpClient.newHttpClient();
String requestBody = new Gson().toJson(bodyParams);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.headers("X-API-KEY", headers.get("X-API-KEY"))
.headers("Content-Type", "application/json")
.build();
HttpResponse<String> response = client.send(
request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
} catch (Exception e) {
e.printStackTrace();
}
}
import requests
import json
url = "https://mcp.ap139.cn/api/spcps"
headers = {
"X-API-KEY": "你的API密钥",
"Content-Type": "application/json"
}
data = {
"param1": "value1",
"param2": "value2"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.text)
<?php
$url = 'https://mcp.ap139.cn/api/spcps';
$apiKey = '你的API密钥';
$data = [
'param1' => 'value1',
'param2' => 'value2'
];
$options = [
'http' => [
'header' => [
'X-API-KEY: '.$apiKey,
'Content-Type: application/json'
],
'method' => 'POST',
'content' => json_encode($data)
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === false) {
die('请求失败: '.error_get_last()['message']);
}
echo $result;
?>
const axios = require('axios');
const url = 'https://mcp.ap139.cn/api/spcps';
const apiKey = '你的API密钥';
const data = {
param1: 'value1',
param2: 'value2'
};
const config = {
headers: {
'X-API-KEY': apiKey,
'Content-Type': 'application/json'
}
};
axios.post(url, data, config)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('请求错误:', error.message);
});
curl -X POST \
'https://mcp.ap139.cn/api/spcps' \
-H 'X-API-KEY: 你的API密钥' \
-H 'Content-Type: application/json' \
-d '{
"param1": "value1",
"param2": "value2"
}'
{
"status": "success",
"code": 200,
"data": {
"result": "操作成功",
"timestamp": 1629234567890,
"requestId": "req-123456789"
}
}
{
"status": "error",
"code": 400,
"message": "无效的请求参数",
"details": {
"param": "param1",
"error": "参数不能为空"
},
"requestId": "req-987654321"
}
| 错误码 | 说明 | 解决方案 |
|---|---|---|
| 400 | 请求参数错误 | 检查请求参数是否符合要求 |
| 401 | 未授权访问 | 检查API密钥是否正确 |
| 403 | 禁止访问 | 检查账户权限或订阅状态 |
| 429 | 请求次数超限 | 等待限制解除或升级套餐 |
| 500 | 服务器内部错误 | 稍后重试或联系技术支持 |
查看其他开发者对该API的评价
基于 467 条评价
成为第一个评价该API的用户