Counts the number of tweets by each user in query



I have a query that searches for multiple users with various keywords in their tweets. I was wondering if there is anyway that I could get an output that counts the number of tweets containing the keyword by each user specified in the query.

  1. if I use counts endpoints it gives me the total number of tweets from all users specified in the query - but I want to know how many tweets are made by each user in the query
  2. if I use data endpoints it gives me the tweets itself with the user but I have a long time period (fromdate and todate), so I will have to go through a large set of unnecessary output.

I am using premium API with full-archive endpoint.

Query search for multiple users with specified keywords in tweets

Hello @psoon6. Thank you for your message. It sounds like you are wanting to get the number of tweets from people who mention various keywords in their tweets.

The best approach would be to break down your queries to only include one user at a time. There isn’t a way to have your payload show just individual users counts. It will only show you the counts from your entire query. Here’s some more information on the Counts Endpoint.



This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.