# Indicators Latest Updates

> Use the API to obtain the latest indicator updates.

Source: https://docs.tradingeconomics.com/indicators/latest_updates/

This section's endpoints provide a list of the latest updates, additions, or revisions applied to datasets or other information.

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/updates?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.getLatestUpdates()
```

**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/updates?c=${your_api_key}`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getLatestUpdates().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/updates?client=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/updates?c={your_api_key}&f=json
```
```json
[
  {
    "Country": "Colombia",
    "Category": "Food Inflation",
    "HistoricalDataSymbol": "COLOMBIAFOOINF",
    "LastUpdate": "2023-10-09T19:06:33.953"
  },
  {
    "Country": "France",
    "Category": "Electricity Price",
    "HistoricalDataSymbol": "FRAELEPRI",
    "LastUpdate": "2023-10-09T18:00:18.223"
  },
  {
    "Country": "Tanzania",
    "Category": "Inflation Rate",
    "HistoricalDataSymbol": "TANZANIAIR",
    "LastUpdate": "2023-10-09T17:17:49.073"
  }
]
```

**CSV**
```text
https://api.tradingeconomics.com/updates?c={your_api_key}&f=csv
```
```bash
Country,Category,HistoricalDataSymbol,LastUpdate
Colombia,Inflation Rate,COCPIYOY,10/9/2023 7:12:11 PM
Colombia,Food Inflation,COLOMBIAFOOINF,10/9/2023 7:06:33 PM
France,Electricity Price,FRAELEPRI,10/9/2023 6:00:18 PM
```

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

| Country |	Category | HistoricalDataSymbol |	LastUpdate |
|-------|-------|-------|-------|
| United Kingdom | Electricity Price | GBRELEPRI |7/11/2023 6:01:28 PM |
| Spain	| Electricity Price	| ESPELEPRI	| 7/11/2023 6:01:23 PM |
| Italy	| Electricity Price	| ITAELEPRI	| 7/11/2023 6:01:00 PM |

## By date

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/updates/2021-10-18?c={your_api_key}&time=15:20'
data = requests.get(url).json()
print(data)
```
*Or using our package:*
```python
te.getLatestUpdates(init_date='2018-01-01')
```

*With datetime:*
```python
te.getLatestUpdates(init_date='2021-10-18', time='15:20')
```

**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/updates/2021-10-18?c=${your_api_key}&time=15:20`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
data = te.getLatestUpdates(start_date = '2018-01-01').then(function(data){
  console.log(data)       
});
```

*With datetime:*
```javascript
data = te.getLatestUpdates(start_date = '2021-10-18', time = '15:20').then(function(data){
  console.log(data)       
});
```

**C#**
*Using Requests:*
```c#
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/updates/2018-01-01?c=your_api_key");
```

*With datetime:*
```c#
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/updates/2021-10-18?c=your_api_key&time=15:20");
```

**JSON**
```text
https://api.tradingeconomics.com/updates/{date}?c={your_api_key}&time={hh:mm}&f=json
```
```json
[
  {
    "Country": "Colombia",
    "Category": "Inflation Rate",
    "HistoricalDataSymbol": "COCPIYOY",
    "LastUpdate": "2023-10-09T19:12:11.61"
  },
  {
    "Country": "Colombia",
    "Category": "Food Inflation",
    "HistoricalDataSymbol": "COLOMBIAFOOINF",
    "LastUpdate": "2023-10-09T19:06:33.953"
  },
  {
    "Country": "France",
    "Category": "Electricity Price",
    "HistoricalDataSymbol": "FRAELEPRI",
    "LastUpdate": "2023-10-09T18:00:18.223"
  }
]
```

**CSV**
```text
https://api.tradingeconomics.com/updates/{date}?c={your_api_key}&time={hh:mm}&f=csv
```
```bash
Country,Category,HistoricalDataSymbol,LastUpdate
Colombia,Inflation Rate,COCPIYOY,10/9/2023 7:12:11 PM
Colombia,Food Inflation,COLOMBIAFOOINF,10/9/2023 7:06:33 PM
France,Electricity Price,FRAELEPRI,10/9/2023 6:00:18 PM
```

**HTML**
```text
https://api.tradingeconomics.com/updates/{date}?c={your_api_key}&time={hh:mm}
```

| Country |	Category | HistoricalDataSymbol |	LastUpdate |
|-------|-------|-------|-------|
| United Kingdom |Electricity Price	| GBRELEPRI	| 7/11/2023 6:01:28 PM |
| Spain	| Electricity Price	| ESPELEPRI	| 7/11/2023 6:01:23 PM |
| Italy	| Electricity Price	| ITAELEPRI	| 7/11/2023 6:01:00 PM |

## By country

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/updates/country/portugal?c={your_api_key}'
data = requests.get(url).json()
print(data)
```
*Or using our package:*
```python
te.getLatestUpdates(country='portugal')
```

*With multi countries*
```python
te.getLatestUpdates(country = ['portugal', 'spain'])
```

**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/updates/country/portugal?c=${your_api_key}`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
data = te.getLatestUpdates(country = 'portugal').then(function(data){
  console.log(data)       
});
```
*With multi countries*
```javascript
data = te.getLatestUpdates(country = ['portugal', 'spain']).then(function(data){
  console.log(data)       
});
```

**C#**
*Using Requests:*
```c#
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/updates/country/portugal?client=your_api_key");
```

*With multi countries*
```c#
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/updates/country/portugal,spain?client=your_api_key");
```

**JSON**
```text
https://api.tradingeconomics.com/updates/country/{country}?c={your_api_key}&f=json
```
```json
[
  {
    "Country": "Portugal",
    "Category": "Credit Rating",
    "HistoricalDataSymbol": "",
    "LastUpdate": "2023-10-09T11:13:23.75"
  },
  {
    "Country": "Portugal",
    "Category": "Tourist Arrivals",
    "HistoricalDataSymbol": "PORTUGALTOUARR",
    "LastUpdate": "2023-10-09T03:12:41.74"
  },
  {
    "Country": "Portugal",
    "Category": "Electricity Production",
    "HistoricalDataSymbol": "PTELECTRICITY",
    "LastUpdate": "2023-10-07T10:15:15.927"
  }
]
```

**CSV**
```text
https://api.tradingeconomics.com/updates/country/{country}?c={your_api_key}&f=csv
```
```bash
Country,Category,HistoricalDataSymbol,LastUpdate
Portugal,Credit Rating,,10/9/2023 11:13:23 AM
Portugal,Tourist Arrivals,PORTUGALTOUARR,10/9/2023 3:12:41 AM
Portugal,Electricity Production,PTELECTRICITY,10/7/2023 10:15:15 AM
```

**HTML**
```text
https://api.tradingeconomics.com/updates/country/{country}?c={your_api_key}
```

| Country |	Category | HistoricalDataSymbol |	LastUpdate |
|-------|-------|-------|-------|
| Portugal | Money Supply M3 | PORTUGALMONSUPM3	| 7/11/2023 2:54:29 AM |
| Portugal | Loan Growth | PORTUGALLOAGRO	| 7/11/2023 2:53:33 AM |
| Portugal | Banks Balance Sheet | PORTUGALBANBALSHE | 7/11/2023 2:43:18 AM |

## By country and date

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/updates/country/portugal/2018-01-01?c={your_api_key}'
data = requests.get(url).json()
print(data)
```
*Or using our package:*
```python
te.getLatestUpdates(country='portugal', init_date='2018-01-01')
```

**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/updates/country/portugal/2018-01-01?c=${your_api_key}`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
data = te.getLatestUpdates(start_date = '2018-01-01', country = 'portugal').then(function(data){
  console.log(data)       
});
```

**C#**
*Using Requests:*
```c#
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/updates/country/portugal/2018-01-01?client=your_api_key");
```

**JSON**
```text
https://api.tradingeconomics.com/updates/country/{country}/{date}?c={your_api_key}&f=json
```
```json
[
  {
    "Country": "Portugal",
    "Category": "Credit Rating",
    "HistoricalDataSymbol": "",
    "LastUpdate": "2023-10-09T11:13:23.75"
  },
  {
    "Country": "Portugal",
    "Category": "Tourist Arrivals",
    "HistoricalDataSymbol": "PORTUGALTOUARR",
    "LastUpdate": "2023-10-09T03:12:41.74"
  },
  {
    "Country": "Portugal",
    "Category": "Electricity Production",
    "HistoricalDataSymbol": "PTELECTRICITY",
    "LastUpdate": "2023-10-07T10:15:15.927"
  }
]
```

**CSV**
```text
https://api.tradingeconomics.com/updates/country/{country}/{date}?c={your_api_key}&f=csv
```
```bash
Country,Category,HistoricalDataSymbol,LastUpdate
Portugal,Credit Rating,,10/9/2023 11:13:23 AM
Portugal,Tourist Arrivals,PORTUGALTOUARR,10/9/2023 3:12:41 AM
Portugal,Electricity Production,PTELECTRICITY,10/7/2023 10:15:15 AM
```

**HTML**
```text
https://api.tradingeconomics.com/updates/country/{country}/{date}?c={your_api_key}
```

| Country |	Category | HistoricalDataSymbol |	LastUpdate |
|-------|-------|-------|-------|
| Portugal | Money Supply M3 | PORTUGALMONSUPM3 | 7/11/2023 2:54:29 AM |
| Portugal | Loan Growth | PORTUGALLOAGRO	| 7/11/2023 2:53:33 AM |
| Portugal | Banks Balance Sheet | PORTUGALBANBALSHE | 7/11/2023 2:43:18 AM |

## Response fields

| Field                | Type   | Description                                | Example                   |
| ---------------------| -------|--------------------------------------------|---------------------------|
| Country              | string | Name of the country associated with the indicator.          | "Australia"               |
| Category             | string | Name of the economic indicator or data category.        | "Inflation Expectations"  |
| HistoricalDataSymbol | string | Unique identifier used by Trading Economics for the data series.   | "AUSTRALIAINFEXP"         |
| LastUpdate           | string | Timestamp of the most recent update to the data (insert or change), in UTC. | "2023-04-13T17:23:32.933" |

