COMPOSITION OF A CALL

To explain the composition of a call, we will use the tables dataset Mergent Global Fundamentals Data as an example. See product page at https://data.nasdaq.com/databases/MF1. On the product page, you will see that this product is made up of just one data table called Mergent Global Fundamentals Data with product code MER/F1. This is the code we will use in API calls - for example:

curl "https://data.nasdaq.com/api/v3/datatables/MER/F1.xml?&mapcode=-5370&compnumber=39102&reporttype=A&qopts.columns=reportdate,amount&api_key=<YOURAPIKEY>"

📘

NOTE:

Only columns designated as “filterable” in the table's documentation page can be used as criteria to filter rows. For a list of the filterable columns for the MF1 table, click here.

We can break down this request as follows:

URL COMPONENTEXPLANATION
https://data.nasdaq.com/api/v3/datatables/MER/F1.xmlThis portion of the call queries the MER/F1 table and returns the data in XML format.
mapcode=-5370This filter removes everything except for where the mapcode = -5370 (this is the identifier used by Mergent for revenue per share)
compnumber=39102This filter removes everything except for the rows where compnumber=39102 (39102 = Nokia).
reporttype=AThis filter removes everything except for the rows showing records for the "annual" report type (A = annual).
qopts.columns=reportdate,amountThis argument filters the data based on the “report date” and "amount" columns.
api_key=<YOURAPIKEY>This part of the call authenticates you as a Nasdaq Data Link user. Replace the placeholder text <YOURAPIKEY> with your personal API Key.

In this example, we passed three row-filtering options (mapcode, compnumber and reporttype) and requested two columns (reportdate and amount) from the API.

The following is the output for our example call:

<quandl-response>
<datatable>
<data type="array">
<datum type="array">
<datum type="date">2005-12-31</datum>
<datum type="float">7.832008</datum>
</datum>
<datum type="array">
<datum type="date">2006-12-31</datum>
<datum type="float">10.121263</datum>
</datum>
<datum type="array">
<datum type="date">2007-12-31</datum>
<datum type="float">13.140962</datum>
</datum>
<datum type="array">
<datum type="date">2008-12-31</datum>
<datum type="float">13.508695</datum>
</datum>
<datum type="array">
<datum type="date">2009-12-31</datum>
<datum type="float">11.061462</datum>
</datum>
<datum type="array">
<datum type="date">2010-12-31</datum>
<datum type="float">11.444623</datum>
</datum>
<datum type="array">
<datum type="date">2011-12-31</datum>
<datum type="float">10.420364</datum>
</datum>
<datum type="array">
<datum type="date">2012-12-31</datum>
<datum type="float">8.109622</datum>
</datum>
<datum type="array">
<datum type="date">2013-12-31</datum>
<datum type="float">3.423688</datum>
</datum>
<datum type="array">
<datum type="date">2014-12-31</datum>
<datum type="float">3.442269</datum>
</datum>
<datum type="array">
<datum type="date">2015-12-31</datum>
<datum type="float">3.404856</datum>
</datum>
</data>
<columns type="array">
<column>
<name>reportdate</name>
<type>Date</type>
</column>
<column>
<name>amount</name>
<type>BigDecimal(36,14)</type>
</column>
</columns>
</datatable>
<meta>
<next-cursor-id nil="true"/>
</meta>
</quandl-response>