Billed_charge_local_micro Discrepancies Between UI and Ads API



We have been noticing discrepancies between what data we get from the Ads API vs the TW Ads Manager UI. We are able to import matching Campaign impression data from the API, but spend data is often incorrect compared to what’s shown in Ads Manager. In addition, the Ads Manager exports are often different than either the API or the UI.

Please see the images below that show examples of the differences we are seeing. We’ve seen the difference go as high as 85% depending on the source, and we’ve also seen this across other advertiser accounts.

Are we doing something wrong on our end?

Tom Boilard


@tboilard: Could you please provide some example API calls so we can try to repro? Once we have that, we’ll work to identify discrepancies and then try to figure out why they exist.


Hi @juanshishido,

Thanks for the quick response. While I am getting you API calls would it be possible for you to explain why the Twitter UI differs from the Twitter Ad Manager Export from the same screen?

Tom Boilard


Hi @juanshishido,

Below are the params for the async job requests for the date range 9/20/2016 to 9/25/2016. Please let me know if you need any other information.

{'placement': <ALL_ON_TWITTER>, 'metric_groups': u'ENGAGEMENT,BILLING,VIDEO,MEDIA,WEB_CONVERSION', 'country': None, 'start_time': '2016-09-20T00:00:00+01:00', 'entity': <CAMPAIGN>, 'platform': None, 'end_time': '2016-09-25T00:00:00+01:00', 'granularity': <DAY>, 'entity_ids': u'5r54q,5ri6e,5ri6f,5ri6k,5ri71,5ri7y,5rk5s,5rk76,5scj4,5scjx,5sck1,5sclq,5sclx,5scm1,5scno,5scpi,5tbnw,5tbnx,5tbny,5tbnz', 'segmentation_type': None}

{'placement': <ALL_ON_TWITTER>, 'metric_groups': u'ENGAGEMENT,BILLING,VIDEO,MEDIA,WEB_CONVERSION', 'country': None, 'start_time': '2016-09-20T00:00:00+01:00', 'entity': <CAMPAIGN>, 'platform': None, 'end_time': '2016-09-25T00:00:00+01:00', 'granularity': <DAY>, 'entity_ids': u'5tbo0,5tbo1,5tbo2,5tbo3,5tbo4,5tbo5,5tbo6,5tbo7,5tbo8,5tbo9,5tbzr,5tbzs,5tbzt,5tbzu,5tbzv,5tbzw,5tbzx,5tbzy,5tbzz,5tc00', 'segmentation_type': None}

{'placement': <ALL_ON_TWITTER>, 'metric_groups': u'ENGAGEMENT,BILLING,VIDEO,MEDIA,WEB_CONVERSION', 'country': None, 'start_time': '2016-09-20T00:00:00+01:00', 'entity': <CAMPAIGN>, 'platform': None, 'end_time': '2016-09-25T00:00:00+01:00', 'granularity': <DAY>, 'entity_ids': u'5tc01,5tc02,5tc03,5tc04,5tc05,5tc06,5tc07,5tc08,5tc09,5tc0a,5tc0b,5tiex,5tiey,5tiez,5tif0,5tif1,5tif2,5tif3,5tig3,5tig4', 'segmentation_type': None}

{'placement': <ALL_ON_TWITTER>, 'metric_groups': u'ENGAGEMENT,BILLING,VIDEO,MEDIA,WEB_CONVERSION', 'country': None, 'start_time': '2016-09-20T00:00:00+01:00', 'entity': <CAMPAIGN>, 'platform': None, 'end_time': '2016-09-25T00:00:00+01:00', 'granularity': <DAY>, 'entity_ids': u'5tig5,5tig6,5tig7,5tig8,5tig9,5x2rp,5x3es,5x3et,5x3eu,5x3ev,5x3ew,5x3ex,5x3ey,5x3ez,5x3f0,5x3f1,5x3f2,5x3f3,5x3f4,5x3f5', 'segmentation_type': None}

{'placement': <ALL_ON_TWITTER>, 'metric_groups': u'ENGAGEMENT,BILLING,VIDEO,MEDIA,WEB_CONVERSION', 'country': None, 'start_time': '2016-09-20T00:00:00+01:00', 'entity': <CAMPAIGN>, 'platform': None, 'end_time': '2016-09-25T00:00:00+01:00', 'granularity': <DAY>, 'entity_ids': u'5x3f6,5x3f7,5x3f8,5x3f9,5x3fa,5x3fb,5zz2p,5zz2q,5zz2r,5zz2s,5zz2t,5zz2u,5zz2v,5zz2w,5zz2x,5zz2y,5zz2z,5zz30,5zz31,5zz32', 'segmentation_type': None}

{'placement': <ALL_ON_TWITTER>, 'metric_groups': u'ENGAGEMENT,BILLING,VIDEO,MEDIA,WEB_CONVERSION', 'country': None, 'start_time': '2016-09-20T00:00:00+01:00', 'entity': <CAMPAIGN>, 'platform': None, 'end_time': '2016-09-25T00:00:00+01:00', 'granularity': <DAY>, 'entity_ids': u'5zz33,5zz34,5zz35,5zz36,5zz37,5zz38,5zz39,5zz8z,5zz90,5zz91,5zz92,5zz93,5zz94,5zz95,5zz96,5zz97,5zz98,5zz99,5zz9a,5zz9b', 'segmentation_type': None}

{'placement': <ALL_ON_TWITTER>, 'metric_groups': u'ENGAGEMENT,BILLING,VIDEO,MEDIA,WEB_CONVERSION', 'country': None, 'start_time': '2016-09-20T00:00:00+01:00', 'entity': <CAMPAIGN>, 'platform': None, 'end_time': '2016-09-25T00:00:00+01:00', 'granularity': <DAY>, 'entity_ids': u'5zz9c,5zz9d,5zz9e,5zz9f,5zz9g,5zz9h,5zz9i,5zz9j,62072,62073,62074,62075,62076,62077,62078,62079,6207a,6207b,6207c,6207d', 'segmentation_type': None}

{'placement': <ALL_ON_TWITTER>, 'metric_groups': u'ENGAGEMENT,BILLING,VIDEO,MEDIA,WEB_CONVERSION', 'country': None, 'start_time': '2016-09-20T00:00:00+01:00', 'entity': <CAMPAIGN>, 'platform': None, 'end_time': '2016-09-25T00:00:00+01:00', 'granularity': <DAY>, 'entity_ids': u'6207e,6207f,6207g,6207h,6207i,6207j,6207k,6207l,6207m', 'segmentation_type': None}

PLEASE NOTE: The placement, entity, and granularity params are actually ‘ALL_ON_TWITTER’, ‘CAMPAIGN’, ‘DAY’ respectively.

Thanks again for all your help,
Tom Boilard


@tboilard: One more thing. Could you please provide the account_id you’re trying to pull stats for? Thanks!


Hi @juanshishido,

Here is the account_id 18ce54dkeul

Tom Boilard


As I can see, It looks that always Ads Manager Export is Higher than the other two.

Could it be that you’re not including TAP campaigns (as i can see from your api request) and in TW API and in TW UI?

Could this help!


Hi @hector_borras,

Thanks for your response…How would we include TAP campaigns in the Analytics API call? Also if your theory is correct wouldn’t the Impressions data be incorrect as well?

Tom Boilard


You should sen the param placement as follows:

{‘placement’: <ALL_ON_TWITTER,PUBLISHER_NETWORK>, ‘metric_groups’: u’ENGAGEMENT,BILLING,VIDEO,MEDIA,WEB_CONVERSION’, ‘country’: None, ‘start_time’: ‘2016-09-20T00:00:00+01:00’, ‘entity’: , ‘platform’: None, ‘end_time’: ‘2016-09-25T00:00:00+01:00’, ‘granularity’: , ‘entity_ids’: u’5r54q,5ri6e,5ri6f,5ri6k,5ri71,5ri7y,5rk5s,5rk76,5scj4,5scjx,5sck1,5sclq,5sclx,5scm1,5scno,5scpi,5tbnw,5tbnx,5tbny,5tbnz’, ‘segmentation_type’: None}

Yes, you’re right, that’s a little bit strange!



@tboilard: We’re not seeing any engagement data for those campaigns—we haven’t checked all those entity IDs, but most—for the time period you specified. See the following example:

$ twurl -H "/1/stats/accounts/18ce54dkeul?entity=CAMPAIGN&entity_ids=5tc01,5tc02,5tc03,5tc04,5tc05,5tc06,5tc07,5tc08,5tc09,5tc0a,5tc0b,5tiex,5tiey,5tiez,5tif0,5tif1,5tif2,5tif3,5tig3,5tig4&start_time=2016-09-20&end_time=2016-09-25&granularity=DAY&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT" | jq
  "data_type": "stats",
  "time_series_length": 5,
  "data": [
      "id": "5tc08",
      "id_data": [
          "segment": null,
          "metrics": {
            "impressions": null,
            "tweets_send": null,
            "qualified_impressions": null,
            "follows": null,
            "app_clicks": null,
            "retweets": null,
            "likes": null,
            "engagements": null,
            "clicks": null,
            "card_engagements": null,
            "replies": null,
            "url_clicks": null,
            "carousel_swipes": null
  "request": {
    "params": {
      "start_time": "2016-09-19T23:00:00Z",
      "segmentation_type": null,
      "entity_ids": [
      "end_time": "2016-09-24T23:00:00Z",
      "country": null,
      "placement": "ALL_ON_TWITTER",
      "granularity": "DAY",
      "entity": "CAMPAIGN",
      "platform": null,
      "metric_groups": [

Are there specific campaign IDs we should look into? It’s best to isolate to one metric_groups value and one entity_id for the purposes of debugging.


@tboilard: We are seeing stats data for some campaigns in this set of IDs: 5zz9c,5zz9d,5zz9e,5zz9f,5zz9g,5zz9h,5zz9i,5zz9j,62072,62073,62074,62075,62076,62077,62078,62079,6207a,6207b,6207c,6207d.

Still, if we could isolate to a single campaign, that’d be ideal.


Hi @juanshishido,

While determining the campaign(s) causing the discrepancies we may have discovered something.

We looked at the campaign level for 9/20 and found that both the API and export show spend data for campaigns that were not running on that day. The export shows more spend data than the API, but this discrepancy in the export only occurs when I export a longer time period. If I pull a report only for 9/20, everything matches the UI. The API returns the same data no matter what time frame is pulled.

I’ve attached a new screenshot of these inactive campaigns along with the campaign IDs.

Thanks again for your time.

Tom Boilard


Thanks, @tboilard! This is really helpful.

We’ve been able to repro for 5tbo8 and will require additional investigation on our end.


Hi @juanshishido,

Please let us know if you need any other information.

Tom Boilard


No additional information needed at this time, @tboilard. Thanks!


@tboilard: We’ve taken a closer look at the line item for the campaign we’ve been discussing (campaign ID 5tbo8). This is an APP_INSTALLS objective with CPI bidding—"charge_by": "APP_INSTALL".

The apps associated with this account all have a 30-day post-engagement window. That means that if a user clicked on the ad and installed the app within 30 days (on the same device), we charge for that install at the moment of installation, not at the time of engagement. This is why we’re seeing spend on the 20th.

We’ve eliminated this as a possible discrepancy, but still need to determine what’s happening.



Thanks for the update.



Sorry to bring an older thread back to life, but was there ever a definitive answer to this question? It seems like it wasn’t wholly determined what is happening. Any help in understanding this would be greatly appreciated.

We have a client that we pull Twitter Ads data for and they are showing us their UI reporting as being just slightly off on spend, impressions and clicks from what we provide via the API. Currently, the only UI data that I have is at the account level from 1/1/2017 to 7/12/2017 as we don’t have access to their UI, but I will try to get some more detailed data from them if that helps.

Here is a snippet of our call params (Placement is both ALL ON TWITTER and PUBLISHER NETWORK. No segments and granularity is hourly):

"account_id": "k0cex", "api_key": "xxxxx", "api_secret": "xxxxx", "endpoint": "campaigns", "include_deleted": true, "include_inactive": true, "metric_groups": [ "ENGAGEMENT", "BILLING", "VIDEO", "MEDIA", "WEB_CONVERSION" ], "metrics": [ "engagements", "card_engagements", "impressions", "retweets", "replies", "likes", "follows", "clicks", "url_clicks", "billed_charge_local_micro", "video_total_views", "video_content_starts", "video_views_25", "video_views_50", "video_views_75", "video_views_100", "media_views", "conversion_purchases", "conversion_sign_ups", "conversion_site_visits", "conversion_downloads", "conversion_custom"]

Eddie Young


@AlightAnalytics: That’s correct. We never determined what the issue was here or if there even was an issue.

In order to help with your question, we’ll need an example request and response as well as what you expect to see in that response. It’s a good idea to keep it scoped to a single entity—e.g., a line item or promoted Tweet.