Friday, March 13, 2020

Searching Twitter tweets by location

Bot Libre allows to you connect your bot with a Twitter account. This allows you to automate interactions with your community, or automate the posting of information. For a tutorial on creating a Twitter bot see:

Always ensure you comply with Twitter's terms of service and automation rules,

Bot Libre's Twitter integration includes support for auto replies to mentions or direct messages to your bot, auto retweeting, Tweet search, auto replies, and auto posts.  The Tweet search feature allows your bot to search for tweets on Twitter to process with its rules.

In your bot's Admin Console on its Twitter page you can configure your Twitter bot's rules. One option is the "Tweet Search", this allows you to enter multiple Twitter search queries (each on a new line).  A Twitter search can contain a list of keywords, but can also include many other commands, for a full list see,

One option is geo location. This lets you search tweets by location.

For example to queries all tweets on the #chatbots hashtag in the USA you can use:

#chatbots geocode:39.8,-95.583068847656,2500km

To use geocode you need to know the coordinate of the city or location you are interested in. Here is a good website to get the coordinates for a place:

For more geo location examples see: