Import Reddit Data To Google Sheets

How to Iimport Reddit data to Google Sheets
Reading Time: 5 minutes

Steps to import Reddit data to Google Sheets:
Step 1: Install the Amigo Data add-on
Step 2: Register on RapidAPI and generate a key
Step 3: Choose an endpoint
Step 4: Import the data

Ever wanted to keep track of what goes on in Reddit, the so-called Front Page of the Internet–what is trending, on the site, in a particular subreddit? Or check the activity of specific users?

If yes, then you’re in luck. We can import various kinds of data from Reddit to Google Sheets–without a Reddit account. We’ll learn how in this tutorial.

How to import Reddit data to Google Sheets

Here’s the step-by-step guide on how import Reddit data to Google Sheets.

Step 1: Install the Amigo Data add-on in Google Sheets

We need a tool with which to import Reddit data to Google Sheets. For this, we’ll use Amigo Data, a simple but versatile Google Sheets extension that’s easy to use, rich in features, and gives you the ability to pull data from several different sources.

You can get it from the Google Workspace Marketplace here.

Install Amigo Data addon to import Reddit data to Google Sheets

Alternatively, you can open a Google Sheets document, then go to Extensions→Add-ons→Get add-ons. And search for Amigo Data and install.

Once the installation is complete, we can move on to the next step: getting the API key.

Step 2: Generate a key

Reddit has its own API that allows developers to use it to, well, develop apps. But Reddit’s API documentation is not very concise and the process of generating a token key is quite convoluted–and so not much worth for a simple task. So, for the sake of simplicity and to save time, we’ll use a third-party API–RapidAPI– and key instead of Reddit’s.

Follow the steps below to get an API key from RapidAPI.

  1. Sign up to RapidAPI
  2. Once you’re logged in, go to the Reddit API documentation page in RapidAPI and choose a subscription plan from the Pricing menu. Choose the Basic option. (You can search for Reddit and click the appropriate result.)
Choose the basic subscription plan
  1. The API key will be generated once you’ve chosen a pricing option. Navigate back to Endpoints to see the API key. Note that and keep it confidential.
The RapidAPI key

Step 3:  Choose an endpoint

On the endpoint page, click any of the available endpoints.

The endpoints in RapidAPI

We’ll choose the Top Popular Posts endpoint.

In the Required Parameters field, change the time to week to get the weekly data.

Filling the parameters

Leave the other parameters as they are. And click Test Endpoint.

On the right side of the screen, you’ll see a success message.

Click Code Snippets, and change the programming language from (Node.js) Axios to Shell→cURL.

Fetching the  endpoint URL

Copy the URL excluding the apostrophes. And note also the headers.

The endpoint URL and headers

Step 4: Import Reddit data to Google Sheets

Go back to Google Sheets and launch the Amigo Data extension.

Launching Amigo Data in Google Sheets

Select Custom API from the list of sources

LIst of sources in Amigo Data

Paste the endpoint in the API URI bar

API URL bar in Amigo Data

Then expand the Details tab and enter the following as headers:

Name: RapidAPI-Host, Value: reddit34.p.rapidapi.com

Name: X-RapidAPI-Key, Value: your_key

Replace your_key with your RapidAPI key.

The heaaders

Then click the PREVIEW button. Flatten the data points and then click IMPORT.

The data will be imported from Reddit into Google Sheets very shortly. Below is a snippet of the imported data showing the post title, the poster, the number of upvotes, comments and the upvote ratio.

The data imported from Reddit to Google Sheets

To import other types of data from Reddit to Google Sheets, such as the top posts from a subreddit, import the posts of a specific user by the latest post and so on you can follow the same procedure and change the parameter according to the type of data you want to import.

We can also enter the parameters manually in Amigo Data and get the specific data we want.

For example, to import the new comments posted by the user Poem_for_your_sprog along with all the data related to them such as gildings, upvotes, the subreddits on which they’re posted and the time, we’ll enter the following details:

API URL: https://reddit34.p.rapidapi.com/getCommentsByUsername

Then expand the Details tab and add these as queries:

Name: username, Value: Poem_for_your_sprog

Name: sort, Value: new

Add the same headers. And follow the same steps as the above.

Setting refresh schedule

To get the information updated periodically, click the report, toggle on the Refresh Schedule and select the schedule–hourly, daily, weekly or custom days.

Then click Save & Run

Alerts via email or Slack

You can get the report sent to your email or a Slack channel so that you do not even have to open the spreadsheet to keep track of what’s happening on the Front Page of the Internet.

To set up an alert, click Get Alerts→Add alert data+. Edit the details and click Set Alert.

Conclusion

We can easily import Reddit data to Google Sheets using Amigo Data. Tracking the behaviour and activities of Redditors–and more generally what’s happening around the world–is a fun and easy task. Hope this Google Sheets Reddit integration guide helped you.

See also

Using Amigo Data, you can do several other things such as import Yahoo Finance data to Google Sheets, track cryptocurrencies prices from Google Sheets, and export Facebook Ads and Google Ads data to Google Sheets among other sources.

Some similar articles you may find interesting:

https://blog.tryamigo.com/import-us-patent-data-to-google-sheets/

https://blog.tryamigo.com/import-indian-government-open-data-to-google-sheets/

https://blog.tryamigo.com/import-wikipedia-data-to-google-sheets/