As reported here"

LineItem.active_entities(account, start_time, end_time) returns active entities and indeed they all have some stats. However when I try to get more information about a particular LineItem I get the following error:

LineItem.load(account, 'gsmga').name
twitter_ads.error.NotFound: <NotFound object at 0x10d443888 code=404 details=[{'message': 'Line Item gsmga was not found for Account xxxx', 'code': 'NOT_FOUND', 'parameter': 'line_item_id'}]>

and LineItem.all(account) does not include the missing aforementioned LineItem gsmga.

The stats belong to a Twitter First View campaign which seems to be only partially integrated into the official API (the UI for managing First View tweets also looks different).

How can we properly get the information about First View LineItems and Campaign?
In my case, I am especially interested in the Campaign Name for reporting purposes.

I cannot find anything related to this in this repository nor in the official documentation.

Thank you in advance.

Thanks for reporting this, @wr_tech. (And good callout that the UI for these is different, too.)

You’re right that Active Entities returns entity IDs for some campaigns that are not available in the Ads API in general (such as First View). We are trying to determine whether those types of campaigns should be retrievable.

Until then, do you have a good way to identify and filter out these campaigns?


Separately, does your tool support editing campaigns? Or is it reporting only?

Thank you for the prompt answer!

Unfortunately the only thing I get is:

LineItem.all_stats(account, ['gsmga'], ['ENGAGEMENT'], granularity='DAY', entity='LINE_ITEM')
[
 {'id_data': [
   {
    'segment': None, 'metrics': {'card_engagements': None, 'follows': [17, 0, 0, 0, 0, 0, 0], ...}, 
    'id': 'gsmga'
  }
]

so basically I can only get the metrics and the id which is not enough to identify these campaigns and filter them out.
From what I see these View First campaigns generate quite a lot of reach and it would be important to include them in the reports.

The tool is reporting only.
Is there any way I can get this data somehow?

Thank you again for your support!

Ps: I see that https://ads.twitter.com/trendsdash/xxx/trends.json can be queried but it would be quite hard to integrate it into the reporting system and on top of that I can see that even that endpoint doesn’t use the aforementioned ‘gsmga’ id nor its base 10 id.