[Add] Pixiv搜索推荐候选接口.md 添加可用于优化搜索的接口文档;

This commit is contained in:
LamGC 2020-07-02 23:21:28 +08:00
parent d5c3a438b0
commit 9964205dc2
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D

View File

@ -0,0 +1,45 @@
## 搜索推荐接口 ##
### 说明 ###
可用于优化搜索内容。
### 接口地址 ###
```
GET https://www.pixiv.net/rpc/cps.php?
```
- 是否需要登录: `是`
- 是否为Pixiv标准接口返回格式: `否`
- 是否需要Referer请求头: `否`
### 参数 ###
Url参数:
- `keyword`: 搜索内容
> 注意: 搜索内容需要进行Url编码空格要转换成`%20`而不是`+`
### 请求示例 ###
```
GET https://www.pixiv.net/rpc/cps.php?keyword=幸运星
```
### 返回数据 ###
#### 数据示例 ####
```json
{
"candidates":[
{
"tag_name":"\u3089\u304d\u2606\u3059\u305f",
"access_count":"68286498",
"tag_translation":"\u5e78\u8fd0\u661f",
"type":"tag_translation"
}, // ...
]
}
```
#### 字段说明 ####
- `candidates`: (`Object[]`) 搜索推荐候选列表
- `tag_name`: (`string`) 推荐词原名
- `access_count`: (`string` -> `number`) 推荐词访问量
- `tag_translation`: (`string`) 推荐词对应翻译名
- `type`: (`string`) 推荐词类型
- `tag_translation`: 标签翻译信息
- `prefix`: 前缀