Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 1.92 KB

File metadata and controls

42 lines (26 loc) · 1.92 KB

Twitter Search Source

The Twitter’s Standard search API (search/tweets) allows simple queries against the indices of recent or popular Tweets. This Source provides continuous searches against a sampling of recent Tweets published in the past 7 days. Part of the 'public' set of APIs.

Returns a collection of relevant Tweets matching a specified query.

Use the spring.cloud.stream.poller properties to control the interval between consecutive search requests. Rate Limit - 180 requests per 30 min. window (e.g. ~6 r/m, ~ 1 req / 10 sec.)

The twitter.search query properties allows querying by keywords and filter the result by time and geolocation.

The twitter.search.count and twitter.search.page control the result pagination in accordance with to the Search API.

Note: Twitter’s search service and, by extension, the Search API is not meant to be an exhaustive source of Tweets. Not all Tweets will be indexed or made available via the search interface.

Examples

java -jar twitter-search-source.jar
    --twitter.connection.consumerKey= ...
    --twitter.connection.consumerSecret= ...
    --twitter.connection.accessToken= ...
    --twitter.connection.accessTokenSecret= ...

    --twitter.search.query=Amsterdam
    --twitter.search.count=30
    --twitter.search.page=3

And here is an example pipeline that uses twitter-search:

twitter-search-stream= twitter-search  --twitter.connection.consumerKey= ... --twitter.connection.consumerSecret= ... --twitter.connection.accessToken= ... --twitter.connection.accessTokenSecret= ... --twitter.search.query=Amsterdam --twitter.search.count=30 --twitter.search.page=3