Search API Connector Documentation

Print

Import Quandl Data to Google Sheets

Quandl is a data provider that lets you pull from a wide range of financial, real estate, and other data sets, all from a single API. They provide a mix of premium and free data sets, link directly to the source data sets for validation, and enable access through a simple API key. It’s a very intriguing resource for data hunters.
quandl-img3

In this guide, we’ll walk through a simple but complete example of how to pull data from the Quandl API directly into Google Sheets, using the API Connector add-on for Sheets. We’ll first get an API key from Quandl, and then set up a request to pull in some data to your spreadsheet.

CONTENTS

BEFORE YOU BEGIN

Click here to install the API Connector add-on from the Google Marketplace.

PART 1: GET YOUR QUANDL API KEY

  1. If you haven’t already, sign up for an account at https://www.quandl.com/.
  2. You will immediately be presented with your API key.
    quandl-img1
  3. Alternatively, if you already had an account and are logging back in, you can find your API key by navigating to the Account Settings menu.
    quandl-img2
  4. Either way, you’re all set. You can now access the Quandl API!

PART 2: SEARCH FOR A DATA SET

Quandl provides a huge number of data sets. It’s a bit overwhelming, so let’s start by narrowing it down with a search.

Here I’ll search for “Bitcoin” to see what’s available. For the purposes of this example, I’m filtering for free data sets.
quandl-img4

The cool thing about Quandl is they provide a lot of examples to get you started. Here I’ve clicked into the top result, Bitcoin Watch. Clicking either Usage or Expand will produce some sample API request URLs.
quandl-img5

Clicking Expand brings up a screen containing information about the data, including a link to its source, its last refresh data, and the data table. If you like, you can customize the data table by adjusting parameters above the header row (e.g. the from and to dates).

On the right-hand sidebar you’ll see a section called “API” that contains the request URLs you need to replicate this table in Google Sheets. You can choose any format, but CSV works best in a table, so let’s use that.
quandl-img6

A modal will appear containing the full API request URL, including your API key.
quandl-img7

Copy that to your clipboard. We have our first request URL!

https://www.quandl.com/api/v3/datasets/BITCOINWATCH/MINING.csv?api_key=API_KEY&start_date=2017-08-26

PART 3: PULL QUANDL DATA INTO GOOGLE SHEETS

Now let’s copy and paste that URL into API Connector.

  1. Open up Google Sheets and click Add-ons > API Connector > Open.
  2. In the Create tab, enter the API URL we just retrieved.
    quandl-img8  
  3. We don’t need any headers so just leave that section blank. We don’t need any extra authentication, either, so leave authentication set to None.
  4. Create a new tab and click ‘Set current’ to use that tab as your data destination.
  5. Name your request and click Run. A moment later you’ll see the table we were just looking at replicated in your sheet.
    quandl-img9

PART 4: GET MORE QUANDL DATA

As mentioned above, the Usage tab also contains sample URLs that can be copied and pasted into API Connector:
quandl-img10

Just plug those in and hit Run to see the data in your sheet.

Hopefully this little introduction has given a sense for what’s possible in the Quandl API. Quandl provides many examples for each data set, so you can usually begin by searching for what interests you, pulling out an example API URL, and then modifying it as desired.

Previous Import Quaderno Data to Google Sheets
Next Import QuickBooks Data to Google Sheets

Leave a Comment