through

Interface gets the active entity ID

https://ads-api.twitter.com/9/stats/accounts/:account_id/active_entities

params = {

“start_time”: time2utc(start_date, tz), # Example: 2017-05-19T07:00:00Z

“end_time”: time2utc(end_date, tz), # Example: 2017-05-19T07:00:00Z

“Entity”, “PROMOTED_TWEET”

}

Then get the corresponding AD data through the entity ID

https://ads-api.twitter.com/2/stats/jobs/accounts/{account_id}

with params:

{" platform ": None.

‘placement’ : ‘ALL_ON_TWITTER’,

“End_time” : “2021-03-23”,

‘metric_groups’ :’ ENGAGEMENT, BILLING, VIDEO, MEDIA, LIFE_TIME_VALUE_MOBILE_CONVERSION, WEB_CONVERSION ',

‘granularity’ : ‘TOTAL’, ‘entity_ids’ :’ {entity_id} ', ‘country’ : None,

“Start_time” : “2021-03-19”,

'segmentation_type: None,

“Entity” : "PROMOTED_TWEET ’

},
The data returned from this series of operations is empty, but the actual platform has the relevant installation data

Hi,
You mentioned above that you are using this URI to retrieve data.

It looks like this URI is using Ads API version 2, which is a very old version.
Could you change to the newest version v9 and try again?
Thanks.

不好意思,上次的url 写错了,我们现在用的缺失就是v9版本的url,也没有办法找到对应的ad 数据

Sorry, the URL was written wrong last time. What we are missing now is the URL of V9 version, and there is no way to find the corresponding AD data

Hi @swu,
Thanks for the clarification.
Could you provide the request payload (with account id)?
We can look further into it.

https://ads-api.twitter.com/9/stats/jobs/accounts/18ce54yvu1t
{‘start_time’: ‘2021-03-18T16:00:00Z’, ‘end_time’: ‘2021-03-23T16:00:00Z’, ‘entity’: ‘PROMOTED_TWEET’, ‘entity_ids’: [‘5nqxja,5nqxjb,5nqxjf,5sbdss,5zlprt,5zlpru,5zlprv,5zlprw,5zlprx,5zlpry,5zlprz,5zlps0,5zvy78,5zvy79,5zvy7a,5zvy7b,5zvy7c,5zvy7d,5zvy7e,5zvy7f’], ‘granularity’: ‘DAY’, ‘metric_groups’: ‘ENGAGEMENT,BILLING,MOBILE_CONVERSION’, ‘placement’: ‘ALL_ON_TWITTER’, ‘platform’: None, ‘country’: None, ‘segmentation_type’: ‘LOCATIONS’}

Hi @swu
I tested the API requested you provided above and indeed didn’t get data.
It is because the account does not have data during that period.
I checked and found the account was not serving ads from 3/19-3/31, so there is no data.

我们在twitter后台是可以查到数据的