新浪( t.cn ) 短网址生成API接口

描述

  • 新浪短网址 (t.cn) 短链接生成

请求URL

https://v1.alapi.cn/api/url?url=

请求方式

get post

参数

参数名称 必选 类型 说明
url string 要缩短的长网址
type int 返回哪个短网址,默认返回 t.cn
format string 返回数据格式,jsontext,默认 json

请求示例

https://v1.alapi.cn/api/url?url=https://www.alapi.cn

返回示例

{
    "code": 200,
    "msg": "success",
    "data": {
        "type": "t.cn",
        "long_url": "https://www.alapi.cn",
        "short_url": "http://t.cn/AinywNBT"
    },
    "Author": {
        "name": "Alone88",
        "desc": "由Alone88提供的免费API 服务,官方文档:www.alapi.cn"
    }
}

返回参数说明

参数名称 说明
code 等于 200 则成功,否则失败
data 成功返回的数据
long_url 输入的长网址
short_url 返回的短网址

ps

更多API 接口请 访问 :https://www.alapi.cn/

评论