Logo
    立即注册
    开放平台
    产品文档
    品牌词云
    最近更新时间:2023-06-14 14:22:55

    1. 接口描述

    接口URL:https://open.datastory.com.cn/api/datastory.knowledge.brand.keyword.frequency 请求方式:POST 描述:通过该接口可查询弹性知识服务的品牌词云,具体输出内容可查看输出参数示例。

    2. 输入参数

    以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数。

    参数名称 必选 默认值 类型 参数示例 描述
    appkey string "predeploy" 权限校验标识
    filters RequestBrandIndicatorFilters (见接口示例) 查询过滤条件
    matrix RequestBrandIndicatorMatrix (见接口示例) 查询聚合、分页条件
    openStrategy boolean false 是否接受缓存

    3. 输出参数

    参数名称 必选 类型 参数示例 描述
    code integer 0 返回状态码,内部定义
    data ResponseData (见接口示例) 返回数据结果,包含meta、dataset
    message string "接口返回成功!" 接口返回信息说明,在接口返回失败时会有

    4. 数据结构

    4.1 RequestltemFilters

    参数名 必选 类型 参数示例 描述
    publishTimestampLower long 1672502400000 查询开始时间戳
    publishTimestampUpper long 1677513600000 查询结束时间戳
    brandNames array ["雅诗兰黛"] 品牌名,支持传多个
    categoryNames array ["护肤"] 品类名,(不限层级,但此接口支持传单个品类)
    processType int 1 实体关键词类型(建议传processTypeName即可)
    processTypeName string 实体关键词 实体关键词类型(固定值:话题词、实体关键词、算法关键词、表情词、三元组特征词)
    catNames array ["问答","论坛","视频","短视频","小红书","新闻","微博","微信"] 阵地名,可选的都已列举
    catIds array [7,3,4,12,2,10,1,9] 阵地id,与catNames二选一即可
    siteNames array ["知乎","快手app","今日头条","抖音app","火山小视频","小红书","新浪微博","哔哩哔哩"] 站点名
    siteIds array [101944,1334510,1001569,1003583,1011469,146510,101993,44] 站点id,与siteNames二选一即可
    sentimentNames array ["正面","负面","中性"] 情感类型名,可选的都已列举
    sentiments array [1,0,-1] 情感,与sentimentNames二选一即可
    volumeTypeNames array ["PGC","UGC","BGC"] 声量类型名,可选的都已列举
    volumeTypes array [1,2,3] 声量类型,与volumeTypeNames二选一即可
    volumeQualityNames array ["自发创作","追星文","其它","内容营销广告","新闻公关","垃圾广告"] 声量质量名,可选的都已列举
    volumeQualities array [10,7,9] 声量质量,与volumeQualityNames二选一即可
    dimensions array [ "brandName","processType","keyword" ] 需要聚合的维度:processType、keywordType、brandName、keyword,非法参数会报错
    metrics array ["volumeCnt"] 需要查询的指标数据集:volumeCnt(声量)

    4.2 RequestBaseMatrix

    参数名 必选 类型 参数示例 描述
    interval string "month" 发表时间agg查询时间单位,默认:day,仅支持:day、week、month、quarter,(目前没用到,可忽略)
    order string "DESC" 排序方式:ASC(升序)、DESC(降序),非法参数会报错
    sort string "volumeCnt" 排序字段,使用metrics查询的字段排序,非法参数会报错

    4.3 ResponseData

    参数名 必选 类型 参数示例 描述
    dataset ResponseDataset (见接口请求示例) 返回数据集,不同接口返回结果的格式不一样
    dorisTime integer "458" 查询Doris耗时,单位毫秒
    meta object "list" 返回数据的描述信息,主要是字段信息,非方舟接口,请忽略
    time integer "955" 查询总耗时,单位毫秒

    4.3.1 ResponseDataset

    参数名 必选 类型 参数示例 描述
    total integer "34500230" 查询数据总量
    currentPage integer 1 分页查询的页码
    pageSize integer "20" 分页查询的单页数据条数
    rowdata BrandIndicatorVO (见接口请求示例) 返回数据集,不同接口返回结果的格式不一样

    4.3.2 BrandIndicatorVO

    参数名 必选 类型 参数示例 描述
    brandName string "雅诗兰黛" 品牌名
    processTypeName string "实体关键词" 处理类型
    keywordType string "功效" 关键词(实体关键词类型才有值)
    keyword string "雅诗兰黛" 关键词
    volumeCnt long 2 声量值

    5. 示例

    示例1 查看品牌在每个阵地每天的声量趋势

    输入示例

    {
        "filters":
        {
            "publishTimestampLower": "1675180800000",
            "brandNames":
            [
                "雅诗兰黛"
            ],
            "publishTimestampUpper": "1677513600000",
            "processTypeName": "实体关键词",
            "format": "matrix",
            "needResMeta": true,
            "metrics":
            [
                "volumeCnt"
            ],
            "openStrategy": false,
            "dimensions":
            [
                "brandName",
                "processType",
                "keyword"
            ],
            "topN": "10"
        },
        "metrics":
        [
            "volumeCnt"
        ],
        "matrix":
        {
            "sort": "volumeCnt",
            "order": "desc"
        }
    }

    输出示例

    {
        "code": 20000,
        "message": "success",
        "data": {
            "meta": {
                "datasetType": "standard",
                "schema": [
                    {
                        "name": "brandName",
                        "alias": "品牌名",
                        "visibility": "Queryable",
                        "type": "string"
                    },
                    {
                        "name": "catId",
                        "alias": "阵地id",
                        "visibility": "Queryable",
                        "type": "number"
                    },
                    {
                        "name": "catName",
                        "alias": "阵地",
                        "visibility": "Queryable",
                        "type": "string"
                    },
                    {
                        "name": "siteId",
                        "alias": "站点id",
                        "visibility": "Queryable",
                        "type": "number"
                    },
                    {
                        "name": "siteName",
                        "alias": "站点名称",
                        "visibility": "Queryable",
                        "type": "string"
                    },
                    {
                        "name": "publishDate",
                        "alias": "发表时间",
                        "visibility": "Queryable",
                        "type": "string"
                    },
                    {
                        "name": "volumeTypeName",
                        "alias": "声量类型,UGC:普通用户,PGC:专业用户,UKN:未知",
                        "visibility": "Queryable",
                        "type": "string"
                    },
                    {
                        "name": "volumeType",
                        "alias": "阵地id",
                        "visibility": "Queryable",
                        "type": "number"
                    },
                    {
                        "name": "volumeQualityName",
                        "alias": "声量质量名",
                        "visibility": "Queryable",
                        "type": "string"
                    },
                    {
                        "name": "volumeQuality",
                        "alias": "声量质量id",
                        "visibility": "Queryable",
                        "type": "number"
                    },
                    {
                        "name": "processType",
                        "alias": "处理类型",
                        "visibility": "Queryable",
                        "type": "number"
                    },
                    {
                        "name": "processTypeName",
                        "alias": "处理类型名",
                        "visibility": "Queryable",
                        "type": "string"
                    },
                    {
                        "name": "keywordType",
                        "alias": "关键词(实体关键词类型才有值)",
                        "visibility": "Queryable",
                        "type": "string"
                    },
                    {
                        "name": "keyword",
                        "alias": "关键词",
                        "visibility": "Queryable",
                        "type": "string"
                    },
                    {
                        "name": "sentiment",
                        "alias": "情感id",
                        "visibility": "Queryable",
                        "type": "number"
                    },
                    {
                        "name": "sentimentName",
                        "alias": "情感",
                        "visibility": "Queryable",
                        "type": "string"
                    },
                    {
                        "name": "volumeCnt",
                        "alias": "声量值",
                        "visibility": "Queryable",
                        "type": "number"
                    }
                ]
            },
            "dataset": {
                "total": 0,
                "pageSize": 0,
                "currentPage": 0,
                "rowdata": [
                    {
                        "brandName": "雅诗兰黛",
                        "processType": 4,
                        "processTypeName": "实体关键词",
                        "keyword": "雅诗兰黛",
                        "volumeCnt": 8703904
                    },
                    {
                        "brandName": "雅诗兰黛",
                        "processType": 4,
                        "processTypeName": "实体关键词",
                        "keyword": "彩妆其他",
                        "volumeCnt": 5194916
                    },
                    {
                        "brandName": "雅诗兰黛",
                        "processType": 4,
                        "processTypeName": "实体关键词",
                        "keyword": "安肌心语",
                        "volumeCnt": 4180649
                    },
                    {
                        "brandName": "雅诗兰黛",
                        "processType": 4,
                        "processTypeName": "实体关键词",
                        "keyword": "路易·威登",
                        "volumeCnt": 1795185
                    },
                    {
                        "brandName": "雅诗兰黛",
                        "processType": 4,
                        "processTypeName": "实体关键词",
                        "keyword": "情人节",
                        "volumeCnt": 173167
                    },
                    {
                        "brandName": "雅诗兰黛",
                        "processType": 4,
                        "processTypeName": "实体关键词",
                        "keyword": "护肤",
                        "volumeCnt": 65216
                    },
                    {
                        "brandName": "雅诗兰黛",
                        "processType": 4,
                        "processTypeName": "实体关键词",
                        "keyword": "高露洁",
                        "volumeCnt": 52213
                    },
                    {
                        "brandName": "雅诗兰黛",
                        "processType": 4,
                        "processTypeName": "实体关键词",
                        "keyword": "美宝莲",
                        "volumeCnt": 49881
                    },
                    {
                        "brandName": "雅诗兰黛",
                        "processType": 4,
                        "processTypeName": "实体关键词",
                        "keyword": "粉底液",
                        "volumeCnt": 28906
                    },
                    {
                        "brandName": "雅诗兰黛",
                        "processType": 4,
                        "processTypeName": "实体关键词",
                        "keyword": "护肤其他",
                        "volumeCnt": 27552
                    }
                ]
            },
            "time": 496,
            "dorisTime": 496
        }
    }

    6. 状态码

    以下仅列出了接口业务逻辑相关的状态码。

    状态码 描述

    微信扫描二维码在线咨询