# World Bank Snapshot of Latest Values

> Use the following API endpoints to obtain World Bank snapshot data.

Source: https://docs.tradingeconomics.com/world_bank/snapshot/

The Snapshot endpoint offers a momentary view of data, capturing specific information at a particular point in time. It generally includes details such as date, units, and general information, providing a static representation of current data.

## By series code

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/worldbank/indicator?s=fr.inr.rinr&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.getWBIndicator(series_code = 'fr.inr.rinr')
```

**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/worldbank/indicator?s=fr.inr.rinr&c=${your_api_key}`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getWorldBank(series_code = 'fr.inr.rinr').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/worldbank/indicator?s=fr.inr.rinr&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/worldbank/indicator?c={your_api_key}&s={series_code}&f=json
```

```json
[
  {
    "symbol": "ABW.FR.INR.RINR",
    "last": 2.59848,
    "date": "2022-06-15T00:00:00",
    "previous": 11.98841,
    "previousDate": "2021-06-15T00:00:00",
    "country": "Aruba",
    "category": "Financial Sector",
    "description": "Real interest rate (%)",
    "frequency": "yearly",
    "unit": "%",
    "title": "Real interest rate ",
    "URL": "/aruba/real-interest-rate-percent-wb-data.html",
    "lastUpdate": "2024-03-21T08:06:54.167"
  },
  {
    "symbol": "AGO.FR.INR.RINR",
    "last": 3.27743,
    "date": "2022-06-15T00:00:00",
    "previous": -13.98937,
    "previousDate": "2021-06-15T00:00:00",
    "country": "Angola",
    "category": "Financial Sector",
    "description": "Real interest rate (%)",
    "frequency": "yearly",
    "unit": "%",
    "title": "Real interest rate ",
    "URL": "/angola/real-interest-rate-percent-wb-data.html",
    "lastUpdate": "2024-03-21T08:10:59.41"
  },
  {
    "symbol": "ALB.FR.INR.RINR",
    "last": -3.05768,
    "date": "2022-06-15T00:00:00",
    "previous": 2.48151,
    "previousDate": "2021-06-15T00:00:00",
    "country": "Albania",
    "category": "Financial Sector",
    "description": "Real interest rate (%)",
    "frequency": "yearly",
    "unit": "%",
    "title": "Real interest rate ",
    "URL": "/albania/real-interest-rate-percent-wb-data.html",
    "lastUpdate": "2024-03-21T08:14:00.28"
  }
]
```

**CSV**

```text
https://api.tradingeconomics.com/worldbank/indicator?c={your_api_key}&s={series_code}&f=csv
```

```bash
symbol,last,date,previous,previousDate,country,category,description,frequency,unit,title,URL,lastUpdate
ABW.FR.INR.RINR,2.59848,6/15/2022 12:00:00 AM,11.98841,6/15/2021 12:00:00 AM,Aruba,Financial Sector,Real interest rate (%),yearly,%,Real interest rate ,/aruba/real-interest-rate-percent-wb-data.html,3/21/2024 8:06:54 AM
AGO.FR.INR.RINR,3.27743,6/15/2022 12:00:00 AM,-13.98937,6/15/2021 12:00:00 AM,Angola,Financial Sector,Real interest rate (%),yearly,%,Real interest rate ,/angola/real-interest-rate-percent-wb-data.html,3/21/2024 8:10:59 AM
ALB.FR.INR.RINR,-3.05768,6/15/2022 12:00:00 AM,2.48151,6/15/2021 12:00:00 AM,Albania,Financial Sector,Real interest rate (%),yearly,%,Real interest rate ,/albania/real-interest-rate-percent-wb-data.html,3/21/2024 8:14:00 AM
```

**HTML**

```text
https://api.tradingeconomics.com/worldbank/indicator?c={your_api_key}&s={series_code}
```

| symbol | last | date | previous | previousDate | country | category | description | frequency | unit | title | URL | lastUpdate |
|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
| ABW.FR.INR.RINR | 2.59848 |	6/15/2022 12:00:00 AM	| 11.98841 | 6/15/2021 12:00:00 AM | Aruba | Financial Sector | Real interest rate (%) | yearly | % | Real interest rate | /aruba/real-interest-rate-percent-wb-data.html | 3/21/2024 8:06:54 AM |
| AGO.FR.INR.RINR | 3.27743 | 6/15/2022 12:00:00 AM	| -13.98937 | 6/15/2021 12:00:00 AM | Angola | Financial Sector | Real interest rate (%) | yearly	| %	| Real interest rate | /angola/real-interest-rate-percent-wb-data.html |3/21/2024 8:10:59 AM |
| ALB.FR.INR.RINR	| -3.05768 | 6/15/2022 12:00:00 AM | 2.48151 | 6/15/2021 12:00:00 AM | Albania | Financial Sector | Real interest rate (%) |yearly |% | Real interest rate | /albania/real-interest-rate-percent-wb-data.html | 3/21/2024 8:14:00 AM |

## By symbol

***Symbol is the result of concatenation between country ISO Alpha-3 code and series code.**

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/worldbank/indicator?s=usa.fr.inr.rinr&c={your_api_key}'
data = requests.get(url).json()
print(data)
```

*Or using our package:*
```python
te.getWBIndicator(series_code = 'usa.fr.inr.rinr')
```

**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/worldbank/indicator?s=usa.fr.inr.rinr&c=${your_api_key}`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
data = te.getWorldBank(series_code = 'usa.fr.inr.rinr').then(function(data){
  console.log(data)       
});
```

**C#**
*Using Requests:*
```c#
using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/worldbank/indicator?s=usa.fr.inr.rinr&c=your_api_key"))
```

**JSON**

```text
https://api.tradingeconomics.com/worldbank/indicator?c={your_api_key}&s={symbol}&f=json
```

```json
[
  {
    "symbol": "USA.FR.INR.RINR",
    "last": -1.18936,
    "date": "2021-06-15T00:00:00",
    "previous": 2.21041,
    "previousDate": "2020-06-15T00:00:00",
    "country": "United States",
    "category": "Financial Sector",
    "description": "Real interest rate (%)",
    "frequency": "yearly",
    "unit": "%",
    "title": "Real interest rate ",
    "URL": "/united-states/real-interest-rate-percent-wb-data.html",
    "lastUpdate": "2024-03-21T16:09:54.117"
  }
]
```

**CSV**

```text
https://api.tradingeconomics.com/worldbank/indicator?c={your_api_key}&s={symbol}&f=csv
```

```bash
symbol,last,date,previous,previousDate,country,category,description,frequency,unit,title,URL,lastUpdate
USA.FR.INR.RINR,-1.18936,6/15/2021 12:00:00 AM,2.21041,6/15/2020 12:00:00 AM,United States,Financial Sector,Real interest rate (%),yearly,%,Real interest rate ,/united-states/real-interest-rate-percent-wb-data.html,3/21/2024 4:09:54 PM
```

**HTML**

```text
https://api.tradingeconomics.com/worldbank/indicator?c={your_api_key}&s={series_code}
```

| symbol | last | date | previous | previousDate | country | category | description | frequency | unit | title | URL | lastUpdate |
|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
| USA.FR.INR.RINR | -1.18936 | 6/15/2021 12:00:00 AM | 2.21041 | 6/15/2020 12:00:00 AM | United States | Financial Sector | Real interest rate (%) | yearly | % | Real interest rate | /united-states/real-interest-rate-percent-wb-data.html | 3/21/2024 4:09:54 PM |

## By country

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

*Or using our package:*
```python
te.getWBCountry(country = 'Portugal')
```

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

**C#**
*Using Requests:*
```c#
using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/worldbank/country/portugal?c=your_api_key"))
```

**JSON**

```text
https://api.tradingeconomics.com/worldbank/country/{country}?c={your_api_key}&f=json
```

```json
[
  {
    "symbol": "PRT.AG.CON.FERT.PT.ZS",
    "last": 143.69798,
    "date": "2021-06-15T00:00:00",
    "previous": 148.97485,
    "previousDate": "2020-06-15T00:00:00",
    "country": "Portugal",
    "category": "Agriculture & Rural Development",
    "description": "Fertilizer consumption (% of fertilizer production)",
    "frequency": "yearly",
    "unit": "%",
    "title": "Fertilizer consumption (% of fertilizer production)",
    "URL": "/portugal/fertilizer-consumption-percent-of-fertilizer-production-wb-data.html",
    "lastUpdate": "2024-03-21T15:00:38.453"
  },
  {
    "symbol": "PRT.AG.CON.FERT.ZS",
    "last": 175.80018,
    "date": "2021-06-15T00:00:00",
    "previous": 180.81803,
    "previousDate": "2020-06-15T00:00:00",
    "country": "Portugal",
    "category": "Agriculture & Rural Development",
    "description": "Fertilizer consumption (kilograms per hectare of arable land)",
    "frequency": "yearly",
    "unit": "KG",
    "title": "Fertilizer consumption (kilograms per hectare of arable land)",
    "URL": "/portugal/fertilizer-consumption-kilograms-per-hectare-of-arable-land-wb-data.html",
    "lastUpdate": "2024-03-21T15:00:37"
  },
  {
    "symbol": "PRT.AG.LND.AGRI.K2",
    "last": 39622.955,
    "date": "2021-06-15T00:00:00",
    "previous": 39542.556,
    "previousDate": "2020-06-15T00:00:00",
    "country": "Portugal",
    "category": "Agriculture & Rural Development",
    "description": "Agricultural land (sq. km)",
    "frequency": "yearly",
    "unit": "sq. Km",
    "title": "Agricultural land (sq. km)",
    "URL": "/portugal/agricultural-land-sq-km-wb-data.html",
    "lastUpdate": "2024-03-21T15:00:38.277"
  }
]
```

**CSV**

```text
https://api.tradingeconomics.com/worldbank/country/{country}?c={your_api_key}&f=csv
```

```bash
symbol,last,date,previous,previousDate,country,category,description,frequency,unit,title,URL,lastUpdate
PRT.AG.CON.FERT.PT.ZS,143.69798,6/15/2021 12:00:00 AM,148.97485,6/15/2020 12:00:00 AM,Portugal,Agriculture & Rural Development,Fertilizer consumption (% of fertilizer production),yearly,%,Fertilizer consumption (% of fertilizer production),/portugal/fertilizer-consumption-percent-of-fertilizer-production-wb-data.html,3/21/2024 3:00:38 PM
PRT.AG.CON.FERT.ZS,175.80018,6/15/2021 12:00:00 AM,180.81803,6/15/2020 12:00:00 AM,Portugal,Agriculture & Rural Development,Fertilizer consumption (kilograms per hectare of arable land),yearly,KG,Fertilizer consumption (kilograms per hectare of arable land),/portugal/fertilizer-consumption-kilograms-per-hectare-of-arable-land-wb-data.html,3/21/2024 3:00:37 PM
PRT.AG.LND.AGRI.K2,39622.95500,6/15/2021 12:00:00 AM,39542.55600,6/15/2020 12:00:00 AM,Portugal,Agriculture & Rural Development,Agricultural land (sq. km),yearly,sq. Km,Agricultural land (sq. km),/portugal/agricultural-land-sq-km-wb-data.html,3/21/2024 3:00:38 PM
```

**HTML**

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

| symbol | last | date | previous | previousDate | country | category | description | frequency | unit | title | URL | lastUpdate |
|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
| PRT.AG.CON.FERT.PT.ZS | 143.69798 | 6/15/2021 12:00:00 AM | 148.97485 | 6/15/2020 12:00:00 AM | Portugal | Agriculture & Rural Development | Fertilizer consumption (% of fertilizer production) | yearly	| %	| Fertilizer consumption (% of fertilizer production)	| /portugal/fertilizer-consumption-percent-of-fertilizer-production-wb-data.html | 3/21/2024 3:00:38 PM |
| PRT.AG.CON.FERT.ZS | 175.80018 | 6/15/2021 12:00:00 AM | 180.81803 | 6/15/2020 12:00:00 AM | Portugal | Agriculture & Rural Development	| Fertilizer consumption (kilograms per hectare of arable land)	| yearly | KG	| Fertilizer consumption (kilograms per hectare of arable land)	| /portugal/fertilizer-consumption-kilograms-per-hectare-of-arable-land-wb-data.html | 3/21/2024 3:00:37 PM |
| PRT.AG.LND.AGRI.K2 | 39622.95500 | 6/15/2021 12:00:00 AM | 39542.55600 | 6/15/2020 12:00:00 AM | Portugal | Agriculture & Rural Development	| Agricultural land (sq. km) | yearly | sq. Km | Agricultural land (sq. km)	| /portugal/agricultural-land-sq-km-wb-data.html | 3/21/2024 3:00:38 PM |

## By URL

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/worldbank/indicator?url=/united-states/real-interest-rate-percent-wb-data.html&c={your_api_key}'
data = requests.get(url).json()
print(data)
```

*Or using our package:*
```python
te.getWBIndicator(url = '/united-states/real-interest-rate-percent-wb-data.html')
```

**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/worldbank/indicator?url=/united-states/real-interest-rate-percent-wb-data.html&c=${your_api_key}`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
data = te.getWorldBank(URL = '/united-states/real-interest-rate-percent-wb-data.html').then(function(data){
  console.log(data)       
});
```

**C#**
*Using Requests:*
```c#
using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/worldbank/indicator?url=/united-states/real-interest-rate-percent-wb-data.html&c=your_api_key"))
```

**JSON**

```text
https://api.tradingeconomics.com/worldbank/indicator?c={your_api_key}&url={url}&f=json
```

```json
[
  {
    "symbol": "USA.FR.INR.RINR",
    "last": -1.18936,
    "date": "2021-06-15T00:00:00",
    "previous": 2.21041,
    "previousDate": "2020-06-15T00:00:00",
    "country": "United States",
    "category": "Financial Sector",
    "description": "Real interest rate (%)",
    "frequency": "yearly",
    "unit": "%",
    "title": "Real interest rate ",
    "URL": "/united-states/real-interest-rate-percent-wb-data.html",
    "lastUpdate": "2024-03-21T16:09:54.117"
  }
]
```

**CSV**

```text
https://api.tradingeconomics.com/worldbank/indicator?c={your_api_key}&url={url}&f=csv
```

```bash
symbol,last,date,previous,previousDate,country,category,description,frequency,unit,title,URL,lastUpdate
USA.FR.INR.RINR,-1.18936,6/15/2021 12:00:00 AM,2.21041,6/15/2020 12:00:00 AM,United States,Financial Sector,Real interest rate (%),yearly,%,Real interest rate ,/united-states/real-interest-rate-percent-wb-data.html,3/21/2024 4:09:54 PM
```

**HTML**

```text
https://api.tradingeconomics.com/worldbank/indicator?c={your_api_key}&url={url}
```

| symbol | last | date | previous | previousDate | country | category | description | frequency | unit | title | URL | lastUpdate |
|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
| USA.FR.INR.RINR	| -1.18936 | 6/15/2021 12:00:00 AM | 2.21041 | 6/15/2020 12:00:00 AM | United States | Financial Sector	| Real interest rate (%) | yearly | %	| Real interest rate | /united-states/real-interest-rate-percent-wb-data.html	| 3/21/2024 4:09:54 PM |

## Response fields

| Field                | Type   | Description                                                                  | Example                                                 |
| ---------------------| -------|------------------------------------------------------------------------------|---------------------------------------------------------|
| Symbol       | string | World Bank series code or Trading Economics symbol                           | "ABW.FR.INR.RINR"                                       |
| Last         | number | Most recent released value                                                   | 12.22872                                                |
| Date         | string | Release date and time in UTC for the latest value                             | "2020-06-15T00:00:00"                                   |
| Previous     | number | Value of the previous period (after revisions if applicable)                 | 1.10675                                                 |
| PreviousDate | string | Release date and time in UTC for the previous value                           | "2019-06-15T00:00:00"                                   |
| Country      | string | Country associated with the series                                           | "Mexico"                                                |
| Category     | string | Category under which the indicator is classified                             | "Financial Sector"                                      |
| Description  | string | Brief description of the indicator                                           | "Real interest rate (%)"                                |
| Frequency    | string | Frequency at which the indicator is reported                                 | "yearly"                                                |
| Unit         | string | Measurement unit for the value                                              | "%"                                                     |
| Title        | string | Full title of the World Bank series                                          | "Real interest rate"                                    |
| URL          | string | Trading Economics link to the series                                         | "/aruba/real-interest-rate-percent-wb-data.html"        |
| last_update  | string | Timestamp when the data was last updated                                     | "2023-04-07T09:38:20.24"                                |

