Unfortunately we don’t have built in support to automatically figure out a filtered list of promoted tweets that serve during a certain timeframe.
Generally, there are two key points to try to achieve:
- Don’t re-request data which hasn’t changed
- Don’t request data which has no chance of serving
For #1, once three or four days of time has passed, all metrics impression and spend should be effectively frozen and do not need to be refetched. For some types like conversions, you may need to continue to try to fetch it as those can continue to be updated for as long as the ‘conversion window’ is set as.
For #2, it’s common to try to write a simple filter like “is the start and end time of the line item associated with the promoted tweet active or could have been active during the time range” “is it actually paused or deleted and couldn’t have served”, and you can sometimes use the ‘sort_by’ option and ‘updated_at’ field as well to try to see which entities have been changed and make sure to check those first. If you have a certain scale of data it is necessary to have some sort of DB system on your end to work around rate limits, and be constantly syncing data with different priority queues while working around rate limits, but if the # of campaigns and accounts is smaller you will have more leeway and mainly rate limit issues should be solved as long as you are doing filtering as above. If you cannot ‘keep up’ with stats you can post more details about the scale of data being retrieved and we can give more advice about algorithm being used.