API Documentation


Overview


This article describes how to get Thinknum data in a machine-readable format. If you are unfamiliar with Thinknum please refer to our user documentation. All API methods are accessible via simple HTTP calls. All query results are returned as JSON. Simply POST requests to the provided URLs with their respective parameters, and a simple JSON response is returned. The HTTP status code reflects any metadata that you need to know.


Time-series Data


Expressions are central to our API. All of our time-series data is available using expressions. Expressions also enable third-party developers to run analysis on our servers through a simple API.

URL

The base URL is http://www.thinknum.com/api/v1/

Parameters

  • expression is a required parameter that uniquely identifies a data-series on Thinknum.

Example:

http://www.thinknum.com/api/v1/?expression=yield@10yr

Results:

Data is returned as a JSON object with two keys: 'column_names' and 'data' as seen in sample below. The first column is always a date/time and is represented as a UNIX timestamp.

{"column_names": ["date_time", "yield@10yr"], "data": [[[631256400000.0, 7.94], [631342800000.0, 7.99]]]}


List of Tickers


Data_Sets

This section describes how to get a list of data_sets.

URL

The base URL is http://www.thinknum.com/api/v1/meta

Parameters

  • request_key is a required parameter that specified the type of output being requested. To get a list of data_sets, specify the request_key as 'data_set'

Example:

http://www.thinknum.com/api/v1/meta?request_key=data_set

Results:

Data is returned as an array of strings as shown in sample below. Each string specifies the data-set name supported by Thinknum.

["US Macro", "Corporate Filings", "Equities Market Data"]

Subsets

This section describes how to get a list subsets for a given data_set.

URL

The base URL is http://www.thinknum.com/api/v1/meta

Parameters

  • request_key is a required parameter that specifies the type of output being requested. To get a list of subsets, specify the request_key as 'subset'

  • data_set is a required parameter that specified the data_set being queried

Example:

http://www.thinknum.com/api/v1/meta?request_key=subset&data_set=US Macro

Results:

Data is returned as an array of strings as shown in sample below. Each string specifies the subset in the specified data_set.

["ADP National Employment Report", "Advance Monthly Sales for Retail and Food Services"]

Tickers

This section describes how to get a list data-tickers for a given subset.

URL

The base URL is http://www.thinknum.com/api/v1/meta

Parameters

  • request_key is a required parameter that specifies the type of output being requested. To get a list of subsets, specify the request_key as 'ticker'

  • data_set is a required parameter that specifies the data_set being queried

  • subsets is a required parameter that specifies the subset being queried

Example:

http://www.thinknum.com/api/v1/meta?request_key=ticker&subset=Z.1 Flow of Funds Accounts of the United States&data_set=US Macro

Results:

Data is returned as an array of strings as shown in sample below. Each string specifies a data-ticker that is associated with a time-series.

["macro_cpabsnncb", "macro_tnwhcbsnncb", "macro_blneclbsnncb"]


List of Functions


Functions are often the reason developers adopt our platform. Functions enable third-party developers to run analysis on our servers through a simple API. This section specifes how to get the list of functions we currently support. To view descriptions of each function, please refer to Function Descriptions.

URL

The base URL is http://www.thinknum.com/api/v1/meta

Parameters

  • request_key is a required parameter. To get a list of functions, specify the request_key as 'function'

Example:

http://www.thinknum.com/api/v1/meta?request_key=function

Results:

Data is returned as an array of strings as shown in sample below. Each string specifies a function name.

["pre_tax_income", "net_profit_margin", "total_revenue"]


Excel VBA


You can download an Excel spreadsheet that comes with a VBA implementation of calls to our API at thinknum_excel_expressions_api.xlsm. This spreadsheet supports two functions: thinknum_expression_date and thinknum_expression_value. Thinknum_expression_date returns the date of a specified time-series for a specified index. Thinknum_expression_value is a function that returns the value of the time-series for a given date


Summary


If you have any quesitons or suggestions about the API feel free to email us at Thinknum@Thinknum.com