Open navigation

X Public Data (Twitter) connection guide

Follow these steps to connect your X Public Data (Twitter) data to Supermetrics and use your data in any of our data destinations — Google Sheets, Looker Studio, Excel, data warehouses, and Power BI, as well as the Supermetrics API. You can also connect to data sources from the Supermetrics Hub.


You can share your data source connection with your team and use the connection across all data destinations you use with Supermetrics. Learn more about shared connections.


Before you begin

You'll need the following items to successfully log in to and use the Supermetrics connector for X Public Data (Twitter) data source:

  • A Twitter developer account 
  • A live Twitter application (app) tied to your developer account
  • A valid subscription to Twitter's Basic API access (100 USD a month)
    • Twitter's Pro API access will also work and provides additional tweet fetching limits (5K USD a month)
  • Twitter API key and API key secret for that app so you can log in to Supermetrics


Step 1: Create Twitter developer account

If you do not have one already, the first step is to create the developer account that will be linked to your Twitter Basic subscription and your app that will be used by the data source.

  1. Go to Twitter Developer Platform.
  2. Log in with the Twitter profile you want to have your Basic API subscription attached to.
    This should automatically create a developer account for your profile.
  3. If you check your Twitter Developer Portal dashboard now, you should have a project and an app with the Free tier.
Step 2: Get Basic API access to Twitter

Once you have your developer account, now you can start the process of subscribing to Twitter's Basic API access. This level of API access will cost 100 USD a month to maintain and is required to use the X Public Data (Twitter) data source.

  1. Go to https://developer.twitter.com/en/portal/petition/essential/basic-info
  2. Click Subscribe.
  3. Fill in the Describe all of your use cases of Twitter’s data and API box with following:
    The API access will be used to fetch reporting and analytics data for Twitter profiles using Supermetrics in order to automate manual reporting activities. The data will be used for marketing purposes to understand how profile follower base evolves and which tweets are performing the best.
  4. Check the boxes to agree to their terms and conditions. 
  5. Click Submit to continue.
  6. Add your credit card information that will be used for the recurring 100 USD fee. 
  7. Click Save payment method.
  8. Your Twitter Products dashboard will now update to show you have Basic access.
Step 3: Get your API keys
  1. Go back to your Twitter Developer Portal dashboard.
  2. You should see one project and one project app. 
  3. On the project app, click the key icon to open the Keys and tokens panel.
  4. Under the Consume Keys section, click Regenerate.
  5. You'll get a popup with your API key and API key secret. Copy them for later use — these two values are what is needed to log in to the X Public Data (Twitter) data source.

Store the API key and API key secret securely

Treat the API key and API key secret like a username and password. Save them securely, such as in a password vault, in case you need to reconnect later. This information is only shown once — if you lose them, you'll need to regenerate them and log in to the data source again with the new keys.

With your API key and API key secret saved, you're now ready to log in to the data source.


Query types

  • Twitter tweets by keyword: Search Tweets from up to the last 7 days for specific keyword and tags.
  • Twitter user data: Get Twitter profile-level metrics and metadata.
  • Twitter user tweets: Get up to 3200 latest tweets from requested public profiles with basic engagement metrics.


Instructions

Google Sheets

Make sure you've installed the Supermetrics add-on before you connect.

  1. Open a new Google Sheets file.
  2. Navigate to ExtensionsSupermetricsLaunch sidebar to open Supermetrics.
  3. Click Create new query.
  4. Under Data source, select X Public Data (Twitter).
  5. Enter your Twitter app's API key, API key secret, and app name.
  6. Choose to make this connection shared or private.
  7. Click Start.
  8. Navigate to Report configuration and select a query type.

Learn about advanced settings, best practices, and troubleshooting tips for Supermetrics for Google Sheets.

Looker Studio
  1. Open the Supermetrics Looker Studio data source gallery.
  2. Navigate to X Public Data (Twitter) and click Start free trial.
  3. You'll see two buttons that read Authorize. If you're using Supermetrics for the first time, click the left-hand one and log in with the Google Account you use with Supermetrics.
  4. Once that's done, or if you've done it before, click the right-hand Authorize button (under "X Public Data (Twitter) requires authorization to connect to data").
  5. Select a team that has access to the account you want to connect.
  6. Choose to make this connection shared or private.
  7. Enter your Twitter app's API key, API key secret, and app name.
  8. Choose to make this connection shared or private.
  9. Click Start.
  10. Select a query type and click Next.
  11. In the pane's top right, click Connect.
  12. Click Create report.
  13. Click Add to report.

Learn about advanced settings, best practices, and troubleshooting tips for Supermetrics for Looker Studio.

Excel

Make sure you've installed the Supermetrics add-on before you connect.

  1. Open an Excel file.
  2. Click DataShow Supermetrics.
  3. Under Data source, select X Public Data (Twitter).
  4. Enter your Twitter app's API key, API key secret, and app name.
  5. Choose to make this connection shared or private.
  6. Click Start.
  7. Navigate to Report configuration and select a query type.

Learn about advanced settings, best practices, and troubleshooting tips for Supermetrics for Excel.

Data warehouse

Follow these instructions to set up a transfer with Supermetrics for BigQuery (marketplace). See the instructions below for other data warehouse destinations.


Set up transfer for BigQuery (marketplace)

Make sure you've enrolled the data source before you connect.

  1. Log in to the Google Cloud Platform.
  2. Navigate to BigQueryData transfers.
  3. Click + Create transfer.
  4. Select the X Public Data (Twitter) data source.
  5. Fill in the transfer details. See detailed instructions on how to set up a transfer.
  6. Under Third-party connection, click Connect source.
  7. Accept the agreement.
  8. Click Authorize with X Public Data (Twitter).
  9. Enter your Twitter app's API key, API key secret, and app name.
  10. Click Start.
  11. Select the accounts you'd like to include in your reporting and define the transfer settings.
  12. Click Submit.
  13. Click Save.


Set up data warehouse transfer on the Supermetrics Hub

Make sure you've set up a data warehouse destination before you connect.

  1. Log in to the Supermetrics Hub.
  2. In the sidebar, go to StorageTransfers.
  3. Click New transfer. If you haven't created any transfers yet, click Schedule first transfer
  4. Select the X Public Data (Twitter) data source, and click OK.
  5. Fill in the transfer details. See detailed instructions on how to set up a transfer.
  6. In the Connections section, click Add new connection.
  7. Enter your Twitter app's API key, API key secret, and app name.
  8. Click Start.
  9. In the transfer setup view, select the accounts you'd like to include in your reporting.
  10. Click Create transfer.
Power BI
  1. Log in to the Supermetrics Hub.
  2. In the sidebar, go to DestinationsPower BI.
  3. Click Create or edit queries.
  4. Click Select a data source.
  5. Select the X Public Data (Twitter) data source.
  6. Enter your Twitter app's API key, API key secret, and app name.
  7. Click Start.
  8. Fill in the query details.
  9. Click Run query to test your query.
The Supermetrics API
  1. Log in to the Supermetrics Hub.
  2. In the sidebar, click API.
  3. Select for Supermetrics API from the dropdown menu next to the page title.
  4. Click Select data source.
  5. Select the X Public Data (Twitter) data source.
  6. Enter your Twitter app's API key, API key secret, and app name.
  7. Click Start.
  8. Fill in the query details. See detailed instructions on how to set up a Supermetrics API query in Query Manager.
  9. Click Run to test your query.
Supermetrics Hub
  1. Log in to the Supermetrics Hub.
  2. In the sidebar, click Data sources.
  3. Scroll down to the list of data sources you haven't connected to. You see this list below your existing connections, under the title Connect to new data source.
  4. Hover over the X Public Data (Twitter) data source, and click Connect.
  5. Enter your Twitter app's API key, API key secret, and app name.
  6. Click Start.


More resources

Did you find it helpful? Yes No

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