The api does not work correctly when sort_by is specified as ‘created_at-desc’. It returns fewer promoted tweets (even after following with another request with cursor until there are no results). e.g.
twurl -H “https://ads-api.twitter.com” “/2/accounts/18ce54kuzfh/promoted_tweets?with_deleted=true&sort_by=created_at-desc”
twurl -H “https://ads-api.twitter.com” “/2/accounts/18ce54kuzfh/promoted_tweets?with_deleted=true&sort_by=created_at-desc&cursor=yd88icns1p0leidoekdmo”
The first request reurns 146 tweets and second returns 0 with a null cursor after that request. So, a total of 146 tweets.
Now, the same request when changed to use count=1000, returns 399 tweets in the first request. A total of 399 tweets.
When use with sort=created_at-asc, the requests return more tweets (but probably not all in many cases).
So, count and sort is resulting into a lot of tweets being missed in the response.