一、汇总渠道报表
1、v2接口说明
(1)同样的请求参数会缓存半小时数据,如需定时获取更新数据建议设置请求间隔大于30分钟
(2)当天数据更新频率:非geo维度15-30分钟,geo维度1小时以上
(3)QPM限频为10,一分钟内请求超过10次会返回“请求太频繁”,需要等下一分钟才能再请求
(4)各媒体渠道返回的数据时区如下
渠道 | 数据时区 |
广告账户时区 | |
广告账户时区 | |
TikTok | 广告账户时区 |
Kwai | UTC+0 |
Apple | 广告账户时区 |
华为(海外) | 广告账户时区 |
Mintegral | 广告账户时区 |
AppLovin | UTC+0 |
Unity | UTC+0 |
ironSource | UTC+0 |
Vungle | UTC+0 |
POST https://xmp-open.mobvista.com/v2/media/account/report
3、请求参数
参数 | 类型 | 必填 | 说明 |
client_id | string | Y | 向公司管理员或子管理员获取。请确保已开通Open API权限 |
timestamp | int | Y | 请求时的 unix 时间戳 |
sign | string | Y | md5(client_secret+timestamp) |
start_date | string | Y | YYYY-MM-DD |
end_date | string | Y | YYYY-MM-DD |
dimension | []string | N |
默认返回广告账户id维度数据,示例:[‘date’],可选值: date(日期) geo(地区,该维度的当天数据会延迟1小时以上) account_name(广告账户名称) campaign_id(广告系列 id ) campaign_name(广告系列名称) adset_id(广告组 id ) adset_name(广告组名称) ad_id(广告 id) ad_name(广告名称 ) product_id(xmp 产品 id) product_name( xmp 产品名称) os(应用平台) store_package_id(商店 id )
|
metrics | []string | Y | 需要拉取的指标,从 查询可用指标接口 获取 |
module | string | N | 媒体渠道,见 渠道枚举值 |
account_id | []string | N | 广告账户 id |
campaign_id | []string | N | 广告系列 id |
adset_id | []string | N | 广告组 id |
ad_id | []string | N | 广告 id |
geo | []string | N | 两位地区码,如 CN |
product_id | []int | N | xmp 产品 id |
third_party_timezone | string | N | 三方数据指标的时区,见 时区枚举值。注意:当在XMP后台已开启三方指标时区切换,通过API拉取三方指标时该字段必传 |
currency | string | N | 不传时返回媒体侧的广告账户币种,可选:CNY、USD、EUR(兼容全小写) |
page | int | Y | 页码。如果返回的 data.list 非空,请将页码+1继续获取下一页内容,直到 data.list 为空 |
page_size | int | N | 每页大小,1-1000,默认200 |
let dimension=["date"]
request = {
url:uri,
method:'POST',
header:{'Content-Type':'application/json'},
body:{
mode:'raw',
raw:JSON.stringify({
client_id:clientId
,module:"applovin"
,timestamp:timestamp
,sign:sign
,start_date:startDate
,end_date:endDate
,dimension:dimension
,product_id:[62164]
,geo:["US","KR"]
,metrics:["click","cost"]
,page:page
,page_size:page_size
,currency:currency
,third_party_timezone:"+8"
}),
options: {
raw: {
language: 'json'
}
}
}
}
5、返回参数
参数 | 类型 | 说明 |
list | []object | 返回的数据列表 |
page | object | 分页信息 |
page.page | int | 页码 |
page.page_size | int | 每页大小 |
(1)list里的维度/属性
参数 | 类型 | 说明 |
date | string | 日期 |
module | string | 媒体渠道 |
account_id | string | 广告账户id |
account_name | string | 广告账户名称 |
campaign_id | string | 广告系列 id |
campaign_name | string | 广告系列名称 |
adset_id | string | 广告组 id |
adset_name | string | 广告组名称 |
ad_id | string | 广告 id |
ad_name | string | 广告名称 |
product_id | int | xmp 产品 id |
product_name | string | xmp 产品名称 |
os | string | 应用平台 |
store_package_id | string | 商店 id |
geo | string | 地区 |
timezone | string | 广告账户在媒体的时区 |
currency | string | 按传入币种返回,当没传时返回媒体侧的广告账户币种 |
{
"code": 0,
"msg": "success",
"data": {
"list": [
{
"account_id": "aaa",
"click": 557132,
"cost": 2613.75,
"date": "2024-01-02",
"module": "applovin",
"product_name": "S",
"solar_engine_real_install": 0,
"timezone": ""
}
],
"page": {
"page": 1,
"page_size": 1,
"next_page": 1
}
}
}
二、查询可用指标
1、接口说明
QPM限频为120,一分钟内请求超过120次会返回“请求太频繁”,需要等下一分钟才能再请求
POST https://xmp-open.mobvista.com/v1/media/report/fields
3、请求参数
参数 | 类型 | 必填 | 说明 |
client_id | string | Y | 向公司管理员或子管理员获取。请确保已开通Open API权限 |
timestamp | int | Y | 请求时的 unix 时间戳 |
sign | string | Y | md5(client_secret+timestamp) |
report_type | string | Y |
1、查询广告报表API可用指标:ad 2、查询素材报表API可用指标:material |
Header Field | 说明 |
Accept-Language |
1、返回中文名称的指标:zh-CN 2、返回英文名称的指标:en-US |
request = {
url:uri,
method:'POST',
header:{'Content-Type':'application/json','Accept-Language': 'en-US'},
body:{
mode:'raw',
raw:JSON.stringify({
client_id:clientId,
timestamp:timestamp,
sign:sign,
report_type:"material"//ad,material
}),
options: {
raw: {
language: 'json'
}
}
}
}
5、返回参数
参数 | 类型 | 说明 |
report_type | string |
1、查询广告报表API可用指标:ad 2、查询素材报表API可用指标:material |
fields | []object | 指标列表 |
fields.field | string | 指标 id。如需查询该指标,可在报表API的metrics字段传入该值 |
fields.title | string | 指标名称 |
fields.format | string | 指标格式 |
fields.source | string | 指标来源 |
{
"code": 0,
"msg": "success",
"data": {
"report_type": "material",
"fields": [
{
"field": "impression",
"title": "Impression",
"format": "integer",
"source": "channel"
},
{
"field": "postback_install",
"title": "Third-party Conversions",
"format": "integer",
"source": "xmp"
},
{
"field": "af_conversion",
"title": "Install",
"format": "",
"source": "appsflyer"
},
{
"field": "adjust_conversion",
"title": "Conversion",
"format": "integer",
"source": "adjust"
},
{
"field": "solar_engine_real_install",
"title": "Install",
"format": "integer",
"source": "solar_engine"
},
{
"field": "tenjin_tracked_installs",
"title": "Installs",
"format": "integer",
"source": "tenjin"
}
]
}
}