提供多种类型的主题随机文本输出服务,一键调用,支持多格式无缝接入。
通过标准的 HTTP GET 请求,可以实时获取对应的随机文案。常用于博客副标题、个性化弹窗等业务。
| 参数名称 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
type |
String | 是 | 接口类型,当前选定值为:yiyan。 |
format |
String | 否 | 支持 text (纯文本) 或 json (JSON数据格式)。默认为 text。 |
{
"code": 200,
"msg": "这里是随机筛选出来的内容。",
"name": "一言"
}
这里是随机筛选出来的内容。
{
"code": 400,
"msg": "Unknown type",
"types": [
"yiyan", "duanzi", "mrmy", "qianming", "qinghua", "renjian", "saohua", "shanggan", "shehui", "shici", "wenrou", "xiaohua", "yhyl"
]
}
curl -X GET "https://api.sicxs.cn/wy/index.php?type=yiyan"
<?php
$url = 'https://api.sicxs.cn/wy/index.php?type=yiyan';
$response = file_get_contents($url);
echo $response;
fetch('https://api.sicxs.cn/wy/index.php?type=yiyan')
.then(response => response.text())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
import requests
url = 'https://api.sicxs.cn/wy/index.php?type=yiyan'
response = requests.get(url)
print(response.text)