短链接生成

请求地址

https://api.hikarinagi.com/shorturls 或者 https://api.hikarinagi.org/shorturls
方式get

参数说明

action 说明 需要传递的参数 备注
create 创建一个短链接 url,token,expire url需要保持标准格式;expire,1-365的整数,单位为天,即短链接的失效期限,可选,默认为永不失效
delete 删除指定的短链接 keyword,token -
check 检查指定的短链接的信息 keyword,token -

请求示例

  1. 创建短链接

https://api.hikarinagi.com/shorturls/?action=create&url=https://www.bilibili.com&token=27f846878c6ebed7937948352b5a8564&expire=7

{
    "statusCode": 200,
    "message": "success",
    "link": {
        "shorturl": "https://himoe.uk/pwphr",
        "url": "https://www.bilibili.com",
        "title": "哔哩哔哩 (゜-゜)つロ 干杯~-bilibili",
        "timestamp": "2024-06-11 02:48:52",
        "clicks": 0
    },
    "keyword": "pwphr"
}

  1. 查看某个已存在的短链接的信息

https://api.hikarinagi.com/shorturls/?action=check&keyword=pwphr&token=27f846878c6ebed7937948352b5a8564

{
    "statusCode": 200,
    "message": "Short URL will expire in 6d 23h57:35 . ",
    "link": {
        "shorturl": "https://himoe.uk/pwphr",
        "url": "https://www.bilibili.com",
        "title": "哔哩哔哩 (゜-゜)つロ 干杯~-bilibili",
        "timestamp": "2024-06-11 02:48:52",
        "clicks": 0
    },
    "expiry_type": "clock",
    "countdown": "6d 23h57:35",
    "postx": "none"
}