Skip to main content

数据报表查询 API

修订历史#

文档版本发布时间修订说明
v1.0-支持综合报表数据查询
v2.0-用户留存、用户价值数据查询

1. 接口校验#

1.1 协议#

HTTP

1.2 Header公共请求参数#

需要在头部加入 Authorization: Bearer {your token}

参数说明样例
Authorizationauthorization infoBearer {your token}
curl -v -H "Authorization: Bearer 96d6b7ae-d522-45b4-b8ac-dc12008814ef" -d {post data} https://openapi.tradplusad.com/v2/allreport
token 的获取:后台“我的账号”-“报表API key”-点击生成key

2. 综合报表数据查询 API#

2.1 URL#

https://openapi.tradplusad.com/v2/allreport

2.2 请求协议#

HTTP POST
HTTP Content-Type: application/json

2.3请求参数#

数据需要拉取到没有返回为止,通过start参数
参数名类型是否必传备注样例
startDateStringY开始日期,格式:YYYY-mm-dd2020-03-01
endDateStringY结束日期,格式:YYYY-mm-dd2020-03-02
timezoneStringN时区,枚举值,仅支持:"UTC+8"、"UTC+0"、"UTC-8"。不传默认为"UTC+0"UTC+8
currencyStringN币种:不传默认USD 仅支持USD CNYUSD
appIdListString[]N开发者后台的应用ID列表,不传默认为当前账号下所有app
startIntN偏移量,表示从第几条数据开始,默认为00
limitIntN每次拉取数据的最大条数,默认是1000,可选[1,1000]之间的任意整数100
groupByString[]Ndate(默认值),appId,placementId,adFormat,area(ISO 3166-1二位国家地区代码),network,networkPlacementId[“network”,”networkPlacementId”]
metricString[]Nall(默认值),dau,deu,arpu,newUsers,requestApi,fillApi,fillrateApi,impressionApi,clickApi,ecpmApi,ctrApi,revenue[“dau”,”request”,”fillrateApi”]

2.4 返回参数#

HTTP Content-Type: application/json
字段类型备注
timezoneString时区
itemsArray记录
items元素结构如下:
字段类型是否必传备注
dateStringN日期,格式:YYYY-mm-dd
appIdStringN应用ID (tradplus),groupByappId维度才有返回
packageNameStringN包名 ,groupByappId维度才有返回
placementIdStringN广告位ID (tradplus),groupByplacementId维度才有返回
placementNameStringN广告位名字 (tradplus),groupByplacementId维度才有返回
adFormatIntN广告位类型,groupByadFormat维度才有返回
adFormatNameStringN广告位类型名字,groupByadFormat维度才有返回
areaStringN国家地区编码(ISO 3166-1二位国家地区代码),groupByarea维度才有返回
networkIntN广告网络ID,groupBynetwork维度才有返回
networkNameStringN广告网络名字,groupBynetwork维度才有返回
networkPlacementIdStringN广告网络的广告位ID信息,groupBynetworkPlacementId维度才有返回
networkPlacementNameStringN广告网络的广告源名称 (tradplus),groupBynetworkPlacementId维度才有返回
networkPlacementInfoStringN广告网络的广告位详细信息,groupBynetworkPlacementId维度才有返回
dauIntY日活跃用户数量(app级别)
deuIntY每日观看广告的用户数
arpuFloatY每用户平均收入
newUsersIntY新增用户(app级别)
newUserRateFloatY新增用户占比(app级别)
requestApiIntY三方广告平台的请求数
fillApiIntY三方广告平台的填充数
fillrateApiFloatY三方广告平台的填充率
impressionApiIntY三方广告平台的展示数
clickApiIntY三方广告平台的点击数
ctrApiFloatY三方广告平台的点击率
ecpmApiFloatY三方广告平台的eCPM
RevenueFloatY收益
各时区完整数据更新时间点:
UTC+0 20(北京时间)
UTC+8 21点(北京时间)
UTC-8 次日2点(北京时间)

三方广告平台时区说明

2.5 样例#

请求样例:#

{
"startDate": "2021-07-01",
"endDate" : "2021-07-07",
"timezone" : "UTC+8",
"currency" : "USD",
"start": 0,
"limit": 1000,
"groupBy":
[
"date",
"appId",
"placementId"
],
"metric":
[
"all"
]
}

响应样例:#

{
"items": [
{
"date": "2021-07-01",
"appId": "6640E7E3BDAC951B8F28D4C8C50E50B5",
"packageName": "com.unstall.meetdelete",
"placementId": "B514A432CE5E96A44BD2E313AC3323AB",
"placementName": "Banner_1",
"adFormat": 0, //groupBy有adFormat维度才有返回
"adFormatName": "", //groupBy有adFormat维度才有返回
"area": "", //groupBy有area维度才有返回
"network": 0, //groupBy有network维度才有返回
"networkName": "", //groupBy有network维度才有返回
"networkPlacementName": "", //groupBy有networkPlacementId维度才有返回
"networkPlacementId": "", //groupBy有networkPlacementId维度才有返回
"networkPlacementInfo": "", //groupBy有networkPlacementId维度才有返回
"requestApi": 19433,
"fillApi":150,
"fillrateApi": 0.13,
"impressionApi": 1989,
"clickApi": 236,
"ecpmApi": 2.21,
"ctrApi": 0.14,
"Revenue": 6.59,
"dau": 679,
"deu": 223,
"arpu": 0.01,
"newUsers": 349,
"newUserRate": 0.63
}
],
"timezone": "UTC+8"
}

3. 用户价值1-90天报表 API#

3.1 URL#

https://openapi.tradplusad.com/v2/ltv

3.2 请求协议#

HTTP POST
HTTP Content-Type: application/json

3.3请求参数#

数据需要拉取到没有返回为止,通过start参数
参数名类型是否必传备注样例
startDateStringY开始日期,格式:YYYY-mm-dd2020-03-01
endDateStringY结束日期,格式:YYYY-mm-dd2020-03-02
timezoneStringN时区,枚举值,仅支持:"UTC+8"、"UTC+0"、"UTC-8"。不传默认为"UTC+0"UTC+8
currencyStringN币种:不传默认USD 仅支持USD CNYUSD
appIdListString[]N开发者后台的应用ID列表,不传默认为当前账号下所有app
areaListString[]NISO 3166-1二位国家地区代码的列表,不传默认为全部地区CN
startIntN偏移量,表示从第几条数据开始,默认为00
limitIntN每次拉取数据的最大条数,默认是1000,可选[1,1000]之间的任意整数100
groupByString[]Ygroup by 维度:["date","app","area"],date和app固定存在,一直会有["date","app","area"]
metricString[]Yltvxx列表,最多支持90天,只传一个["all"] 代表全部,例如ltv20代表第20天的累积收益["ltv11","ltv12","ltv13"]

3.4 返回参数#

HTTP Content-Type: application/json
字段类型备注
timezoneString时区
itemsArray记录
items元素结构如下:
字段类型备注
appIdStringapp app_id
appNameStringapp name
dateString日期,格式:YYYY-mm-dd
ltvxxFloat64ltv数字 数字(1-90)

> 备注:每日北京时间21点更新昨天数据

3.5 样例#

请求样例:#

{
"startDate": "2021-07-01",
"endDate" : "2021-07-07",
"timezone" : "UTC+0",
"currency" : "USD",
"start": 0,
"limit": 1000,
"groupBy":
[
"date",
"app"
],
"metric":
[
"all"
]
}

响应样例:#

{
"items":
[
{
"appId": "6640E7E3BDAC951B8F28D4C8C50E50B5",
"appName": "Banner_1",
"date": "2021-07-01",
"newUserNum": 2,
"ltv1": 9.54,
"ltv10": 0,
"ltv11": 0,
"ltv12": 0,
"ltv13": 0,
"ltv14": 0,
"ltv15": 0,
"ltv16": 0,
"ltv17": 0,
"ltv18": 0,
"ltv19": 0,
"ltv2": 0,
"ltv20": 0,
"ltv21": 0,
"ltv22": 0,
"ltv23": 0,
"ltv24": 0,
"ltv25": 0,
"ltv26": 0,
"ltv27": 0,
"ltv28": 0,
"ltv29": 0,
"ltv3": 0,
"ltv30": 0,
"ltv31": 0,
"ltv32": 0,
"ltv33": 0,
"ltv34": 0,
"ltv35": 0,
"ltv36": 0,
"ltv37": 0,
"ltv38": 0,
"ltv39": 0,
"ltv4": 0,
"ltv40": 0,
"ltv41": 0,
"ltv42": 0,
"ltv43": 0,
"ltv44": 0,
"ltv45": 0,
"ltv46": 0,
"ltv47": 0,
"ltv48": 0,
"ltv49": 0,
"ltv5": 0,
"ltv50": 0,
"ltv51": 0,
"ltv52": 0,
"ltv53": 0,
"ltv54": 0,
"ltv55": 0,
"ltv56": 0,
"ltv57": 0,
"ltv58": 0,
"ltv59": 0,
"ltv6": 0,
"ltv60": 0,
"ltv61": 0,
"ltv62": 0,
"ltv63": 0,
"ltv64": 0,
"ltv65": 0,
"ltv66": 0,
"ltv67": 0,
"ltv68": 0,
"ltv69": 0,
"ltv7": 0,
"ltv70": 0,
"ltv71": 0,
"ltv72": 0,
"ltv73": 0,
"ltv74": 0,
"ltv75": 0,
"ltv76": 0,
"ltv77": 0,
"ltv78": 0,
"ltv79": 0,
"ltv8": 0,
"ltv80": 0,
"ltv81": 0,
"ltv82": 0,
"ltv83": 0,
"ltv84": 0,
"ltv85": 0,
"ltv86": 0,
"ltv87": 0,
"ltv88": 0,
"ltv89": 0,
"ltv9": 0,
"ltv90": 0
}
],
"timezone": "UTC+0"
}

4 用户留存2-90天报表 API#

4.1 URL#

https://openapi.tradplusad.com/v2/userActive

4.2 请求协议#

HTTP POST
HTTP Content-Type: application/json

4.3请求参数#

数据需要拉取到没有返回为止,通过start参数
参数名类型是否必传备注样例
startDateStringY开始日期,格式:YYYY-mm-dd2020-03-01
endDateStringY结束日期,格式:YYYY-mm-dd2020-03-02
timezoneStringN时区,枚举值,仅支持:"UTC+8"、"UTC+0"、"UTC-8"。不传默认为"UTC+0"UTC+8
appIdListString[]N开发者后台的应用ID列表,不传默认为当前账号下所有app
areaListString[]NISO 3166-1二位国家地区代码的列表,不传默认为全部地区CN
startIntN偏移量,表示从第几条数据开始,默认为00
limitIntN每次拉取数据的最大条数,默认是1000,可选[1,1000]之间的任意整数100
groupByString[]Ygroup by 维度:["date","app","area"],date和app固定存在,一直会有["date","app","area"]
metricString[]Ykeepxx 列表,最多支持90天,只传一个["all"] 代表全部,例如keep20 代表第20天的累积收益["keep22","keep23","keep24"]

4.4 返回参数#

HTTP Content-Type: application/json
字段类型备注
timezoneString时区
itemsArray记录
items元素结构如下:
字段类型备注
appIdStringapp app_id
appNameStringapp name
dateString日期,格式:YYYY-mm-dd
keepxxFloat64keep数字 数字(1-90)

> 备注:每日北京时间21点更新昨天数据

4.5 样例#

请求样例:#

{
"startDate": "2021-07-01",
"endDate" : "2021-07-07",
"timezone" : "UTC+0",
"currency" : "USD",
"start": 0,
"limit": 1000,
"groupBy":
[
"date",
"app"
],
"metric":
[
"all"
]
}

响应样例:#

{
"items": [
{
"appId": "FDC48B1D9D9E1F5CBD0C327159C8191C",
"appName": "Banner_1",
"date": "2021-07-01",
"kp1": 2.31,
"kp10": 0,
"kp11": 0,
"kp12": 0,
"kp13": 0,
"kp14": 0,
"kp15": 0,
"kp16": 0,
"kp17": 0,
"kp18": 0,
"kp19": 0,
"kp2": 0,
"kp20": 0,
"kp21": 0,
"kp22": 0,
"kp23": 0,
"kp24": 0,
"kp25": 0,
"kp26": 0,
"kp27": 0,
"kp28": 0,
"kp29": 0,
"kp3": 0,
"kp30": 0,
"kp31": 0,
"kp32": 0,
"kp33": 0,
"kp34": 0,
"kp35": 0,
"kp36": 0,
"kp37": 0,
"kp38": 0,
"kp39": 0,
"kp4": 0,
"kp40": 0,
"kp41": 0,
"kp42": 0,
"kp43": 0,
"kp44": 0,
"kp45": 0,
"kp46": 0,
"kp47": 0,
"kp48": 0,
"kp49": 0,
"kp5": 0,
"kp50": 0,
"kp51": 0,
"kp52": 0,
"kp53": 0,
"kp54": 0,
"kp55": 0,
"kp56": 0,
"kp57": 0,
"kp58": 0,
"kp59": 0,
"kp6": 0,
"kp60": 0,
"kp61": 0,
"kp62": 0,
"kp63": 0,
"kp64": 0,
"kp65": 0,
"kp66": 0,
"kp67": 0,
"kp68": 0,
"kp69": 0,
"kp7": 0,
"kp70": 0,
"kp71": 0,
"kp72": 0,
"kp73": 0,
"kp74": 0,
"kp75": 0,
"kp76": 0,
"kp77": 0,
"kp78": 0,
"kp79": 0,
"kp8": 0,
"kp80": 0,
"kp81": 0,
"kp82": 0,
"kp83": 0,
"kp84": 0,
"kp85": 0,
"kp86": 0,
"kp87": 0,
"kp88": 0,
"kp89": 0,
"kp9": 0,
"kp90": 0
}
],
"timezone": "UTC+0"
}

广告网络ID#

id备注
1Facebook
2Admob
3Mopub
4AdColony
5Unity Ads
6Tapjoy
7Vungle
9Applovin
10IronSource
15Chartboost
16Tencent Ads
17Pangle(cn)
18Mintegral
19Pangle
20Kuaishou Ads
21Sigmob
23Inmobi
24Fyber
25Youdao
26DisplayIO JSTag
27crosspro
30Helium
31Maio
32Criteo
33Mytarget
34ogury
35joomob
36Appnext
37Kidoz
38Smaato
41Huawei Ads
43Baidu
44Klevin

广告类型#

id备注
1原生
2插屏
3开屏
4横幅
5激励视频
6积分墙