Economic Calendar by Indicator

By indicator

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/calendar/indicator/inflation%20rate?c={api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

import tradingeconomics as te
te.login('your_api_key')
te.getCalendarData(category='inflation rate')

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/calendar/indicator/inflation%20rate?c=${api_key}`)
    console.log(response.data)
})()

Or using our package:

const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getCalendar(indicator = 'inflation rate').then(function(data){
    console.log(data)     
});

Using Requests:

using (var httpClient = new HttpClient())
{
    using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/calendar/indicator/inflation%20rate?c=your_api_key"))
    {
        request.Headers.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1");
        var response = await httpClient.SendAsync(request);
        if (response.IsSuccessStatusCode)
        {
            var content = await response.Content.ReadAsStringAsync(); 
            Console.WriteLine(content);
        }
    }
}

The response data format can be configured by appending the &f= parameter to the URL request.

/calendar/indicator/{indicators}

CalendarIdDateCountryCategoryEventReferenceReferenceDateSourceSourceURLActualPreviousForecastTEForecastURLDateSpanImportanceLastUpdateRevisedCurrencyUnitTickerSymbol
3150251/9/2023 7:00:00 AMLithuaniaInflation RateInflation Rate YoYDec12/31/2022 12:00:00 AMStatistics Lithuaniahttps://osp.stat.gov.lt/21.7%22.9%22.2%/lithuania/inflation-cpi011/9/2023 7:02:44 AM%LITHUANIAIRLithuaniaIR
3148901/9/2023 10:00:00 AMMauritiusInflation RateInflation Rate YoYDec12/31/2022 12:00:00 AM“Central Statistics Office, Mauritius”https://statsmauritius.govmu.org12.2%12.1%12.3%/mauritius/inflation-cpi011/9/2023 9:58:42 AM%MAUTIUSINFNRATEMAUTIUSINFNRATE
3039381/9/2023 10:00:00 AMSao Tome and PrincipeInflation RateInflation Rate YoYNov11/30/2022 12:00:00 AMCentral Bank of Sao Tome and Principehttps://www.bcstp.st24.6%23.5%24.7%/sao-tome-and-principe/inflation-cpi011/9/2023 9:57:47 AM%SAOEINFNRATESAOEINFNRATE

/calendar/indicator/{indicators}?f=json

[{"CalendarId":"319098","Date":"2023-04-03T04:00:00","Country":"Indonesia","Category":"Inflation Rate","Event":"Inflation Rate YoY","Reference":"Mar","ReferenceDate":"2023-03-31T00:00:00","Source":"Statistics Indonesia","SourceURL":"https://www.bps.go.id/","Actual":"4.97%","Previous":"5.47%","Forecast":"5.2%","TEForecast":"5.3%","URL":"/indonesia/inflation-cpi","DateSpan":"0","Importance":2,"LastUpdate":"2023-04-03T04:05:02.773","Revised":"","Currency":"","Unit":"%","Ticker":"IDCPIY","Symbol":"IDCPIY"},{"CalendarId":"319185","Date":"2023-04-03T06:00:00","Country":"Kazakhstan","Category":"Inflation Rate","Event":"Inflation Rate YoY","Reference":"Mar","ReferenceDate":"2023-03-31T00:00:00","Source":"Agency of the Republic of Kazakhstan on Statistics","SourceURL":"https://new.stat.gov.kz/","Actual":"18.1%","Previous":"21.3%","Forecast":"","TEForecast":"19.5%","URL":"/kazakhstan/inflation-cpi","DateSpan":"0","Importance":1,"LastUpdate":"2023-04-03T05:38:42.71","Revised":"","Currency":"","Unit":"%","Ticker":"KAZAKHSTANIR","Symbol":"KazakhstanIR"},{"CalendarId":"319126","Date":"2023-04-03T06:30:00","Country":"Switzerland","Category":"Inflation Rate","Event":"Inflation Rate YoY","Reference":"Mar","ReferenceDate":"2023-03-31T00:00:00","Source":"Swiss Federal Statistical Office","SourceURL":"https://www.bfs.admin.ch","Actual":"2.9%","Previous":"3.4%","Forecast":"3.2%","TEForecast":"3.1%","URL":"/switzerland/inflation-cpi","DateSpan":"0","Importance":2,"LastUpdate":"2023-04-03T06:30:00.653","Revised":"","Currency":"","Unit":"%","Ticker":"SZCPIYOY","Symbol":"SZCPIYOY"}]

/calendar/indicator/{indicators}?f=csv

CalendarId,Date,Country,Category,Event,Reference,ReferenceDate,Source,SourceURL,Actual,Previous,Forecast,TEForecast,URL,DateSpan,Importance,LastUpdate,Revised,Currency,Unit,Ticker,Symbol
319098,4/3/2023 4:00:00 AM,Indonesia,Inflation Rate,Inflation Rate YoY,Mar,3/31/2023 12:00:00 AM,Statistics Indonesia,https://www.bps.go.id/,4.97%,5.47%,5.2%,5.3%,/indonesia/inflation-cpi,0,2,4/3/2023 4:05:02 AM,,,%,IDCPIY,IDCPIY
319185,4/3/2023 6:00:00 AM,Kazakhstan,Inflation Rate,Inflation Rate YoY,Mar,3/31/2023 12:00:00 AM,Agency of the Republic of Kazakhstan on Statistics,https://new.stat.gov.kz/,18.1%,21.3%,,19.5%,/kazakhstan/inflation-cpi,0,1,4/3/2023 5:38:42 AM,,,%,KAZAKHSTANIR,KazakhstanIR
319126,4/3/2023 6:30:00 AM,Switzerland,Inflation Rate,Inflation Rate YoY,Mar,3/31/2023 12:00:00 AM,Swiss Federal Statistical Office,https://www.bfs.admin.ch,2.9%,3.4%,3.2%,3.1%,/switzerland/inflation-cpi,0,2,4/3/2023 6:30:00 AM,,,%,SZCPIYOY,SZCPIYOY

/calendar/indicator/{indicators}?f=xml

<ArrayOfCalendarItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models">
<CalendarItem>
<CalendarId>319098</CalendarId>
<Date>2023-04-03T04:00:00</Date>
<Country>Indonesia</Country>
<Category>Inflation Rate</Category>
<Event>Inflation Rate YoY</Event>
<Reference>Mar</Reference>
<ReferenceDate>2023-03-31T00:00:00</ReferenceDate>
<Source>Statistics Indonesia</Source>
<SourceURL>https://www.bps.go.id/</SourceURL>
<Actual>4.97%</Actual>
<Previous>5.47%</Previous>
<Forecast>5.2%</Forecast>
<TEForecast>5.3%</TEForecast>
<URL>/indonesia/inflation-cpi</URL>
<DateSpan>0</DateSpan>
<Importance>2</Importance>
<LastUpdate>2023-04-03T04:05:02.773</LastUpdate>
<Revised/>
<Currency/>
<Unit>%</Unit>
<Ticker>IDCPIY</Ticker>
<Symbol>IDCPIY</Symbol>
</CalendarItem>
<CalendarItem>
<CalendarId>319185</CalendarId>
<Date>2023-04-03T06:00:00</Date>
<Country>Kazakhstan</Country>
<Category>Inflation Rate</Category>
<Event>Inflation Rate YoY</Event>
<Reference>Mar</Reference>
<ReferenceDate>2023-03-31T00:00:00</ReferenceDate>
<Source>Agency of the Republic of Kazakhstan on Statistics</Source>
<SourceURL>https://new.stat.gov.kz/</SourceURL>
<Actual>18.1%</Actual>
<Previous>21.3%</Previous>
<Forecast/>
<TEForecast>19.5%</TEForecast>
<URL>/kazakhstan/inflation-cpi</URL>
<DateSpan>0</DateSpan>
<Importance>1</Importance>
<LastUpdate>2023-04-03T05:38:42.71</LastUpdate>
<Revised/>
<Currency/>
<Unit>%</Unit>
<Ticker>KAZAKHSTANIR</Ticker>
<Symbol>KazakhstanIR</Symbol>
</CalendarItem>
<CalendarItem>
<CalendarId>319126</CalendarId>
<Date>2023-04-03T06:30:00</Date>
<Country>Switzerland</Country>
<Category>Inflation Rate</Category>
<Event>Inflation Rate YoY</Event>
<Reference>Mar</Reference>
<ReferenceDate>2023-03-31T00:00:00</ReferenceDate>
<Source>Swiss Federal Statistical Office</Source>
<SourceURL>https://www.bfs.admin.ch</SourceURL>
<Actual>2.9%</Actual>
<Previous>3.4%</Previous>
<Forecast>3.2%</Forecast>
<TEForecast>3.1%</TEForecast>
<URL>/switzerland/inflation-cpi</URL>
<DateSpan>0</DateSpan>
<Importance>2</Importance>
<LastUpdate>2023-04-03T06:30:00.653</LastUpdate>
<Revised/>
<Currency/>
<Unit>%</Unit>
<Ticker>SZCPIYOY</Ticker>
<Symbol>SZCPIYOY</Symbol>
</CalendarItem>
</ArrayOfCalendarItem>

By indicator and date

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/calendar/indicator/inflation%20rate/2016-03-01/2016-03-03?c={api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

te.getCalendarData(category='inflation rate', initDate='2016-03-01',
 endDate='2016-03-03')

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/calendar/indicator/inflation%20rate/2016-03-01/2016-03-03?c=${api_key}`)
    console.log(response.data)
})()

Or using our package:

data = te.getCalendar(indicator = 'inflation rate', start_date = '2016-03-01',
 end_date = '2016-03-03').then(function(data){
    console.log(data)     
});

Using Requests:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/calendar/indicator/inflation%20rate/2016-03-01/2016-03-03?c=guest:guest");

/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}

CalendarIdDateCountryCategoryEventReferenceReferenceDateSourceSourceURLActualPreviousForecastTEForecastURLDateSpanImportanceLastUpdateRevisedCurrencyUnitTickerSymbol
722493/1/2016 4:00:00 AMIndonesiaInflation RateInflation Rate YoYFeb2/29/2016 12:00:00 AMStatistics Indonesiahttps://www.bps.go.id/4.42%4.14%4.35%4.2%/indonesia/inflation-cpi023/1/2016 4:08:00 AM%IDCPIYIDCPIY
745263/1/2016 4:00:00 AMThailandInflation RateInflation Rate YoYFeb2/29/2016 12:00:00 AM“Bureau of Trade and Economic Indices, Ministry of Commerce, Thailand”https://www.price.moc.go.th-0.5%-0.53%-0.51%-0.61%/thailand/inflation-cpi013/1/2016 4:04:00 AM%THCPIYOYTHCPIYOY
898873/1/2016 5:00:00 AMPeruInflation RateInflation Rate YoYFeb2/29/2016 12:00:00 AMInstituto Nacional de Estadística e Informática (INEI)https://www.inei.gob.pe/4.47%4.61%4.8%/peru/inflation-cpi013/1/2016 5:01:00 AM%PRCPYOYPRCPYOY

/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?f=json

[{"CalendarId":"72249","Date":"2016-03-01T04:00:00","Country":"Indonesia","Category":"Inflation Rate","Event":"Inflation Rate YoY","Reference":"Feb","ReferenceDate":"2016-02-29T00:00:00","Source":"Statistics Indonesia","SourceURL":"https://www.bps.go.id/","Actual":"4.42%","Previous":"4.14%","Forecast":"4.35%","TEForecast":"4.2%","URL":"/indonesia/inflation-cpi","DateSpan":"0","Importance":2,"LastUpdate":"2016-03-01T04:08:00","Revised":"","Currency":"","Unit":"%","Ticker":"IDCPIY","Symbol":"IDCPIY"},{"CalendarId":"74526","Date":"2016-03-01T04:00:00","Country":"Thailand","Category":"Inflation Rate","Event":"Inflation Rate YoY","Reference":"Feb","ReferenceDate":"2016-02-29T00:00:00","Source":"Bureau of Trade and Economic Indices, Ministry of Commerce, Thailand","SourceURL":"http://www.price.moc.go.th","Actual":"-0.5%","Previous":"-0.53%","Forecast":"-0.51%","TEForecast":"-0.61%","URL":"/thailand/inflation-cpi","DateSpan":"0","Importance":1,"LastUpdate":"2016-03-01T04:04:00","Revised":"","Currency":"","Unit":"%","Ticker":"THCPIYOY","Symbol":"THCPIYOY"},{"CalendarId":"89887","Date":"2016-03-01T05:00:00","Country":"Peru","Category":"Inflation Rate","Event":"Inflation Rate YoY","Reference":"Feb","ReferenceDate":"2016-02-29T00:00:00","Source":"Instituto Nacional de Estadística e Informática (INEI)","SourceURL":"http://www.inei.gob.pe/","Actual":"4.47%","Previous":"4.61%","Forecast":"","TEForecast":"4.8%","URL":"/peru/inflation-cpi","DateSpan":"0","Importance":1,"LastUpdate":"2016-03-01T05:01:00","Revised":"","Currency":"","Unit":"%","Ticker":"PRCPYOY","Symbol":"PRCPYOY"}]

/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?f=csv

CalendarId,Date,Country,Category,Event,Reference,ReferenceDate,Source,SourceURL,Actual,Previous,Forecast,TEForecast,URL,DateSpan,Importance,LastUpdate,Revised,Currency,Unit,Ticker,Symbol
72249,3/1/2016 4:00:00 AM,Indonesia,Inflation Rate,Inflation Rate YoY,Feb,2/29/2016 12:00:00 AM,Statistics Indonesia,https://www.bps.go.id/,4.42%,4.14%,4.35%,4.2%,/indonesia/inflation-cpi,0,2,3/1/2016 4:08:00 AM,,,%,IDCPIY,IDCPIY
74526,3/1/2016 4:00:00 AM,Thailand,Inflation Rate,Inflation Rate YoY,Feb,2/29/2016 12:00:00 AM,"Bureau of Trade and Economic Indices, Ministry of Commerce, Thailand",http://www.price.moc.go.th,-0.5%,-0.53%,-0.51%,-0.61%,/thailand/inflation-cpi,0,1,3/1/2016 4:04:00 AM,,,%,THCPIYOY,THCPIYOY
89887,3/1/2016 5:00:00 AM,Peru,Inflation Rate,Inflation Rate YoY,Feb,2/29/2016 12:00:00 AM,Instituto Nacional de Estadística e Informática (INEI),http://www.inei.gob.pe/,4.47%,4.61%,,4.8%,/peru/inflation-cpi,0,1,3/1/2016 5:01:00 AM,,,%,PRCPYOY,PRCPYOY

/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?f=xml

<ArrayOfCalendarItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models">
<CalendarItem>
<CalendarId>72249</CalendarId>
<Date>2016-03-01T04:00:00</Date>
<Country>Indonesia</Country>
<Category>Inflation Rate</Category>
<Event>Inflation Rate YoY</Event>
<Reference>Feb</Reference>
<ReferenceDate>2016-02-29T00:00:00</ReferenceDate>
<Source>Statistics Indonesia</Source>
<SourceURL>https://www.bps.go.id/</SourceURL>
<Actual>4.42%</Actual>
<Previous>4.14%</Previous>
<Forecast>4.35%</Forecast>
<TEForecast>4.2%</TEForecast>
<URL>/indonesia/inflation-cpi</URL>
<DateSpan>0</DateSpan>
<Importance>2</Importance>
<LastUpdate>2016-03-01T04:08:00</LastUpdate>
<Revised/>
<Currency/>
<Unit>%</Unit>
<Ticker>IDCPIY</Ticker>
<Symbol>IDCPIY</Symbol>
</CalendarItem>
<CalendarItem>
<CalendarId>74526</CalendarId>
<Date>2016-03-01T04:00:00</Date>
<Country>Thailand</Country>
<Category>Inflation Rate</Category>
<Event>Inflation Rate YoY</Event>
<Reference>Feb</Reference>
<ReferenceDate>2016-02-29T00:00:00</ReferenceDate>
<Source>Bureau of Trade and Economic Indices, Ministry of Commerce, Thailand</Source>
<SourceURL>http://www.price.moc.go.th</SourceURL>
<Actual>-0.5%</Actual>
<Previous>-0.53%</Previous>
<Forecast>-0.51%</Forecast>
<TEForecast>-0.61%</TEForecast>
<URL>/thailand/inflation-cpi</URL>
<DateSpan>0</DateSpan>
<Importance>1</Importance>
<LastUpdate>2016-03-01T04:04:00</LastUpdate>
<Revised/>
<Currency/>
<Unit>%</Unit>
<Ticker>THCPIYOY</Ticker>
<Symbol>THCPIYOY</Symbol>
</CalendarItem>
<CalendarItem>
<CalendarId>89887</CalendarId>
<Date>2016-03-01T05:00:00</Date>
<Country>Peru</Country>
<Category>Inflation Rate</Category>
<Event>Inflation Rate YoY</Event>
<Reference>Feb</Reference>
<ReferenceDate>2016-02-29T00:00:00</ReferenceDate>
<Source>Instituto Nacional de Estadística e Informática (INEI)</Source>
<SourceURL>http://www.inei.gob.pe/</SourceURL>
<Actual>4.47%</Actual>
<Previous>4.61%</Previous>
<Forecast/>
<TEForecast>4.8%</TEForecast>
<URL>/peru/inflation-cpi</URL>
<DateSpan>0</DateSpan>
<Importance>1</Importance>
<LastUpdate>2016-03-01T05:01:00</LastUpdate>
<Revised/>
<Currency/>
<Unit>%</Unit>
<Ticker>PRCPYOY</Ticker>
<Symbol>PRCPYOY</Symbol>
</CalendarItem>
</ArrayOfCalendarItem>

By indicator and importance

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/calendar/indicator/inflation%20rate?c={api_key}&importance=2'
data = requests.get(url).json()
print(data)

Or using our package:

te.getCalendarData(category='inflation rate', importance='2')

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/calendar/indicator/inflation%20rate?c=${api_key}&importance=2`)
    console.log(response.data)
})()

Or using our package:

data = te.getCalendar(indicator = 'inflation rate', importance = '2').then(function(data){
    console.log(data)     
});

Using Requests:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/calendar/indicator/inflation%20rate?c=guest:guest&importance=2");

/calendar/indicator/{indicators}?importance={importance}

CalendarIdDateCountryCategoryEventReferenceReferenceDateSourceSourceURLActualPreviousForecastTEForecastURLDateSpanImportanceLastUpdateRevisedCurrencyUnitTickerSymbol
3149531/9/2023 12:00:00 PMMexicoInflation RateInflation Rate YoYDec12/31/2022 12:00:00 AMInstituto Nacional de Estadística y Geografía (INEGI)https://www.inegi.org.mx/7.82%7.8%7.86%7.89%/mexico/inflation-cpi021/9/2023 12:00:04 PM%MXCPYOYMXCPYOY
3151231/10/2023 12:00:00 PMBrazilInflation RateInflation Rate YoYDec12/31/2022 12:00:00 AMInstituto Brasileiro de Geografia e Estatística (IBGE)https://www.ibge.gov.br5.79%5.9%5.6%5.38%/brazil/inflation-cpi021/10/2023 12:00:05 PM%BZPIIPCYBZPIIPCY
3151691/12/2023 12:00:00 PMIndiaInflation RateInflation Rate YoYDec12/31/2022 12:00:00 AMMinistry of Statistics and Programme Implementation (MOSPI)https://www.mospi.gov.in/5.72%5.88%5.9%6%/india/inflation-cpi021/12/2023 12:00:20 PM%INCPIINYINCPIINY

/calendar/indicator/{indicators}?importance={importance}?f=json

[{"CalendarId":"319098","Date":"2023-04-03T04:00:00","Country":"Indonesia","Category":"Inflation Rate","Event":"Inflation Rate YoY","Reference":"Mar","ReferenceDate":"2023-03-31T00:00:00","Source":"Statistics Indonesia","SourceURL":"https://www.bps.go.id/","Actual":"4.97%","Previous":"5.47%","Forecast":"5.2%","TEForecast":"5.3%","URL":"/indonesia/inflation-cpi","DateSpan":"0","Importance":2,"LastUpdate":"2023-04-03T04:05:02.773","Revised":"","Currency":"","Unit":"%","Ticker":"IDCPIY","Symbol":"IDCPIY"},{"CalendarId":"319126","Date":"2023-04-03T06:30:00","Country":"Switzerland","Category":"Inflation Rate","Event":"Inflation Rate YoY","Reference":"Mar","ReferenceDate":"2023-03-31T00:00:00","Source":"Swiss Federal Statistical Office","SourceURL":"https://www.bfs.admin.ch","Actual":"2.9%","Previous":"3.4%","Forecast":"3.2%","TEForecast":"3.1%","URL":"/switzerland/inflation-cpi","DateSpan":"0","Importance":2,"LastUpdate":"2023-04-03T06:30:00.653","Revised":"","Currency":"","Unit":"%","Ticker":"SZCPIYOY","Symbol":"SZCPIYOY"},{"CalendarId":"319346","Date":"2023-04-03T07:00:00","Country":"Turkey","Category":"Inflation Rate","Event":"Inflation Rate YoY","Reference":"Mar","ReferenceDate":"2023-03-31T00:00:00","Source":"Turkish Statistical Institute","SourceURL":"https://www.tuik.gov.tr/","Actual":"50.51%","Previous":"55.18%","Forecast":"51.33%","TEForecast":"51.1%","URL":"/turkey/inflation-cpi","DateSpan":"0","Importance":2,"LastUpdate":"2023-04-03T07:02:30.553","Revised":"","Currency":"","Unit":"%","Ticker":"TUCPIY","Symbol":"TUCPIY"}]

/calendar/indicator/{indicators}?importance={importance}?f=csv

CalendarId,Date,Country,Category,Event,Reference,ReferenceDate,Source,SourceURL,Actual,Previous,Forecast,TEForecast,URL,DateSpan,Importance,LastUpdate,Revised,Currency,Unit,Ticker,Symbol
319098,4/3/2023 4:00:00 AM,Indonesia,Inflation Rate,Inflation Rate YoY,Mar,3/31/2023 12:00:00 AM,Statistics Indonesia,https://www.bps.go.id/,4.97%,5.47%,5.2%,5.3%,/indonesia/inflation-cpi,0,2,4/3/2023 4:05:02 AM,,,%,IDCPIY,IDCPIY
319126,4/3/2023 6:30:00 AM,Switzerland,Inflation Rate,Inflation Rate YoY,Mar,3/31/2023 12:00:00 AM,Swiss Federal Statistical Office,https://www.bfs.admin.ch,2.9%,3.4%,3.2%,3.1%,/switzerland/inflation-cpi,0,2,4/3/2023 6:30:00 AM,,,%,SZCPIYOY,SZCPIYOY
319346,4/3/2023 7:00:00 AM,Turkey,Inflation Rate,Inflation Rate YoY,Mar,3/31/2023 12:00:00 AM,Turkish Statistical Institute,https://www.tuik.gov.tr/,50.51%,55.18%,51.33%,51.1%,/turkey/inflation-cpi,0,2,4/3/2023 7:02:30 AM,,,%,TUCPIY,TUCPIY

/calendar/indicator/{indicators}?importance={importance}?f=xml

<ArrayOfCalendarItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models">
<CalendarItem>
<CalendarId>319098</CalendarId>
<Date>2023-04-03T04:00:00</Date>
<Country>Indonesia</Country>
<Category>Inflation Rate</Category>
<Event>Inflation Rate YoY</Event>
<Reference>Mar</Reference>
<ReferenceDate>2023-03-31T00:00:00</ReferenceDate>
<Source>Statistics Indonesia</Source>
<SourceURL>https://www.bps.go.id/</SourceURL>
<Actual>4.97%</Actual>
<Previous>5.47%</Previous>
<Forecast>5.2%</Forecast>
<TEForecast>5.3%</TEForecast>
<URL>/indonesia/inflation-cpi</URL>
<DateSpan>0</DateSpan>
<Importance>2</Importance>
<LastUpdate>2023-04-03T04:05:02.773</LastUpdate>
<Revised/>
<Currency/>
<Unit>%</Unit>
<Ticker>IDCPIY</Ticker>
<Symbol>IDCPIY</Symbol>
</CalendarItem>
<CalendarItem>
<CalendarId>319126</CalendarId>
<Date>2023-04-03T06:30:00</Date>
<Country>Switzerland</Country>
<Category>Inflation Rate</Category>
<Event>Inflation Rate YoY</Event>
<Reference>Mar</Reference>
<ReferenceDate>2023-03-31T00:00:00</ReferenceDate>
<Source>Swiss Federal Statistical Office</Source>
<SourceURL>https://www.bfs.admin.ch</SourceURL>
<Actual>2.9%</Actual>
<Previous>3.4%</Previous>
<Forecast>3.2%</Forecast>
<TEForecast>3.1%</TEForecast>
<URL>/switzerland/inflation-cpi</URL>
<DateSpan>0</DateSpan>
<Importance>2</Importance>
<LastUpdate>2023-04-03T06:30:00.653</LastUpdate>
<Revised/>
<Currency/>
<Unit>%</Unit>
<Ticker>SZCPIYOY</Ticker>
<Symbol>SZCPIYOY</Symbol>
</CalendarItem>
<CalendarItem>
<CalendarId>319346</CalendarId>
<Date>2023-04-03T07:00:00</Date>
<Country>Turkey</Country>
<Category>Inflation Rate</Category>
<Event>Inflation Rate YoY</Event>
<Reference>Mar</Reference>
<ReferenceDate>2023-03-31T00:00:00</ReferenceDate>
<Source>Turkish Statistical Institute</Source>
<SourceURL>https://www.tuik.gov.tr/</SourceURL>
<Actual>50.51%</Actual>
<Previous>55.18%</Previous>
<Forecast>51.33%</Forecast>
<TEForecast>51.1%</TEForecast>
<URL>/turkey/inflation-cpi</URL>
<DateSpan>0</DateSpan>
<Importance>2</Importance>
<LastUpdate>2023-04-03T07:02:30.553</LastUpdate>
<Revised/>
<Currency/>
<Unit>%</Unit>
<Ticker>TUCPIY</Ticker>
<Symbol>TUCPIY</Symbol>
</CalendarItem>
</ArrayOfCalendarItem>

By indicator, date and importance

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/calendar/indicator/inflation%20rate/2016-03-01/2016-03-03?c={api_key}&importance=2'
data = requests.get(url).json()
print(data)

Or using our package:

te.getCalendarData(category='inflation rate', initDate='2016-03-01',
 endDate='2016-03-03', importance='2')

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/calendar/indicator/inflation%20rate/2016-03-01/2016-03-03?c=${api_key}&importance=2`)
    console.log(response.data)
})()

Or using our package:

data = te.getCalendar(indicator = 'inflation rate', start_date = '2016-03-01',
 end_date = '2016-03-03', importance='2').then(function(data){
    console.log(data)     
});

Using Requests:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/calendar/indicator/inflation%20rate/2016-03-01/2016-03-03?c=guest:guest&importance=2");

/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?importance={importance}

CalendarIdDateCountryCategoryEventReferenceReferenceDateSourceSourceURLActualPreviousForecastTEForecastURLDateSpanImportanceLastUpdateRevisedCurrencyUnitTickerSymbol
722493/1/2016 4:00:00 AMIndonesiaInflation RateInflation Rate YoYFeb2/29/2016 12:00:00 AMStatistics Indonesiahttps://www.bps.go.id/4.42%4.14%4.35%4.2%/indonesia/inflation-cpi023/1/2016 4:08:00 AM%IDCPIYIDCPIY
745913/2/2016 11:00:00 PMSouth KoreaInflation RateInflation Rate YoYFeb2/29/2016 12:00:00 AMStatistics Koreahttps://kostat.go.kr1.3%0.8%1%0.9%/south-korea/inflation-cpi023/2/2016 11:00:00 PM%KOCPIYOYKOCPIYOY
746083/3/2016 8:00:00 AMTurkeyInflation RateInflation Rate YoYFeb2/29/2016 12:00:00 AMTurkish Statistical Institutehttps://www.tuik.gov.tr/8.78%9.58%9.35%9.2%/turkey/inflation-cpi023/3/2016 8:00:00 AM%TUCPIYTUCPIY

/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?importance={importance}?f=json

[{"CalendarId":"72249","Date":"2016-03-01T04:00:00","Country":"Indonesia","Category":"Inflation Rate","Event":"Inflation Rate YoY","Reference":"Feb","ReferenceDate":"2016-02-29T00:00:00","Source":"Statistics Indonesia","SourceURL":"https://www.bps.go.id/","Actual":"4.42%","Previous":"4.14%","Forecast":"4.35%","TEForecast":"4.2%","URL":"/indonesia/inflation-cpi","DateSpan":"0","Importance":2,"LastUpdate":"2016-03-01T04:08:00","Revised":"","Currency":"","Unit":"%","Ticker":"IDCPIY","Symbol":"IDCPIY"},{"CalendarId":"74591","Date":"2016-03-02T23:00:00","Country":"South Korea","Category":"Inflation Rate","Event":"Inflation Rate YoY","Reference":"Feb","ReferenceDate":"2016-02-29T00:00:00","Source":"Statistics Korea","SourceURL":"http://kostat.go.kr","Actual":"1.3%","Previous":"0.8%","Forecast":"1%","TEForecast":"0.9%","URL":"/south-korea/inflation-cpi","DateSpan":"0","Importance":2,"LastUpdate":"2016-03-02T23:00:00","Revised":"","Currency":"","Unit":"%","Ticker":"KOCPIYOY","Symbol":"KOCPIYOY"},{"CalendarId":"74608","Date":"2016-03-03T08:00:00","Country":"Turkey","Category":"Inflation Rate","Event":"Inflation Rate YoY","Reference":"Feb","ReferenceDate":"2016-02-29T00:00:00","Source":"Turkish Statistical Institute","SourceURL":"https://www.tuik.gov.tr/","Actual":"8.78%","Previous":"9.58%","Forecast":"9.35%","TEForecast":"9.2%","URL":"/turkey/inflation-cpi","DateSpan":"0","Importance":2,"LastUpdate":"2016-03-03T08:00:00","Revised":"","Currency":"","Unit":"%","Ticker":"TUCPIY","Symbol":"TUCPIY"}]

/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?importance={importance}?f=csv

CalendarId,Date,Country,Category,Event,Reference,ReferenceDate,Source,SourceURL,Actual,Previous,Forecast,TEForecast,URL,DateSpan,Importance,LastUpdate,Revised,Currency,Unit,Ticker,Symbol
72249,3/1/2016 4:00:00 AM,Indonesia,Inflation Rate,Inflation Rate YoY,Feb,2/29/2016 12:00:00 AM,Statistics Indonesia,https://www.bps.go.id/,4.42%,4.14%,4.35%,4.2%,/indonesia/inflation-cpi,0,2,3/1/2016 4:08:00 AM,,,%,IDCPIY,IDCPIY
74591,3/2/2016 11:00:00 PM,South Korea,Inflation Rate,Inflation Rate YoY,Feb,2/29/2016 12:00:00 AM,Statistics Korea,http://kostat.go.kr,1.3%,0.8%,1%,0.9%,/south-korea/inflation-cpi,0,2,3/2/2016 11:00:00 PM,,,%,KOCPIYOY,KOCPIYOY
74608,3/3/2016 8:00:00 AM,Turkey,Inflation Rate,Inflation Rate YoY,Feb,2/29/2016 12:00:00 AM,Turkish Statistical Institute,https://www.tuik.gov.tr/,8.78%,9.58%,9.35%,9.2%,/turkey/inflation-cpi,0,2,3/3/2016 8:00:00 AM,,,%,TUCPIY,TUCPIY

/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?importance={importance}?f=xml

<ArrayOfCalendarItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models">
<CalendarItem>
<CalendarId>72249</CalendarId>
<Date>2016-03-01T04:00:00</Date>
<Country>Indonesia</Country>
<Category>Inflation Rate</Category>
<Event>Inflation Rate YoY</Event>
<Reference>Feb</Reference>
<ReferenceDate>2016-02-29T00:00:00</ReferenceDate>
<Source>Statistics Indonesia</Source>
<SourceURL>https://www.bps.go.id/</SourceURL>
<Actual>4.42%</Actual>
<Previous>4.14%</Previous>
<Forecast>4.35%</Forecast>
<TEForecast>4.2%</TEForecast>
<URL>/indonesia/inflation-cpi</URL>
<DateSpan>0</DateSpan>
<Importance>2</Importance>
<LastUpdate>2016-03-01T04:08:00</LastUpdate>
<Revised/>
<Currency/>
<Unit>%</Unit>
<Ticker>IDCPIY</Ticker>
<Symbol>IDCPIY</Symbol>
</CalendarItem>
<CalendarItem>
<CalendarId>74591</CalendarId>
<Date>2016-03-02T23:00:00</Date>
<Country>South Korea</Country>
<Category>Inflation Rate</Category>
<Event>Inflation Rate YoY</Event>
<Reference>Feb</Reference>
<ReferenceDate>2016-02-29T00:00:00</ReferenceDate>
<Source>Statistics Korea</Source>
<SourceURL>http://kostat.go.kr</SourceURL>
<Actual>1.3%</Actual>
<Previous>0.8%</Previous>
<Forecast>1%</Forecast>
<TEForecast>0.9%</TEForecast>
<URL>/south-korea/inflation-cpi</URL>
<DateSpan>0</DateSpan>
<Importance>2</Importance>
<LastUpdate>2016-03-02T23:00:00</LastUpdate>
<Revised/>
<Currency/>
<Unit>%</Unit>
<Ticker>KOCPIYOY</Ticker>
<Symbol>KOCPIYOY</Symbol>
</CalendarItem>
<CalendarItem>
<CalendarId>74608</CalendarId>
<Date>2016-03-03T08:00:00</Date>
<Country>Turkey</Country>
<Category>Inflation Rate</Category>
<Event>Inflation Rate YoY</Event>
<Reference>Feb</Reference>
<ReferenceDate>2016-02-29T00:00:00</ReferenceDate>
<Source>Turkish Statistical Institute</Source>
<SourceURL>https://www.tuik.gov.tr/</SourceURL>
<Actual>8.78%</Actual>
<Previous>9.58%</Previous>
<Forecast>9.35%</Forecast>
<TEForecast>9.2%</TEForecast>
<URL>/turkey/inflation-cpi</URL>
<DateSpan>0</DateSpan>
<Importance>2</Importance>
<LastUpdate>2016-03-03T08:00:00</LastUpdate>
<Revised/>
<Currency/>
<Unit>%</Unit>
<Ticker>TUCPIY</Ticker>
<Symbol>TUCPIY</Symbol>
</CalendarItem>
</ArrayOfCalendarItem>

Date format

Calendar methods described above support string dates in different formats

Date FormatExample
yyyy-MM-dd2018-01-01
yyyy-mm-dd HH:mm2016-12-03 23:59:59