Am I able to access data from the Premium Full-Archive Search API using the Twitter4J Java Library?

twitter4j
java
premium

#1

Hi,
I am currently working on my senior project for school which involves parsing data through the Twitter Search API. For my application, I am using the Twitter4J Java library and while I am having no connectivity issues, I cannot access Tweet metadata outside of a 10-day window. That means as of today (1/12/19) I cannot access data earlier than 1/2/19. When i query for data outside of that timespan with my application, NULL is returned.

Sure enough, my school got access to the Full-Archive Premium API recently and gave me the new authorization keys and tokens. The queried data I do have access to (which is within the last 10 days) is of the Premium standard as it includes geo-coordinates, hashtag-entities and more. I just need access to that same data over greater timespan.

Am I able to access that data using Twitter4J? If so, is it possible that I need to adjust the Base URL within my application’s configuration? The following link gives the generic properties of Twitter4J.


What endpoint should I be accessing for a Organization's/School Version of the Twitter Search API?
#2

Currently, no - Twitter4J can’t use the Premium APIs. Changing base URL alone won’t be enough - i don’t see an issue or PR open for this so might be good to request that: https://github.com/Twitter4J/Twitter4J/issues

The implementation I know works well for Premium APIs are https://github.com/twitterdev/search-tweets-python or maybe https://github.com/twitterdev/search-tweets-ruby


#3

Thanks man. I just wished I found this out earlier but I have no problem switching over to Python if it means that it will surely work with the premium version of the API. WIsh me luck.


closed #4

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