How to solve 20 tweet per request limit when we get Imp,click, cost at creative level?


#1

Hello we need to get Billing(cost/spend) and Engagement(clicks, impressions etc. ) stats at the three levels(Campaign > Adgroup > Ad). Currently, we accomplish this through the Twitter ID but we occurred the limit error exceed 20 entities Per request. Use this method, we spend two weeks time to pull 1-year cost stats. Our desired output is a response containing cost segment in the country and daily at the creative level.

Error Message:
<BadRequest object at 0x1085037d0 code=400 details=[{u’message’: u’A maximum of 20 items can be provided for entity_ids’, u’code’: u’INVALID_PARAMETER’, u’parameter’: u’entity_ids’}]>

Let us know if we can give you more details, thanks!


#2

Hi @Sarah_OneMT ,

Please check following documents:

  • The asynchronous analytics endpoint returns up to 90 days of non-segmented analytics data, or up to 45 days of segmented data.

You can’t go above that limit (up to 20 entity IDs). Please consider fetching stats per Campaign/Ad Group level instead. Otherwise, you should fetch those stats continuously rather than do it all together at once.

Best,
Shohei