cURL
curl "https://api.ruseo.cn/api/dwz?key=YOUR_API_KEY&url=https%3A%2F%2Fexample.com&type=1&code=abc&domain=00l.xyz"
生成短网址或查询短网址信息。传入url生成短网址,传入code和domain查询短网址详情。
https://api.ruseo.cn/api/dwz
接口调用前需要确认的核心配置。
/api/dwzdwz必填参数必须传入,示例值可直接用于联调。
| 参数名 | 必填 | 类型 | 说明 | 示例值 |
|---|---|---|---|---|
key |
是 | string | 需要审核通过的 ApiKey。请注册账号获取API Key。 | YOUR_API_KEY |
url |
否 | string | 要跳转的网页地址,最长1000字符(生成短网址时必填) | https://example.com |
type |
否 | integer | 主域类型,1=00l.xyz,2=l00.xyz,默认随机 | 1 |
code |
否 | string | 短网址后缀(查询时必填) | abc |
domain |
否 | string | 短网址主域(查询时必填) | 00l.xyz |
优先使用示例地址测试请求参数是否正确。
https://api.ruseo.cn/api/dwz?key=YOUR_API_KEY&url=https%3A%2F%2Fexample.com&type=1&code=abc&domain=00l.xyz
curl "https://api.ruseo.cn/api/dwz?key=YOUR_API_KEY&url=https%3A%2F%2Fexample.com&type=1&code=abc&domain=00l.xyz"
$url = 'https://api.ruseo.cn/api/dwz?key=YOUR_API_KEY&url=https%3A%2F%2Fexample.com&type=1&code=abc&domain=00l.xyz';
$response = file_get_contents($url);
$data = json_decode($response, true);
fetch('https://api.ruseo.cn/api/dwz?key=YOUR_API_KEY&url=https%3A%2F%2Fexample.com&type=1&code=abc&domain=00l.xyz')
.then(res => res.json())
.then(data => console.log(data));
实际返回内容以接口脚本处理结果为准。
{
"code": 0,
"msg": "success",
"data": {
"route": "dwz",
"example": true
}
}
| 参数名 | 类型 | 说明 | 示例值 |
|---|---|---|---|
code |
integer | 状态码,200成功,400错误 | 200 |
msg |
string | 信息提示 | success |
ucode |
string | 短网址后缀 | aDRoh |
domain |
string | 短网址主域 | oo1.xyz |
dwz |
string | 短网址 | https://oo1.xyz/aDRoh |
url |
string | 跳转地址(查询时返回) | https://example.com |
daynum |
string | 今日跳转量 | 4 |
numall |
string | 总计跳转量 | 47 |
点击左侧“发送请求”查看结果...