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

USAGE

Get time-series data

This call returns data from a specified time-series.

Definition:

GET https://www.quandl.com/api/v3/datasets/{database_code}/{dataset_code}/data.{return_format}

Example Request:

curl "https://www.quandl.com/api/v3/datasets/WIKI/FB/data.json?api_key=YOURAPIKEY"
curl "https://www.quandl.com/api/v3/datasets/WIKI/FB/data.xml?api_key=YOURAPIKEY"
curl "https://www.quandl.com/api/v3/datasets/WIKI/FB/data.csv?api_key=YOURAPIKEY"

Example Response:

{
  "dataset_data":{
     "limit":null,
     "transform":null,
     "column_index":null,
     "column_names":[
        "Date",
        "Open",
        "High",
        "Low"
     ],
     "start_date":"2015-05-24",
     "end_date":"2015-05-28",
     "frequency":"daily",
     "data":[
        [
           "2015-05-28",
           9.58,
           10.17,
           12.96
        ],
        [
           "2015-05-27",
           9.53,
           10.13,
           12.97
        ],
        [
           "2015-05-26",
           9.53,
           10.11,
           12.98
        ]
     ],
     "collapse":null,
     "order":"desc"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<quandl-response>
   <dataset-data>
       <limit nil="true" />
       <transform nil="true" />
       <column-index nil="true" />
       <column-names type="array">
           <column-name>Date</column-name>
           <column-name>Open</column-name>
           <column-name>High</column-name>
           <column-name>Low</column-name>
       </column-names>
       <start-date type="date">2015-05-24</start-date>
       <end-date type="date">2015-05-28</end-date>
       <frequency>daily</frequency>
       <data type="array">
           <datum type="array">
               <datum type="date">2015-05-28</datum>
               <datum type="float">9.58</datum>
               <datum type="float">10.17</datum>
               <datum type="float">12.97</datum>
           </datum>
           <datum type="array">
               <datum type="date">2015-05-27</datum>
               <datum type="float">9.53</datum>
               <datum type="float">10.13</datum>
               <datum type="float">12.97</datum>
           </datum>
           <datum type="array">
               <datum type="date">2015-05-26</datum>
               <datum type="float">9.53</datum>
               <datum type="float">10.11</datum>
               <datum type="float">12.98</datum>
           </datum>
       </data>
       <collapse nil="true" />
       <order>desc</order>
   </dataset-data>
</quandl-response>
Date,Open,High,Low 
2015-05-28,9.58,10.17,12.96
2015-05-27,9.53,10.13,12.97
2015-05-26,9.53,10.11,12.98
...

NOTE: For conciseness, only three data rows appear in the example response.

Get filtered time-series data

You can slice, transform and otherwise customize your time-series dataset prior to download by appending various optional parameters to your query.

Get monthly % changes in Facebook's closing price for the year 2014:

curl "https://www.quandl.com/api/v3/datasets/WIKI/FB.json?column_index=4&start_date=2014-01-01&end_date=2014-12-31&collapse=monthly&transform=rdiff&api_key=YOURAPIKEY"
curl "https://www.quandl.com/api/v3/datasets/WIKI/FB.xml?column_index=4&start_date=2014-01-01&end_date=2014-12-31&collapse=monthly&transform=rdiff&api_key=YOURAPIKEY"
curl "https://www.quandl.com/api/v3/datasets/WIKI/FB.csv?column_index=4&start_date=2014-01-01&end_date=2014-12-31&collapse=monthly&transform=rdiff&api_key=YOURAPIKEY

Get time-series metadata

The following metadata fields are available:

Metadata Field Name Description Example
dataset_code The code for this time-series FB
database_code The code for the database this time-series belongs to EOD
name The name of this time-series Facebook Inc (FB) stock price
description A brief description of this time-series End-of-day stock price for Facebook Inc (FB)
refreshed_at The time at which the data and/or metadata of this time-series was most recently refreshed 2015-07-31 17:46:36 UTC
newest_available_date The most recent date of all available data points in this time-series 2015-07-31
oldest_available_date The earliest date of all available data points in this time-series 2012-04-16
column_names The titles for each column in this time-series [“Date”, “Open”,“High”,“Low”]
frequency The frequency of observations in the time-series daily
type The type of data being returned Time-series
premium Whether this time-series is premium TRUE

This call returns metadata for a specified time-series.

Definition:

GET https://www.quandl.com/api/v3/datasets/{database_code}/{dataset_code}/metadata.{return_format}

Example Request:

curl "https://www.quandl.com/api/v3/datasets/WIKI/FB/metadata.json?api_key=YOURAPIKEY"
curl "https://www.quandl.com/api/v3/datasets/WIKI/FB/metadata.xml?api_key=YOURAPIKEY"
curl "https://www.quandl.com/api/v3/datasets/WIKI/FB/metadata.csv?api_key=YOURAPIKEY"

Example Response:

id,dataset_code,database_code,name,description,refreshed_at, ...
9775409,FB,WIKI,Facebook Inc.(FB) Price,End of day price for Facebook ...
<?xml version="1.0" encoding="UTF-8"?>
<quandl-response>
   <dataset>
       <id type="integer">9775409</id>
       <dataset-code>FB</dataset-code>
       <database-code>WIKI</database-code>
       <name>Facebook Inc. (FB) Price</name>
       <description>End of day price for Facebook Inc.</description>
       <refreshed-at type="dateTime">2015-07-31T17:46:36Z</refreshed-at>
       <newest-available-date type="date">2015-08-01</newest-available-date>
       <oldest-available-date type="date">2015-05-24</oldest-available-date>
       <column-names type="array">
           <column-name>Date</column-name>
           <column-name>Open</column-name>
           <column-name>High</column-name>
           <column-name>Low</column-name>
       </column-names>
       <frequency>daily</frequency>
       <type>Time Series</type>
       <premium type="boolean">false</premium>
       <database-id type="integer">4922</database-id>
   </dataset>
</quandl-response>    
`id,dataset_code,database_code,name,description,refreshed_at, ...
9775409,FB,WIKI,Facebook Inc.(FB) Price,End of day price for Facebook ...`

Get time-series data and metadata

This call returns data and metadata for a given time-series.

Definition:
GET https://www.quandl.com/api/v3/datasets/{database_code}/{dataset_code}.{return_format}

Example Request:

curl "https://www.quandl.com/api/v3/datasets/WIKI/FB.json?api_key=YOURAPIKEY"
curl "https://www.quandl.com/api/v3/datasets/WIKI/FB.xml?api_key=YOURAPIKEY"
This call is not available for CSV.

Example Response:

{
  "dataset":{
     "id":1,
     "dataset_code":"FB",
     "database_code":"WIKI",
     "name":"Facebook Inc. (FB) stock price",
     "description":"End of day open, high, low",
     "refreshed_at":"2015-07-31T17:46:36.000Z",
     "newest_available_date":"2015-08-01",
     "oldest_available_date":"2015-05-24",
     "column_names":[
        "Date",
        "Open",
        "High",
        "Low"
     ],
     "frequency":"daily",
     "type":"Time Series",
     "premium":false,
     "limit":null,
     "transform":null,
     "column_index":null,
     "start_date":"2015-05-24",
     "end_date":"2015-05-28",
     "data":[
        [
           "2015-05-28",
           9.58,
           10.17,
           12.96
        ],
        [
           "2015-05-27",
           9.53,
           10.13,
           12.97
        ],
        [
           "2015-05-26",
           9.526415957480097,
           10.11017545854056,
           12.982029225784581
        ]
     ],
     "collapse":null,
     "order":"desc",
     "database_id":1
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<quandl-response>
   <dataset>
       <id type="integer">1</id>
       <dataset-code>FB</dataset-code>
       <database-code>WIKI</database-code>
       <name>Facebook Inc. (FB)</name>
       <description>End of day open, high, low</description>
       <refreshed-at type="dateTime">2015-07-31T17:46:36Z</refreshed-at>
       <newest-available-date type="date">2015-08-01</newest-available-date>
       <oldest-available-date type="date">2015-05-24</oldest-available-date>
       <column-names type="array">
           <column-name>Date</column-name>
           <column-name>Open</column-name>
           <column-name>High</column-name>
           <column-name>Low</column-name>
       </column-names>
       <frequency>daily</frequency>
       <type>Time Series</type>
       <premium type="boolean">false</premium>
       <limit nil="true" />
       <transform nil="true" />
       <column-index nil="true" />
       <start-date type="date">2015-05-24</start-date>
       <end-date type="date">2015-05-28</end-date>
       <data type="array">
           <datum type="array">
               <datum type="date">2015-05-28</datum>
               <datum type="float">9.58</datum>
               <datum type="float">10.17</datum>
               <datum type="float">12.97</datum>
           </datum>
           <datum type="array">
               <datum type="date">2015-05-27</datum>
               <datum type="float">9.53</datum>
               <datum type="float">10.13</datum>
               <datum type="float">12.97</datum>
           </datum>
           <datum type="array">
               <datum type="date">2015-05-26</datum>
               <datum type="float">9.53</datum>
               <datum type="float">10.11</datum>
               <datum type="float">12.98</datum>
           </datum>
       </data>
       <collapse nil="true" />
       <order>desc</order>
       <database-id type="integer">1</database-id>
   </dataset>
</quandl-response> 
This call is not available for CSV.

NOTE: For conciseness, only 3 data rows are shown in the example response.

Get metadata for a time-series database

You can retrieve metadata for a specified time-series database. This call will return the following metadata fields:

Metadata Fields

Field Name Description Example
id Numerical identifier for the database 4922
name The name of the database WIKI EOD Stock Prices
database_code A short code for the database WIKI
description A description of the database End of day stock prices, dividends, splits …
datasets_count The number of distinct time-series datasets in the database 3179
downloads The number of times a time-series from this database has been downloaded 186,209,776
premium Whether this time-series database is premium false
image A link to the database logo https://quandl-data-upload.s3.amazonaws.com/uploads/source/profile_image/4922/thumb_thumb_quandl-open-data-logo.jpg

Definition:
GET https://www.quandl.com/api/v3/databases/{database_code}.{return_format}

Example Request:

curl "https://www.quandl.com/api/v3/databases/WIKI.json?api_key=YOURAPIKEY"
curl "https://www.quandl.com/api/v3/databases/WIKI.xml?api_key=YOURAPIKEY"
curl "https://www.quandl.com/api/v3/databases/WIKI.csv?api_key=YOURAPIKEY"

Example Response:

{  
  "database":{  
     "id":4922,
     "database_code":"WIKI",
     "name":"Wiki EOD Stock Prices",
     "description":"End of day stock prices, dividends and splits for 30000 US companies curated by the Quandl community and released into the public domain.",
     "datasets_count":3179,
     "downloads":186224033,
     "premium":false,
     "image":"https://quandl-data-upload.s3.amazonaws.com/uploads/source/profile_image/4922/thumb_thumb_quandl-open-data-logo.jpg"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<quandl-response>
   <database>
       <id type="integer">4922</id>
       <name>Wiki EOD Stock Prices</name>
       <database-code>WIKI</database-code>
       <description>End of day stock prices, dividends and splits for 30000 US companies curated by the Quandl community and released into the public domain.</description>
       <datasets_count type="integer">3179</datasets_count>
       <downloads type="integer">186224033</downloads>
       <premium type="boolean">false</premium>
       <image>https://quandl-data-upload.s3.amazonaws.com/uploads/source/profile_image/4922/thumb_thumb_quandl-open-data-logo.jpg</image>
   </database>
</quandl-response>
id,name,database_code,description, ...
4922,WIKI EOD Stock Prices,WIKI,End of day stock prices ...

Get an entire time-series dataset

Our time-series API provides users the functionality to download an entire time-series dataset in a single call.

This method has two restrictions:

  • This method is not available for free datasets, only premium data products.
  • This method is only available for subscribers of the premium data product they wish to download.

Irrespective of whether you call this method through the API, R or Python, the output format is always the same: a single zipped CSV file of the entire database. The first column of this CSV is the time-series code; the remaining columns replicate the columns of individual datasets.

Definition:
GET https://www.quandl.com/api/v3/databases/{database_code}/data?download_type=full

Example Request:
curl "https://www.quandl.com/api/v3/databases/SCF/data?download_type=full&api_key=YOURAPIKEY"

Example Response:

Code,Date,Open,High,Low,Settle,Volume,Prev. Day Open Interest
CME_BO2_ON,2017-03-08,34,34.26,33.67,33.81,29655,94232
CME_BO2_ON,2017-03-07,34.57,34.59,33.67,34,24918,94861
CME_BO2_ON,2017-03-06,34.72,34.87,34.31,34.54,14414,95369
CME_BO2_ON,2017-03-03,34.45,34.71,34.11,34.65,17931,94905
...

In addition to functionality to download the entire dataset, the Time-series API also provides functionality to download a partial file, which includes only the latest available observation for each time-series in the dataset.

This functionality has the same restrictions as outlined above in that it only works for premium data products.

Definition:
GET https://www.quandl.com/api/v3/databases/{database_code}/data?download_type=partial

Example Request:
curl "https://www.quandl.com/api/v3/databases/SCF/data?download_type=partial&api_key=YOURAPIKEY"

Example Response:

Code,Date,Open,High,Low,Settle,Volume,Prev. Day Open Interest
CBOE_VX1_EB,2017-03-07,12.68,12.83,12.3,12.625,109144,220290
CBOE_VX1_FB,2017-03-07,14.45,14.55,14.2,14.475,78084,211657
CBOE_VX1_OB,2017-03-07,12.68,12.83,12.3,12.625,109144,220290
CBOE_VX2_EF,2017-03-07,-69.03,-68.93,-69.28,-69.005,78084,211657
...

USAGE