随机一言
GET
无需 Key
运行中
接口简介
随机返回一条简短文案,适配签名、配图文案、小程序填充等场景。
接口地址
https://api.lolimi.cn/API/yiyan/api请求示例
测试访问https://api.lolimi.cn/API/yiyan/api?type=json返回预览
JSON{
"code": "1",
"text": "你以为男朋友是取款机,结果是十台机器,有九台半是存款机。"
}
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| type | string | Required | 默认数组格式可选text,json默认为text |
返回参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| code | int | 状态码 |
| text | string | 返回的随机一言内容 |
参数配置
登录获取 KeyResponseWaiting...
<?php
$url = "https://api.lolimi.cn/API/yiyan/api";
$params = array (
'type' => 'value',
);
$url .= '?' . http_build_query($params);
$res = file_get_contents($url);
echo $res;