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

TABLES

The examples below all involve the Mergent Global Fundamentals database, specifically the MER/F1 table. This particular table is filterable on multiple columns, including compnumber, mapcode and reportdate. This means that users can narrow down their request to rows with specific values for these (and all available) filters.

NOTE:

The tables API is limited to 10,000 rows per call. However, when using the Python library, appending the argument paginate=True will bypass this limit. As such, we recommend using paginate=True for all calls. Please note that some databases can return more data than Python allows. If this occurs, you will need to further filter your call to download less data, as outlined in the examples below.

Filter rows

It is possible to download only certain desired rows from a table by specifying one or more columns to act as criteria to filter rows. If the value in a given column matches the filter argument, then the row containing that value is returned.

Only columns designated as filterable in the table's documentation page can be used as criteria to filter rows.

Example 1

Download data for Nokia (compnumber=39102)

data = quandl.get_table('MER/F1', compnumber=39102, paginate=True)

Example 2

Download data for Nokia (compnumber=39102) and Deutsche Bank AG (compnumber=2438)

data = quandl.get_table('MER/F1', compnumber=[39102 , 2438], paginate=True)

Filter columns

It is possible to select specific table columns to download by identifying them with the qopts.columns parameter.

Example 1

Download the compnumber column

data = quandl.get_table('MER/F1',qopts={columns:compnumber}, paginate=True)

Example 2

Download the compnumber and ticker columns

data = quandl.get_table('MER/F1',qopts={columns:[compnumber, ticker]}, paginate=True)

Filter rows and columns

Example 1

Download the reportdate column for Nokia (compnumber=39102)

data = quandl.get_table('MER/F1',compnumber=39102, qopts={columns:reportdate}, paginate=True)

Example 2

Download the reportdate, indicator, and amount columns for Nokia (compnumber=39102)

data = quandl.get_table('MER/F1',compnumber=39102, qopts={columns:[compnumber, ticker]}, paginate=True)

Example 3

Download the closing prices for Apple (AAPL) and Microsoft (MSFT) between 2016-01-01 and 2016-12-31.

data = quandl.get_table('WIKI/PRICES', qopts = { 'columns': ['ticker', 'date', 'close'] }, ticker = ['AAPL', 'MSFT'], date = { 'gte': '2016-01-01', 'lte': '2016-12-31' })

Download an entire table

To retrieve table data:

data = quandl.get_table('MER/F1', paginate=True)

This is the syntax for calling an entire table. While most tables can be downloaded with such a call, MER/F1's size requires that you narrow down your request with filters, as shown above.

TABLES