COMPOSITION OF A CALL

The following call retrieves the first year of monthly settle prices for FRED GDP time-series data (FRED/GDP), which you can find on Quandl here, in CSV format:

curl "https://www.quandl.com/api/v3/datasets/FRED/GDP.csv?collapse=annual&rows=6&order=asc&column_index=1&api_key=YOURAPIKEY"

We can break down this request as follows:

URL COMPONENTEXPLANATION
https://www.quandl.com/api/v3/datasets/FRED/GDP.csvThis portion of the call queries the FRED/GDP time-series and returns the data in CSV format.
collapse=annualConverts the series to annual.
rows=6This truncates the results to include only the first six rows of data.
order=ascThis arranges the dates in ascending order.
column_index=1This parameter allows users to define just a single column to return, in this case column 1 (Value).
api_key=YOURAPIKEYThis part of the call authenticates you as a Quandl user. Replace the placeholder text <YOURAPIKEY> with your personal API Key.

The following is the output for our example call:

DATE,VALUE
1947-12-31,260.3
1948-12-31,280.7
1949-12-31,271
1950-12-31,320.3
1951-12-31,356.6
1952-12-31,381.2

For a complete list of time-series parameters, click here.