Open navigation

X Public Data (Twitter) report building guide

Use the X Public Data (Twitter) data source to pull data to your destination of choice. Benchmark your own Twitter profile against competitors, access data by keyword, and see how your Tweets perform.


For a full list of metrics and dimensions available in our X Public Data data source connector, take a look at our X Public Data (Twitter) documentation.


Once you've connected to X Public Data (Twitter), you're ready to create your first query in Google Sheets, Looker Studio (formerly Data Studio), or Excel.


Query types for this data source

When connecting to the X Public Data (Twitter) data source, you need to select a query type. The query type defines what sort of metrics and dimensions are available. 

  • Twitter tweets by keyword: Allows you to pull Tweets that contain certain keywords.
  • Twitter user data: Gathers data about specific user names, such as follower count, Tweet count, location of user, and more.
  • Twitter user tweets: Gathers data about specific Tweets users have made, as well as retweet and reply data.

Note that if you need to use multiple query types in your Looker Studio report, you'll need to create separate connectors for each query type you use.


Try these queries

See the following use cases for examples of how to set up queries.


See number of followers

Take a look at the number of followers on a Twitter profile. 


Use the "Twitter user data" query type. 


The "Followers count" metric shows the number of followers for that profile. The "Followers count" is a lifetime metric, so it has no date range options.


For best results in Looker Studio, use the scorecard chart type.

  1. Select the Followers count metric.


See likes and retweets per Tweet

Explore which Tweets have been popular and been liked and shared the most last week. 


Use the "Twitter user tweets" query type. 


The "Likes" metric shows the number of likes. 


For best results in Looker Studio, use the table chart type.

  1. Set the date range to Last week
  2. Select the Likes and Retweets metrics.
  3. Select the Tweet and Link to tweet dimensions to split the query results by Tweet.


See likes and retweets

Check how your likes and retweets have evolved over time. 


Use the "Twitter user tweets" query type.


For best results in Looker Studio, use the time series chart type.

  1. Set the date range to Last 28 days.
  2. Select the Likes and Retweets metrics.
  3. Select the Date dimension to split the query results by date.


See competitor Twitter profile metrics

Take a look at your competitors' Twitter profiles.


Use the "Twitter user data" query type.


The "Followers count" metric shows the number of followers for a Twitter profile.

The "Tweets count" metric shows the number of Tweets by that profile.

The "Following count" metric shows the number of other Twitter users the profile is following.

The "Favourites count" shows the number of Tweets the profile has liked.


These metrics are lifetime metrics, so they don't have date range options.


For best results on Looker Studio, use the table chart type. 

  1. Select the Followers count, Tweets count, Following count, and Favourites count metrics. 
  2. Select the Username dimension to split the query results by Twitter profile.


See Tweets that include specific keywords

Dive into how Twitter talks about various topics by fetching Tweets by keyword used.


Use the "Twitter Tweets by keyword" query type. Select the keywords, and set the query to fetch the most recent Tweets, most popular Tweets, or a mix of these.


For best results in Looker Studio, use the table chart type.

  1. Select the Likes and Retweets metrics.
  2. Select the Tweet and Link to tweet dimensions to split the query results by tweet.


Set up scheduled refreshes for your reports

You can set up scheduled refreshes for your reports created in Google Sheets and Excel. Follow the instructions on how to create and manage scheduled reports in Google Sheets and how to set up scheduled report triggers in Excel.


In Looker Studio, you can have a copy of your report emailed to you and important stakeholders at regular intervals.


More resources

You might also be interested in:

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.