From 9964205dc20fd9d9c7305e459c3946f67bf7c512 Mon Sep 17 00:00:00 2001 From: LamGC Date: Thu, 2 Jul 2020 23:21:28 +0800 Subject: [PATCH] =?UTF-8?q?[Add]=20Pixiv=E6=90=9C=E7=B4=A2=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=E5=80=99=E9=80=89=E6=8E=A5=E5=8F=A3.md=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8F=AF=E7=94=A8=E4=BA=8E=E4=BC=98=E5=8C=96=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E7=9A=84=E6=8E=A5=E5=8F=A3=E6=96=87=E6=A1=A3;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- documents/interfaces/Pixiv搜索推荐候选接口.md | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 documents/interfaces/Pixiv搜索推荐候选接口.md diff --git a/documents/interfaces/Pixiv搜索推荐候选接口.md b/documents/interfaces/Pixiv搜索推荐候选接口.md new file mode 100644 index 0000000..f59bc6f --- /dev/null +++ b/documents/interfaces/Pixiv搜索推荐候选接口.md @@ -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`: 前缀