菜单

留存(2-60天数据)

注意:接入Api前请先熟悉api签名机制(参考接口鉴权说明), 即Api请求样例中的一些http请求头的来源

使用注意:

1.最新只能查询今天往前推1天的数据

2.报表涉及到三方数据,建议晚上10点左右再拉一次昨天数据(三方数据可能会持续更新),正常情况此时数据是完整的

说明:

对应后台留存价值报表的留存模块


1 请求URL

https://openapi.toponad.com/v3/retentionreport

2 请求方式

POST

3 请求参数

字段类型是否必传备注样例
start_dateIntY开始日期,格式:YYYYmmdd20190501
end_dateIntY结束日期,格式:YYYYmmdd20190506
appid_listArray[String]N开发者后台的应用ID列表,不传默认开发者的全部app[“a600e6fbeac98c”],
area_listArray[String]N国家短码列表,不传默认所有国家[“US”,"CN"]
channel_listArray[String]N渠道列表,不传默认所有渠道[“haoyou”]
time_zoneStringN时区,枚举值:UTC-8、UTC+8、UTC+0,不传则默认使用开发者账号时区“UTC-8”
startIntY偏移数,代表从第几条数据开始,默认为00
limitIntY每次拉取数据的最大条数,默认是1000,可选[1,1000]不传默认1000,最大1000
metricArray[String]Y请求的指标,其中retention_day_xx 代表留存人数,不再是比例:
all(2-60天用户留存), retention_day_2(第2天用户留存),
... retention_day_60(第60天用户留存),
["retention_day_11","retention_day_12","retention_day_13"]
group_byArray[String]Ygroup by 维度,默认date和app维度固定存在,仅iOS应用支持device维度,如果开发者同时传了iOS和安卓应用,那么只返回iOS应用的数据:
date(日期,默认值),
app(应用), area(地区), channel(渠道),
device(设备类型),
["date","app","area","channel"]

4 返回参数

字段类型是否必传备注
recordsArray[Object]Y记录,对象数组每个record结构见下面records元素结构
countIntY总条数
time_zoneStringY时区,枚举值:UTC-8、UTC+8、UTC+0

records元素结构如下:

字段名类型是否必传备注
appObjectY应用信息
app.idStringY开发者后台的应用ID
app.nameStringY应用名称
app.platformIntY应用的系统平台
dateIntY日期
areaStringN国家码。group_by有选area维度时才有返回
channelStringN渠道。group_by有选channel才有返回
deviceStringN设备类型。group_by有选device才有返回
new_userIntY新增用户
retention_day_2FloatY第2天用户价值
...FloatY第3到第59天用户价值
retention_day_60FloatY第60天用户价值

备注只能查询今天往前推1天的数据

5 样例

请求样例:

curl --location --request POST 'https://openapi.toponad.com/v3/retentionreport' \
--header 'X-Up-Key: 877f8ae9c6e9ca82c0==5b5fff594c373axxx' \
--header 'X-Up-Signature: CE12B506DBCD868C2C6F09E08C139CBC' \
--header 'X-Up-Timestamp: 1626161553000' \
--header 'Content-Type: application/json' \
--data-raw '{
    "start_date": 20200301,
    "end_date": 20200301,
    "appid_list":["a5c41a9ed1679c"],
    "group_by":["date","area"],
    "start": 0,
    "limit": 30,
    "metric": ["all"]
}'

返回样例:

{
    "records": [
        {
            "app": {
                "app_id": "a6012251c3dfxx",
                "name": "一群小辣鸡",
                "platform": 1
            },
            "date": 20200424,
            "new_user": 7036,
            "retention_day_10": 32,
            "retention_day_11": 20,
            "retention_day_12": 21,
            "retention_day_13": 19,
            "retention_day_14": 0,
            "retention_day_15": 0,
            "retention_day_16": 0,
            "retention_day_17": 0,
            "retention_day_18": 0,
            "retention_day_19": 0,
            "retention_day_2": 297,
            "retention_day_20": 0,
            "retention_day_21": 0,
            "retention_day_22": 0,
            "retention_day_23": 0,
            "retention_day_24": 0,
            "retention_day_25": 0,
            "retention_day_26": 0,
            "retention_day_27": 0,
            "retention_day_28": 0,
            "retention_day_29": 0,
            "retention_day_3": 169,
            "retention_day_30": 0,
            "retention_day_31": 0,
            "retention_day_32": 0,
            "retention_day_33": 0,
            "retention_day_34": 0,
            "retention_day_35": 0,
            "retention_day_36": 0,
            "retention_day_37": 0,
            "retention_day_38": 0,
            "retention_day_39": 0,
            "retention_day_4": 104,
            "retention_day_40": 0,
            "retention_day_41": 0,
            "retention_day_42": 0,
            "retention_day_43": 0,
            "retention_day_44": 0,
            "retention_day_45": 0,
            "retention_day_46": 0,
            "retention_day_47": 0,
            "retention_day_48": 0,
            "retention_day_49": 0,
            "retention_day_5": 75,
            "retention_day_50": 0,
            "retention_day_51": 0,
            "retention_day_52": 0,
            "retention_day_53": 0,
            "retention_day_54": 0,
            "retention_day_55": 0,
            "retention_day_56": 0,
            "retention_day_57": 0,
            "retention_day_58": 0,
            "retention_day_59": 0,
            "retention_day_6": 50,
            "retention_day_60": 0,
            "retention_day_7": 45,
            "retention_day_8": 35,
            "retention_day_9": 32
        }
    ],
    "time_zone": "",
    "count": 128
}


上一个
LTV(1-60天数据)
下一个
展示和新增用户(1-60天数据)
最近修改: 2025-08-15Powered by