菜单

搜索API

下载

通过调取搜索API,可以在您的网站、APP、小程序等渠道展示基于Elasticsearch的关键词搜索结果。

*该功能仅支持企业版用户使用

 

请求方式 请求地址
GET http://api.helplook.net/api/es/search-tannant

参数

参数名 类型 必填 说明
keyword string 用于搜索的关键词
version_id string 版本ID,文章版本列表获取, 未传为主版本
token string 获取api key
page string 页数,默认为1
pagesize string 页面大小,默认为5

 

返回数据

{
    "data": {
        "list": [
            {
                "id": "12345",                       #栏目id
                "string_id": "testid",               #栏目字符id
                "tannant_id": "85",                  #所属站点id
                "name": "栏目标题",                   #栏目标题
                "type": "1",                         #类型(1栏目、2文章)
                "slug": "hhhh",                      #自定义路径
                "status": "1",                       #状态
                "order": "5",                        #目录排序
                "content": "",                       #部分文章内容
                "add_time": "1685515614",            #创建时间
                "update_time": "1686641104"          #更新时间
            },
            {
                "id": "12346",                       #文章id
                "string_id": "im69RR",               #文章字符id
                "tannant_id": "85",                  #所属站点id
                "name": "文章标题",                   #文章标题
                "type": "2",                         #类型(1栏目、2文章)
                "slug": "im69RR",                    #自定义路径
                "status": "1",                       #状态
                "order": "2",                        #目录排序
                "content": "​示例文本文案",            #部分文章内容
                "add_time": "1686641109",            #创建时间
                "update_time": "1691489920"          #更新时间
            }
        ],
        "total": 1,
        "page": 1,
        "page_size": 5
    },
    "msg": "Success",
    "code": 200
}
上一个
留资列表API
下一个
AI小部件API
最近修改: 2025-01-10Powered by