API for Statistics Database

Codes, manuals and documentation for accessing time series data from the Central Bank's Statistics Database, using Python, R and C#, as well as APIs documentation, along with the terms of use and necessary forms to use this services can be downloaded here.

For all purposes of terms of use, API and Web services should be understood as equivalents.

All requests for use of the service must be sent to Contacto Central


Terms of service

All requests for use of the service must be sent to Contacto Central

The Central Bank of Chile provides two types of web services; the first one allows the retrieval of time series data and the second contains a catalogue of available time series.

List of series available


Available methods are:

    GetSeries: It allows data series retrieving.

    • URL: https://si3.bcentral.cl/SieteRestWS/SieteRestWS.ashx?user=123456789&pass=tuPassword&firstdate=YYYY-MM-DD&lastdate=YYYY-MM-DD&timeseries=codigodeserie&function=GetSeries

    • Where:

      • user (mandatory): fill in your username.
      • pass (mandatory): fill in your password.
      • firstdate (optional): start date for data retrieve. If not set, data will be collected since first available observation.
      • lastdate (optional): end date for data retrieve. If not set, data will be collected until last available observation.
      • timeseries (mandatory): time series id being retrieved.
      • function (optional): fill in GetSeries value. If not set GetSeries used as default.

    SearchSeries: It provides a list of available timeseries per frequency and its metadata.

    • URL: https://si3.bcentral.cl/SieteRestWS/SieteRestWS.ashx?user=123456789&pass=tuPassword&frequency=frecuenciaelegida&function=SearchSeries

    • Where:

      • user (mandatory): fill in your username.
      • pass (mandatory): fill in your password.
      • frequency (mandatory): fill in the frequency for which you want to access the catalog of available series, such as DAILY, MONTHLY, QUARTERLY or ANNUAL.
      • function (mandatory): fill in SearchSeries value.

Companies, institutions, organizations or natural persons who wish to use this service must complete the following form and send it to Contacto Central.

The requested documentation must be sent in PDF or MS Word format.

Registration form and terms of use

Natural persons must provide identification (ID or passport).

Key request letter and declaration (Certificate 1) Chilean companies

Certificate of incumbency (Certificate 2) Foreign companies

API RESTful - Python

GetSeries

To retrieve time series data using Python, use the following code. Example is for Monetary policy rate:

import requests import pandas as pd url = "https://si3.bcentral.cl/SieteRestWS/SieteRestWS.ashx?user=123456789&pass=tuPassword&firstdate=2021-01-01&lastdate=2021-01-31&timeseries=F022.TPM.TIN.D001.NO.Z.D&function=GetSeries" response = requests.get(url) response = response.json() response = response["Series"]["Obs"] df_data = pd.DataFrame(response) df_data.head()

df_data object is a dataframe that contains the requested data, columns indexDateString (date), statusCode and value (output):


indexDateString statusCode value
0 04-01-2021 OK 0.5
1 05-01-2021 OK 0.5
2 06-01-2021 OK 0.5
3 07-01-2021 OK 0.5
4 08-01-2021 OK 0.5

Use the following example code to retrieve availabe monthly time series using SearchSeries:

import requests import pandas as pd url = "https://si3.bcentral.cl/SieteRestWS/SieteRestWS.ashx?user=123456789&pass=tuPassword&frequency=MONTHLY&function=SearchSeries" response = requests.get(url) response = response.json() response = response["SeriesInfos"] df_data = pd.DataFrame(response) df_data.head()

df_data object is a dataframe that contain the requested data and the correspondent columns:

createdAt englishTitle firstObservation frequencyCode lastObservation seriesId spanishTitle updatedAt
0 08-07-2021 CPI Volatile Food, year to year percent changes 01-04-1990 MONTHLY 01-06-2021 G073.IPCAV.V12.2018.M IPC Alimentos volátiles, variación mismo perio... 08-07-2021
1 08-07-2021 CPI Volatile Food, monthly change 01-05-1989 MONTHLY 01-06-2021 G073.IPCAV.VAR.2018.M IPC Alimentos volátiles, variación mensual 08-07-2021
2 08-07-2021 CPI Goods without volatiles, year to year perc... 01-04-1990 MONTHLY 01-06-2021 G073.IPCBSV.V12.2018.M IPC Bienes sin volátiles, variación mismo peri... 08-07-2021
3 08-07-2021 CPI Goods without volatiles, monthly change 01-05-1989 MONTHLY 01-06-2021 G073.IPCBSV.VAR.2018.M IPC Bienes sin volátiles, variación mensual 08-07-2021
4 08-07-2021 CPI Volatile Energy, year to year percent changes 01-04-1990 MONTHLY 01-06-2021 G073.IPCEN.V12.2018.M IPC Energía volátiles, variación mismo periodo... 08-07-2021


API RESTful - R

Método GetSeries

To retrieve time series data using R, use the following code. Example is for Monetary policy rate:

library("rjson") url="https://si3.bcentral.cl/SieteRestWS/SieteRestWS.ashx?user=123456789&pass=tuPassword&firstdate=2015-01-01&lastdate=2021-01-31&timeseries=F022.TPM.TIN.D001.NO.Z.D&function=GetSeries" json_data <- rjson::fromJSON(file=url) df_data <- as.data.frame(do.call(rbind, lapply(json_data$Series$Obs, as.vector))) head(df_data)

df_data object is a dataframe that contains the requested data, columns indexDateString (date), value (output) and statusCode:


indexDateString value statusCode 1 02-01-2015 3 OK 2 03-01-2015 NeuN ND 3 04-01-2015 NeuN ND 4 05-01-2015 3 OK 5 06-01-2015 3 OK 6 07-01-2015 3 OK

Use the following example code to retrieve available monthly time series using SearchSeries:

library("rjson") url="https://si3.bcentral.cl/SieteRestWS/SieteRestWS.ashx?user=123456789&pass=tuPassword&frequency=MONTHLY&function=SearchSeries" json_data <- rjson::fromJSON(file=url) df_data <- as.data.frame(do.call(rbind, lapply(json_data$SeriesInfos, as.vector))) head(df_data)

df_data object is a dataframe that contains the requested data and the correspondent columns:

    
 
    seriesId			 frequencyCode
 1  G073.IPCAV.V12.2018.M       MONTHLY
 2  G073.IPCAV.VAR.2018.M       MONTHLY
 3  G073.IPCBSV.V12.2018.M      MONTHLY
 4  G073.IPCBSV.VAR.2018.M      MONTHLY
 5  G073.IPCEN.V12.2018.M       MONTHLY
 6  G073.IPCEN.VAR.2018.M       MONTHLY
    spanishTitle
 1  IPC Alimentos volátiles, variación mismo periodo año anterior
 2  IPC Alimentos volátiles, variación mensual
 3  IPC Bienes sin volátiles, variación mismo periodo año anterior
 4  IPC Bienes sin volátiles, variación mensual
 5  IPC Energía volátiles, variación mismo periodo año anterior
 6  IPC Energía volátiles, variación mensual
    englishTitle 							firstObservation
 1  CPI Volatile Food, year to year percent changes			01-04-1990
 2  CPI Volatile Food, monthly change					01-05-1989
 3  CPI Goods without volatiles, year to year percent changes		01-04-1990
 4  CPI Goods without volatiles, monthly change				01-05-1989
 5  CPI Volatile Energy, year to year percent changes			01-04-1990
 6  CPI Volatile Energy, monthly change					01-05-1989
		lastObservation  updatedAt  	createdAt
 1      01-06-2021 		08-07-2021 		08-07-2021
 2      01-06-2021 		08-07-2021 		08-07-2021
 3      01-06-2021 		08-07-2021 		08-07-2021
 4      01-06-2021 		08-07-2021 		08-07-2021
 5      01-06-2021 		08-07-2021 		08-07-2021
 6      01-06-2021 		08-07-2021 		08-07-2021


WS

API SOAP