Twitter Search Tool

The Twitter Search tool allows you to search tweets by given search terms, with location as an optional property. The search will only retrieve tweets from the previous seven days.

Gallery tool

This tool is not automatically installed with Alteryx Designer. To use this tool, download it from the Alteryx Analytics Gallery.

Configure the tool

Configuration Tab

Tool requirements

To configure this tool, you must register an application with Twitter. Log in to the Twitter Application Manager, click “Create a new application”, and complete the form. You can use a placeholder website name, and you do not no need a Callback URL. Submit the application form to receive the Consumer Key and Consumer Secret.

Consumer Key: Enter your Twitter Application Consumer Key. This information gets encrypted.

Consumer Secret: Enter your Twitter Application Consumer Secret. This information gets encrypted.

Application Name: Enter the name of the you used when creating your Twitter application.

Record Limit: Set the number of records to request, up to a maximum of 100,000 records. The API returns approximately 500-1000 records per minute so the tool may take a long time to return the data if you set a high record limit. During execution, a counter in the Results window lets you know how many records have been downloaded so far.

Search Tab

  1. Standard Search: The Standard Search option gives you the ability to search for Tweets without requiring any knowledge of the Twitter API syntax. Unless otherwise indicated, do not include any special punctuation, such as commas, quotes, or parentheses, in the Standard Search text boxes.

    If you choose Standard Search, you’ll see eight text boxes in which to enter search criteria. You can enter criteria into one or all text boxes. The tool takes all the criteria you enter and configures it into one combined query.

    • All of these words: Return Tweets containing all of the words (in any order) in the body of the Tweet.

    • This exact phrase: Return Tweets containing this exact phrase in this exact order. This is one of the only text boxes in the Standard Search that allows punctuation (e.g., if the exact phrase you are searching for contains a comma or quote, do include the comma or quote in the search).

    • Any of these words: Return Tweets containing at least one of these words.

    • None of these words: Exclude Tweets containing any of these words.

    • These hashtags: Return Tweets containing at least one of these hashtags.

    • From these accounts: Return Tweets from any of these accounts.

    • To these accounts: Return Tweets sent to any of these accounts.

    • Mentioning these accounts: Return Tweets that mention any of these accounts.

  2. Special terms

    ‘Any’, ‘Hashtags’, ‘From’, ‘To’, and ‘Mentions’ are each treated like “OR” searches (i.e., each word in the text boxes is implicitly separated by the word “OR”).  Do not include the word “OR” in any of the text boxes.

  3. Custom Search: The Custom Search option allows users to do a more advanced search than the Standard Search. However, unlike the Standard Search, using Custom Search requires utilizing the proper Twitter API syntax.

    • Enter custom query: Specify search terms. A maximum of ten search terms (space-delimited) may be specified at a time.

      For more information about the Twitter API, including syntax, building queries and how query operators modify search behavior, see the Developer documentation.

      The following table describes and shows examples of some of the most common search types and what the syntax looks like.

      Search Type

      Description

      Looks Like

      Finds Tweets

      All of these words:

      Tweets containing any of the words in this field.

      watching now

      containing both words in any order

      This exact phrase:

      Tweets containing the exact spelling and sequence in this field.

      “watching now”

      containing the exact phrase: watching now

      Any of these words:

      Tweets containing at least one of these words.

      watching OR now

      containing either watching or now

      None of these words:

      Tweets that don’t contain these words.

      watching –now

      contains "watching" but not "now"

      These hashtags:

      Tweets that contain these hashtags.

      #DataArtisan

      containing the hashtag

      From these accounts:

      Tweets from a specific person.

      from:willywonka

      sent from person: “willywonka”

      To these accounts:

      Tweets sent to a specific account(s).

      to:willywonka

      sent to person: “willywonka”

      Mentioning these accounts:

      Tweets referencing a specific person.

      @alteryx

      containing a reference to @alteryx

Location Tab

  1. Enable geocoded search: Returns tweets by users located within a radius of a given latitude/longitude.

  2. Set query centroid: Specifies the latitude and longitude coordinates for the center of the search radius.

    • Map: The geo-location of the point placed by the user on the map will be used to specify the latitude/longitude coordinates.

    • Address: The geo-location of the address submitted by the user will be used to specify the latitude/longitude coordinates.

  3. Set query radius (mi): Sets the size of the search radius for the geo search. Defaults to five, with a max size of 1000.