My search query is only returning 15 tweets at a time when I should be getting 100


Hello all,

I’ve been doing some digging in the forums and I can’t seem to find a thread that is similar to my question. Using the REST API I keep reading that I should be able to get 100 tweets per query. However every time I perform a query I only get 15 tweets per query. I’m using Twitter4J and I am just trying to get as many tweets as possible from a particular user account. Can anyone advise me on why i’m only getting 15 tweets per query?



Can you share a code snippet?



Here is the code snippet. I actually did some reading around after this post and saw that I could set the count for the query and that is why the setCount call is there.

I actually have another question now though that is somewhat related but it’s about Twitter4J and search tweets that are in the archive. It doesn’t seem to be actually searching in the past. The code snippet for that is below as well.



Twitter4J (to my knowledge) only touches the standard search endpoint, which only has a 7 day window of results.

I’m not super proficient with that wrapper so I’m not certain how the count parameter might work there.


Ok thanks. Do you a wrapper that touches the 30-day or historical endpoint?That is in Java preferably.


I’m not currently aware of any Java libraries for the premium search APIs, but I’d love to hear about them if I’m wrong!!


Ok I’m looking but haven’t found any so far. Do you know any Twitter libraries that support premium search endpoints?


There is the Python searchtweets library, and a Ruby one also.


Thanks so much for your help Andy. I have one more question though. For premium API endpoints I keep seeing that I need a bearer token but I can’t create one for my app. Do you have any idea why I can not? I have the sandbox license if that helps narrow it down.