The Sentometrics BV is a data-as-a-service B2B company. All our data products and functionalities are available via a REST API, compliant to the OpenAPI 3.0 specification. The backbone is a serverless computing platform that uses an event-driven model allowing us to scale up on demand. Contact us for more information about plugging in our API into your business analytics pipelines.
As examples, we provide one public API currently servicing this website. Explore our APIs and their documentation:
We welcome the use of our indices by researchers. Integrating Sentometrics' indices in your application has never been so easy. See below two sample scripts to retrieve an index using R and Python.
The list of publicly available indices is stored behind the /index
endpoint. Each thematic index possesses several variations.
R
# Load required libraries library(httr) library(data.table) # Retrieve list of indices from the API list_indices <- httr::GET( "https://api.sentometrics.com/public/timo/index" ) list_indices <- httr::content(list_indices) list_indices <- data.table::rbindlist(list_indices, fill=TRUE) head(list_indices, 3) #> id name friendly_name #> <int> <char> <char> #> 1: 2909 Unemployment_D_BE_NL Unemployment Attention Indicator #> 2: 2907 R_M_BE Recession Attention Indicator #> 3: 2908 Unemployment_D_BE_FR Unemployment Attention Indicator #> friendly_frequency source #> <char> <char> #> 1: Daily Belgium - Dutch #> 2: Monthly Belgium #> 3: Daily Belgium - French
Python
# Load required libraries import requests import pandas as pd # Retrieve list of indices from the API list_indices = requests.get( "https://api.sentometrics.com/public/timo/index" ) list_indices = pd.DataFrame(list_indices.json()) print(list_indices.head()) #> id name friendly_name \ #> 0 9290 Inflation_M_BE_FR Inflation Attention Indicator #> 1 9331 R_D_BE_NL Recession Attention Indicator #> 2 293628 Aging_M_BE_NL Aging Attention Indicator #> 3 303512 Climate_M_BE_FR Climate Attention Indicator #> 4 303513 Climate_M_BE_NL Climate Attention Indicator #> #> friendly_frequency source #> 0 Monthly Belgium - French #> 1 Daily Belgium - Dutch #> 2 Monthly Belgium - Dutch #> 3 Monthly Belgium - French #> 4 Monthly Belgium - Dutch
Indices are characterized by three variables: name (theme), frequency, and source. A combination of those identifies a single index.
R
## Select the economic sentiment index idx <- list_indices[ list_indices$friendly_name == "Economic Sentiment Indicator" & list_indices$friendly_frequency == "Daily" & list_indices$source == "Belgium" ] idx #> id name friendly_name friendly_frequency #> <int> <char> <char> <char> #> 1: 2894 ECOS_D_BE Economic Sentiment Indicator Daily #> source #> <char> #> 1: Belgium
Python
## Select the economic sentiment index idx = list_indices[ (list_indices["friendly_name"] == "Economic Sentiment Indicator") & (list_indices["friendly_frequency"] == "Daily") & (list_indices["source"] == "Belgium") ] print(idx) #> id name friendly_name friendly_frequency source #> 5 9320 ECOS_D_BE Economic Sentiment Indicator Daily Belgium
An index is also identified by a unique id. Use the id in other API endpoints to retrieve the index's details. The /index/{id}/values
endpoint enables retrieving historical data.
R
## Retrieve historical values idx_values <- httr::GET( sprintf( "https://api.sentometrics.com/public/timo/index/%i/values?from_date=%s", idx$id, # index's ID "2000-01-01" # starting date of the series ) ) idx_values <- httr::content(idx_values) idx_values <- data.table::rbindlist(idx_values) idx_values$timestamp <- as.POSIXct(idx_values$timestamp) idx_values #> timestamp value #> <POSc> <num> #> 1: 2000-01-01 0.4092101 #> 2: 2000-01-02 0.3981897 #> 3: 2000-01-03 0.4078824 #> 4: 2000-01-04 0.3746895 #> 5: 2000-01-05 0.3250847 #> --- #> 9254: 2025-05-02 -0.2618843 #> 9255: 2025-05-03 -0.2747073 #> 9256: 2025-05-04 -0.2727378 #> 9257: 2025-05-05 -0.3317673 #> 9258: 2025-05-06 -0.2838641
Python
## Retrieve historical values idx_values = requests.get( "https://api.sentometrics.com/public/timo/index/{id}/values?from_date={from_date}".format( id=idx["id"].item(), # index's ID from_date="2000-01-01" # starting date of the series ) ) idx_values = pd.DataFrame(idx_values.json()) idx_values["timestamp"] = pd.to_datetime(idx_values["timestamp"]) print(idx_values) #> timestamp value #> 0 2000-01-01 00:00:00+00:00 0.409210 #> 1 2000-01-02 00:00:00+00:00 0.398190 #> 2 2000-01-03 00:00:00+00:00 0.407882 #> 3 2000-01-04 00:00:00+00:00 0.374689 #> 4 2000-01-05 00:00:00+00:00 0.325085 #> ... ... ... #> 9253 2025-05-02 00:00:00+00:00 -0.261884 #> 9254 2025-05-03 00:00:00+00:00 -0.274707 #> 9255 2025-05-04 00:00:00+00:00 -0.272738 #> 9256 2025-05-05 00:00:00+00:00 -0.331767 #> 9257 2025-05-06 00:00:00+00:00 -0.283864 #> #> [9258 rows x 2 columns]
Our data is standardized and ready for use. Feel free to use it in your research! Here is a quick example of visualizing the index.
R
# Visualizing the index plot(idx_values[order(timestamp)], type = "l")
Python
# Visualizing the index import matplotlib.pyplot as plt idx_values.set_index("timestamp").plot() #> <AxesSubplot:xlabel='timestamp'> plt.show()