企业级短链接平台提供的开放API接口,方便开发者集成使用
我们提供了完整的API接口,支持短链接的创建、查询、修改和删除操作
采用标准的RESTful API设计,支持GET、POST、PUT、DELETE等HTTP方法
使用API密钥进行认证,保障接口安全,支持设置密钥权限和有效期
所有API接口都返回标准的JSON格式数据,便于各种编程语言处理
基于用户等级设置合理的API请求频率限制,保障系统稳定运行
详细的API接口说明,包括请求参数、返回格式和示例代码
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| url | string | 是 | 原始URL地址 |
| api_key | string | 是 | API密钥 |
| custom | string | 否 | 自定义后缀 |
| expire | string | 否 | 过期时间 |
{
"success": true,
"data": {
"short_url": "https://example.com/abc123",
"original_url": "https://example.com/long-url",
"created_at": "2026-02-11 12:00:00"
},
"error": null
}
// PHP示例
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, '/api/create.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'url' => 'https://example.com/long-url',
'api_key' => 'your_api_key'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
$response = json_decode($result, true);
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| short_code | string | 是 | 短链接后缀 |
| api_key | string | 是 | API密钥 |
{
"success": true,
"data": {
"short_code": "abc123",
"original_url": "https://example.com/long-url",
"short_url": "https://example.com/abc123",
"clicks": 100,
"created_at": "2026-02-11 12:00:00",
"expire_at": null
},
"error": null
}
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| short_code | string | 是 | 短链接后缀 |
| api_key | string | 是 | API密钥 |
{
"success": true,
"data": {
"message": "短链接删除成功"
},
"error": null
}
在个人中心可以创建和管理API密钥,设置密钥权限和有效期