拼音转换
GET
无需 Key
运行中
接口简介
中文汉字转拼音,支持全拼/简拼、声调标注/去除、大小写切换,适配昵称生成、内容检索等场景。
接口地址
https://api.lolimi.cn/API/pinyin/api请求示例
测试访问https://api.lolimi.cn/API/pinyin/api?msg=桑帛返回预览
JSON{
"code": 1,
"text": "获取成功",
"data": [
"sāng",
"bó"
]
}
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| msg | string | Required | 需要转换的中文文本 |
| type | string | Required | 可选json/text默认json |
返回参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| code | int | 状态码 |
| text | string | 获取状态 |
| data | array | 返回发拼音数组 |
参数配置
登录获取 KeyResponseWaiting...
<?php
$url = "https://api.lolimi.cn/API/pinyin/api";
$params = array (
'msg' => 'value',
'type' => 'value',
);
$url .= '?' . http_build_query($params);
$res = file_get_contents($url);
echo $res;