APISpace 汉语拆字API

APISpace 的 汉语拆字API,以将汉字按照上下左右结构和偏旁部首进行拆分,输出的文本内容需要仔细辨认才能理解其意思。

APISpace 上面还有很多各种各样的API,并且所有API提供免费的调用次数,大家感兴趣欢迎访问官网apispace.com,eolink用户可以直接使用eolink的账号登录哟~

应用场景
  • 绕过网站屏蔽词
  • 生成练习字帖
  • 文字游戏
接口请求代码示例
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append(new http\QueryString(array({
  "text" => "爬",
  "dupl" => "true"
))));

$request->setRequestUrl("eolink.o.apispace.com/dfsdfsfsf/api/v1/forward/chaizi");
$request->setRequestMethod("POST");
$request->setBody($body);

$request->setHeaders(array(
  "X-APISpace-Token" => "7khd6tp**********************hfn6l",
  "Authorization-Type" => "apikey",
  "Content-Type" => "application/x-www-form-urlencoded"
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
接口返回示例
{
    "code": 200,
    "message": "",
    "data": [{
        "words": "陈",
        "structure": ["阜 东", "阝 东"]
    }, {
        "words": "奕",
        "structure": ["亦 大"]
    }, {
        "words": "迅",
        "structure": ["辵 卂", "辶 卂"]
    }]
}

你可能感兴趣的:(API,汉语拆字)