Quandl API Documentation

Welcome to Quandl. You'll find comprehensive guides and documentation to help you start working with Quandl as quickly as possible, as well as support if you get stuck. Let's get started.

Documentation    

Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

TIME-SERIES

Make a time-series call

This call gets US GDP, which has a Quandl Code of FRED/GDP, from the FRED database: data <- Quandl("FRED/GDP")

Change formats

You can get the same data in a dataframe: data <- Quandl("FRED/GDP", type="raw")

In ts format: data <- Quandl("FRED/GDP", type="ts")

In xts format: data <- Quandl("FRED/GDP", type="xts")

In zoo format: data <- Quandl("FRED/GDP", type="zoo")

Make a filtered time-series call

To set start and end dates: data <- Quandl("FRED/GDP", start_date="2001-12-31", end_date="2005-12-31")

To request specific columns: data <- Quandl(c("FRED/GDP.1", "WIKI/AAPL.4"))

Preprocess the data

To change the sampling frequency: data <- Quandl("FRED/GDP", collapse="annual")

To perform elementary calculations on the data: data <- Quandl("FRED/GDP", transform="rdiff")

Make a multiple time-series call

If you want to get multiple codes at once, delimit the codes with , and put them into an array. This will return a multiple datasets: merged_data <- Quandl(c('EXMPL/DATA1', 'EXMPL/DATA2'))

You can also specify specific columns to retrieve. For example, if you only want column 1 from EXMPL/DATA1 and column 2 from EXMPL/DATA2: merged_data <- Quandl(c('EXMPL/DATA1.1', 'EXMPL/DATA2.2'))

Download an entire time-series database

An entire time-series database's data can be downloaded.

For example, to download the database ZEA: Quandl.database.bulk_download_to_file("ZEA", "./ZEA.zip")

This call will download an entire time-series database as a ZIP file.

NOTE:

For a full list of optional query parameters for downloading a time-series database, click here.

TIME-SERIES