# Economic Calendar by Indicator

> The following API endpoints allow you to obtain economic calendar events filtered by indicator.

Source: https://docs.tradingeconomics.com/economic_calendar/indicator/

This endpoint enables the retrieval of a filtered snapshot by indicators from the economic calendar.

## List indicators

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/indicators?c={your_api_key}&calendar=1'
data = requests.get(url).json()
print(data)
```
*Or using our package:*
```python
import tradingeconomics as te
te.login('your_api_key')
te.getIndicatorData(calendar = 1)
```

**JS**
*Using Requests:*
```js
const axios = require('axios');
(async () => {
    const your_api_key = 'your_api_key'
    const response = await axios.get(`https://api.tradingeconomics.com/indicators?c=${your_api_key}&calendar=1`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getIndicatorData(calendar = 1).then(function(data){
  console.log(data)  
});
```

**C#**
*Using Requests:*
```c#
using (var httpClient = new HttpClient())
{
    using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/indicators?c=your_api_key&calendar=1"))
    {
        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.

**JSON**
```text
https://api.tradingeconomics.com/indicators?c={your_api_key}&calendar=1&f=json
```
```json
[
  {
    "Category": "1 Month Bill Yield",
    "CategoryGroup": "Bonds"
  },
  {
    "Category": "10 Year TIPS Yield",
    "CategoryGroup": "Bonds"
  },
  {
    "Category": "12 Month Bill Yield",
    "CategoryGroup": "Bonds"
  }
]
```

**CSV**
```text
https://api.tradingeconomics.com/indicators?c={your_api_key}&calendar=1&f=csv
```
```bash
Category,CategoryGroup
1 Month Bill Yield,Bonds
10 Year TIPS Yield,Bonds
12 Month Bill Yield,Bonds
```

**HTML**
```text
https://api.tradingeconomics.com/indicators?c={your_api_key}&calendar=1
```

| Category | CategoryGroup |
|-------|-------|
| 1 Month Bill Yield | Bonds |
| 10 Year TIPS Yield | Bonds |
| 12 Month Bill Yield | Bonds |

## List indicators by country

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/indicators?calendar=1&country=united%20states&c={your_api_key}'
data = requests.get(url).json()
print(data)
```
*Or using our package:*
```python
import tradingeconomics as te
te.login('your_api_key')
te.getIndicatorData(calendar = 1, country = 'united states')
```

**JS**
*Using Requests:*
```js
const axios = require('axios');
(async () => {
    const your_api_key = 'your_api_key'
    const response = await axios.get(`https://api.tradingeconomics.com/indicators?calendar=1&country=united%20states&c=${your_api_key}`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getIndicatorData(calendar = 1, country = 'united states').then(function(data){
  console.log(data)  
});
```

**C#**
*Using Requests:*
```c#
using (var httpClient = new HttpClient())
{
    using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/indicators?calendar=1&country=united%20states&c=your_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.

**JSON**
```text
https://api.tradingeconomics.com/indicators?c={your_api_key}&calendar=1&country={country}&f=json
```
```json
[
  {
    "Category": "1 Month Bill Yield",
    "CategoryGroup": "Bonds"
  },
  {
    "Category": "10 Year TIPS Yield",
    "CategoryGroup": "Bonds"
  },
  {
    "Category": "12 Month Bill Yield",
    "CategoryGroup": "Bonds"
  }
]
```

**CSV**
```text
https://api.tradingeconomics.com/indicators?c={your_api_key}&calendar=1&country={country}&f=csv
```
```bash
Category,CategoryGroup
1 Month Bill Yield,Bonds
10 Year TIPS Yield,Bonds
12 Month Bill Yield,Bonds
```

**HTML**
```text
https://api.tradingeconomics.com/indicators?c={your_api_key}&calendar=1&country={country}
```

| Category | CategoryGroup |
|-------|-------|
| 1 Month Bill Yield | Bonds |
| 10 Year TIPS Yield | Bonds |
| 12 Month Bill Yield | Bonds |

## By indicator

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/calendar/indicator/inflation%20rate?c={your_api_key}'
data = requests.get(url).json()
print(data)
```
*Or using our package:*
```python
import tradingeconomics as te
te.login('your_api_key')
te.getCalendarData(category='inflation rate')
```

**JS**
*Using Requests:*
```js
const axios = require('axios');
(async () => {
    const your_api_key = 'your_api_key'
    const response = await axios.get(`https://api.tradingeconomics.com/calendar/indicator/inflation%20rate?c=${your_api_key}`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getCalendar(indicator = 'inflation rate').then(function(data){
    console.log(data)     
});
```

**C#**
*Using Requests:*
```c#
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.

**JSON**
```text
https://api.tradingeconomics.com/calendar/indicator/{indicators}?c={your_api_key}&f=json
```
```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"
  }
]
```

**CSV**
```text
https://api.tradingeconomics.com/calendar/indicator/{indicators}?c={your_api_key}&f=csv
```
```bash
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
```

**HTML**
```text
https://api.tradingeconomics.com/calendar/indicator/{indicators}?c={your_api_key}
```

| CalendarId | Date | Country | Category | Event | Reference | ReferenceDate | Source | SourceURL | Actual | Previous | Forecast | TEForecast | URL | DateSpan | Importance | LastUpdate | Revised | Currency | Unit | Ticker | Symbol |
|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
| 315025 | 1/9/2023 7:00:00 AM | Lithuania | Inflation Rate | Inflation Rate YoY | Dec | 12/31/2022 12:00:00 AM | Statistics Lithuania | https://osp.stat.gov.lt/ | 21.7% | 22.9% | | 22.2% | /lithuania/inflation-cpi | 0 | 1 | 1/9/2023 7:02:44 AM | | | % | LITHUANIAIR | LithuaniaIR |
| 314890 | 1/9/2023 10:00:00 AM | Mauritius | Inflation Rate | Inflation Rate YoY | Dec | 12/31/2022 12:00:00 AM | "Central Statistics Office, Mauritius" | https://statsmauritius.govmu.org | 12.2% | 12.1% | | 12.3% | /mauritius/inflation-cpi | 0 | 1 | 1/9/2023 9:58:42 AM | | | % | MAUTIUSINFNRATE | MAUTIUSINFNRATE |
| 303938 | 1/9/2023 10:00:00 AM | Sao Tome and Principe | Inflation Rate | Inflation Rate YoY | Nov | 11/30/2022 12:00:00 AM | Central Bank of Sao Tome and Principe | https://www.bcstp.st | 24.6% | 23.5% | | 24.7%| /sao-tome-and-principe/inflation-cpi | 0 | 1 | 1/9/2023 9:57:47 AM	| | | % | SAOEINFNRATE | SAOEINFNRATE |

## By indicator and date

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/calendar/indicator/inflation%20rate/2016-03-01/2016-03-03?c={your_api_key}'
data = requests.get(url).json()
print(data)
```
*Or using our package:*
```python
te.getCalendarData(category='inflation rate', initDate='2016-03-01',
 endDate='2016-03-03')
```

**JS**
*Using Requests:*
```js
const axios = require('axios');
(async () => {
    const your_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=${your_api_key}`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
data = te.getCalendar(indicator = 'inflation rate', start_date = '2016-03-01',
 end_date = '2016-03-03').then(function(data){
    console.log(data)     
});
```

**C#**
*Using Requests:*
```c#
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/calendar/indicator/inflation%20rate/2016-03-01/2016-03-03?c=your_api_key");
```

**JSON**
```text
https://api.tradingeconomics.com/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?c={your_api_key}&f=json
```
```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"
  }
]
```

**CSV**
```text
https://api.tradingeconomics.com/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?c={your_api_key}&f=csv
```
```bash
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
```

**HTML**
```text
https://api.tradingeconomics.com/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?c={your_api_key}
```

| 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" | https://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) | https://www.inei.gob.pe/ | 4.47% | 4.61% | | 4.8% | /peru/inflation-cpi | 0 | 1 | 3/1/2016 5:01:00 AM | | | % | PRCPYOY | PRCPYOY |

## By indicator and importance

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/calendar/indicator/inflation%20rate?c={your_api_key}&importance=2'
data = requests.get(url).json()
print(data)
```
*Or using our package:*
```python
te.getCalendarData(category='inflation rate', importance='2')
```

**JS**
*Using Requests:*
```js
const axios = require('axios');
(async () => {
    const your_api_key = 'your_api_key'
    const response = await axios.get(`https://api.tradingeconomics.com/calendar/indicator/inflation%20rate?c=${your_api_key}&importance=2`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
data = te.getCalendar(indicator = 'inflation rate', importance = '2').then(function(data){
    console.log(data)     
});
```

**C#**
*Using Requests:*
```c#
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/calendar/indicator/inflation%20rate?c=your_api_key&importance=2");
```

**JSON**
```text
https://api.tradingeconomics.com/calendar/indicator/{indicators}?c={your_api_key}&importance={importance}&f=json
```
```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"
  }
]
```

**CSV**
```text
https://api.tradingeconomics.com/calendar/indicator/{indicators}?c={your_api_key}&importance={importance}&f=csv
```
```bash
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
```

**HTML**
```text
https://api.tradingeconomics.com/calendar/indicator/{indicators}?c={your_api_key}&importance={importance}
```

| CalendarId | Date | Country | Category | Event | Reference | ReferenceDate | Source | SourceURL | Actual | Previous | Forecast | TEForecast | URL | DateSpan | Importance | LastUpdate | Revised | Currency | Unit | Ticker | Symbol |
|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
| 314953 | 1/9/2023 12:00:00 PM | Mexico | Inflation Rate | Inflation Rate YoY | Dec | 12/31/2022 12:00:00 AM | Instituto Nacional de Estadística y Geografía (INEGI) | https://www.inegi.org.mx/ | 7.82% | 7.8% | 7.86% | 7.89% | /mexico/inflation-cpi | 0 | 2 | 1/9/2023 12:00:04 PM | | | % | MXCPYOY | MXCPYOY |
| 315123 | 1/10/2023 12:00:00 PM | Brazil | Inflation Rate | Inflation Rate YoY | Dec | 12/31/2022 12:00:00 AM | Instituto Brasileiro de Geografia e Estatística (IBGE) | https://www.ibge.gov.br | 5.79% | 5.9% | 5.6% | 5.38% | /brazil/inflation-cpi| 0 | 2 | 1/10/2023 12:00:05 PM | | | % | BZPIIPCY | BZPIIPCY |
| 315169 | 1/12/2023 12:00:00 PM | India | Inflation Rate | Inflation Rate YoY | Dec | 12/31/2022 12:00:00 AM | Ministry of Statistics and Programme Implementation (MOSPI) | https://www.mospi.gov.in/ | 5.72% | 5.88% | 5.9%| 6% | /india/inflation-cpi | 0 | 2 | 1/12/2023 12:00:20 PM | | | % | INCPIINY | INCPIINY |

## By indicator, date and importance

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/calendar/indicator/inflation%20rate/2016-03-01/2016-03-03?c={your_api_key}&importance=2'
data = requests.get(url).json()
print(data)
```
*Or using our package:*
```python
te.getCalendarData(category='inflation rate', initDate='2016-03-01',
 endDate='2016-03-03', importance='2')
```

**JS**
*Using Requests:*
```js
const axios = require('axios');
(async () => {
    const your_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=${your_api_key}&importance=2`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
data = te.getCalendar(indicator = 'inflation rate', start_date = '2016-03-01',
 end_date = '2016-03-03', importance='2').then(function(data){
    console.log(data)     
});
```

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

**JSON**
```text
https://api.tradingeconomics.com/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?c={your_api_key}&importance={importance}&f=json
```
```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"
  }
]
```

**CSV**
```text
https://api.tradingeconomics.com/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?c={your_api_key}&importance={importance}&f=csv
```
```bash
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
```

**HTML**
```text
https://api.tradingeconomics.com/calendar/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?c={your_api_key}&importance={importance}
```

| 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 | https://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 |

## Date format

Calendar methods described above support string dates in different formats

| Date Format      | Example             | 
|------------------|---------------------|
| yyyy-MM-dd       | 2018-01-01          |
| yyyy-mm-dd HH:mm | 2016-12-03 23:59:59 |

