用户画像

优质
小牛编辑
143浏览
2023-12-01

功能介绍

获取本APP的用户画像报告

接口

https://openapi.baidu.com/rest/2.0/mtj/svc/app/getDataByKey

请求参数

此处仅列本接口特有参数,公共参数请参考报告级API说明

获取表格数据

参数名参数类型是否必须描述
methodstringvisit/attribute/f
metricsstring指标列表,指标间逗号分隔

指标

指标名描述适用接口
user_count_ratio用户占比,必须visit/attribute/f

本报告情况特殊,用户占比为必须提供的指标字段

示例

获取用户画像数据

请求

https://openapi.baidu.com/rest/2.0/mtj/svc/app/getDataByKey?access_token=[ACCESS_TOKEN]&key=[APP_KEY]&method=visit/attribute/f&start-date=20170513000000&end-date=20171108232359&metrics=user_count_ratio

响应

{
    "status": 0,
    "msg": "",
    "data": {
        "sex": {
            "fields": [
                "user_count_ratio"
            ],
            "items": [
                [
                    {
                        "attributeId": "51673640596406272",
                        "name": "男"
                    },
                    {
                        "attributeId": "50566423797301248",
                        "name": "女"
                    }
                ],
                [
                    [
                        49.3
                    ],
                    [
                        50.7
                    ]
                ]
            ]
        },
        "age": {
            "fields": [
                "user_count_ratio"
            ],
            "items": [
                [
                    {
                        "attributeId": "13539008165231256741",
                        "name": "18岁以下"
                    },
                    {
                        "attributeId": "3615607858952929332",
                        "name": "18-24岁"
                    },
                    {
                        "attributeId": "3687662158750941236",
                        "name": "25-34岁"
                    },
                    {
                        "attributeId": "3759719757083836468",
                        "name": "35-44岁"
                    },
                    {
                        "attributeId": "3831777355416731700",
                        "name": "45-54岁"
                    },
                    {
                        "attributeId": "3903834953749626932",
                        "name": "55-64岁"
                    },
                    {
                        "attributeId": "13539004888154432677",
                        "name": "65岁以上"
                    }
                ],
                [
                    [
                        2.11
                    ],
                    [
                        25.05
                    ],
                    [
                        33.58
                    ],
                    [
                        30.57
                    ],
                    [
                        8.27
                    ],
                    [
                        0.39
                    ],
                    [
                        0.04
                    ]
                ]
            ]
        },
        "education": {
            "fields": [
                "user_count_ratio"
            ],
            "items": [
                [
                    {
                        "attributeId": "6212610757284954117",
                        "name": "高中及以下"
                    },
                    {
                        "attributeId": "6194038137185989840",
                        "name": "本科及以上"
                    },
                    {
                        "attributeId": "16476319065212752824",
                        "name": "大专"
                    }
                ],
                [
                    [
                        91.11
                    ],
                    [
                        4.87
                    ],
                    [
                        4.03
                    ]
                ]
            ]
        },
        "trade": {
            "fields": [
                "user_count_ratio"
            ],
            "items": [
                [
                    {
                        "attributeId": "16760592303311073922",
                        "name": "教育"
                    },
                    {
                        "attributeId": "1650661282335011983",
                        "name": "医药卫生"
                    },
                    {
                        "attributeId": "5242546831328739593",
                        "name": "IT通信电子"
                    },
                    {
                        "attributeId": "15462136471127292611",
                        "name": "社会公共管理"
                    },
                    {
                        "attributeId": "1828325869244650136",
                        "name": "金融保险"
                    },
                    {
                        "attributeId": "17545657129772755348",
                        "name": "能源采矿化工"
                    },
                    {
                        "attributeId": "6000180781703219560",
                        "name": "建筑房地产"
                    },
                    {
                        "attributeId": "16770756188798232253",
                        "name": "汽车"
                    },
                    {
                        "attributeId": "1991219557086516014",
                        "name": "住宿旅游"
                    },
                    {
                        "attributeId": "1981319425202935271",
                        "name": "建材家居"
                    }
                ],
                [
                    [
                        31.41
                    ],
                    [
                        20.31
                    ],
                    [
                        7.77
                    ],
                    [
                        7.24
                    ],
                    [
                        6.43
                    ],
                    [
                        4.47
                    ],
                    [
                        3.62
                    ],
                    [
                        3.25
                    ],
                    [
                        2.69
                    ],
                    [
                        2.58
                    ]
                ]
            ]
        },
        "interest": {
            "fields": [
                "user_count_ratio"
            ],
            "items": [
                [
                    {
                        "attributeId": "1817285150070878431",
                        "name": "软件应用"
                    },
                    {
                        "attributeId": "2013145566775166121",
                        "name": "影视音乐"
                    },
                    {
                        "attributeId": "16754716521762172846",
                        "name": "资讯"
                    },
                    {
                        "attributeId": "1916599189664044924",
                        "name": "医疗健康"
                    },
                    {
                        "attributeId": "1887137221346444591",
                        "name": "教育培训"
                    },
                    {
                        "attributeId": "16770756188798232253",
                        "name": "汽车"
                    },
                    {
                        "attributeId": "1915893612878190809",
                        "name": "餐饮美食"
                    },
                    {
                        "attributeId": "1789120295501967675",
                        "name": "休闲爱好"
                    },
                    {
                        "attributeId": "1777603404805939678",
                        "name": "家电数码"
                    },
                    {
                        "attributeId": "1926856852155349220",
                        "name": "书籍阅读"
                    }
                ],
                [
                    [
                        11.7
                    ],
                    [
                        9.21
                    ],
                    [
                        8.49
                    ],
                    [
                        6.77
                    ],
                    [
                        5.57
                    ],
                    [
                        4.57
                    ],
                    [
                        4.42
                    ],
                    [
                        4.3
                    ],
                    [
                        3.99
                    ],
                    [
                        3.84
                    ]
                ]
            ]
        }
    }
}