Indicators Snapshot of Latest Values
The endpoints below return a snapshot table with the current values representing the latest figures for economic indicators across 196+ countries.
Data by country | Data by Country and Category Group | Countries by Indicator | By ticker | Credit Ratings | Response fields
Data by country
Using Requests:
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/country/mexico?c={your_api_key}'
data = requests.get(url).json()
print(data)
Or using our package:
import tradingeconomics as te
te.login('your_api_key')
te.getIndicatorData(country='mexico')
With multi countries:
te.getIndicatorData(country=['mexico', 'sweden'])
Using Requests:
const axios = require('axios');
(async () => {
const your_api_key = 'your_api_key'
const response = await axios.get(`https://api.tradingeconomics.com/country/mexico?c=${your_api_key}`)
console.log(response.data)
})()
Or using our package:
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getIndicatorData(country = 'mexico').then(function(data){
console.log(data)
});
With multi countries:
data = te.getIndicatorData(country = ['mexico', 'sweden']).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/country/mexico?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);
}
}
}
With multi countries:
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/country/mexico,sweden?c=your_api_key");
The response data format can be configured by appending the &f= parameter to the URL request.
https://api.tradingeconomics.com/country/{country}?c={your_api_key}&f=json
[
{
"Country": "Mexico",
"Category": "Auto Exports",
"Title": "Mexico Auto Exports",
"LatestValueDate": "2023-08-31T00:00:00",
"LatestValue": 287.85,
"Source": "Instituto Nacional de Estadística y Geografía (INEGI)",
"SourceURL": "https://www.inegi.org.mx/",
"Unit": "Thousand Units",
"URL": "/mexico/auto-exports",
"CategoryGroup": "Trade",
"Adjustment": "NSA",
"Frequency": "Monthly",
"HistoricalDataSymbol": "MEXICOAUTEXP",
"CreateDate": "2019-07-23T12:20:00",
"FirstValueDate": "1988-01-31T00:00:00",
"PreviousValue": 275.77,
"PreviousValueDate": "2023-07-31T00:00:00"
},
{
"Country": "Mexico",
"Category": "Balance of Trade",
"Title": "Mexico Balance of Trade",
"LatestValueDate": "2023-08-31T00:00:00",
"LatestValue": -1377.09,
"Source": "Instituto Nacional de Estadística y Geografía (INEGI)",
"SourceURL": "https://www.inegi.org.mx/",
"Unit": "USD Million",
"URL": "/mexico/balance-of-trade",
"CategoryGroup": "Trade",
"Adjustment": "NSA",
"Frequency": "Monthly",
"HistoricalDataSymbol": "MXTBBAL",
"CreateDate": "2014-07-25T14:01:00",
"FirstValueDate": "1980-01-31T00:00:00",
"PreviousValue": -881.2,
"PreviousValueDate": "2023-07-31T00:00:00"
},
{
"Country": "Mexico",
"Category": "Banks Balance Sheet",
"Title": "Mexico Banks Balance Sheet",
"LatestValueDate": "2023-07-31T00:00:00",
"LatestValue": 10602555.4,
"Source": "Banco de México",
"SourceURL": "http://www.banxico.org.mx",
"Unit": "MXN Million",
"URL": "/mexico/banks-balance-sheet",
"CategoryGroup": "Money",
"Adjustment": "NSA",
"Frequency": "Monthly",
"HistoricalDataSymbol": "MEXICOBANBALSHE",
"CreateDate": "2014-09-08T15:29:00",
"FirstValueDate": "2000-12-31T00:00:00",
"PreviousValue": 10485011.08,
"PreviousValueDate": "2023-06-30T00:00:00"
}
]
https://api.tradingeconomics.com/country/{country}?c={your_api_key}&f=csv
Country,Category,Title,LatestValueDate,LatestValue,Source,SourceURL,Unit,URL,CategoryGroup,Adjustment,Frequency,HistoricalDataSymbol,CreateDate,FirstValueDate,PreviousValue,PreviousValueDate
Mexico,Auto Exports,Mexico Auto Exports,8/31/2023 12:00:00 AM,287.85,Instituto Nacional de Estadística y Geografía (INEGI),https://www.inegi.org.mx/,Thousand Units,/mexico/auto-exports,Trade,NSA,Monthly,MEXICOAUTEXP,7/23/2019 12:20:00 PM,1/31/1988 12:00:00 AM,275.77,7/31/2023 12:00:00 AM
Mexico,Balance of Trade,Mexico Balance of Trade,8/31/2023 12:00:00 AM,-1377.09,Instituto Nacional de Estadística y Geografía (INEGI),https://www.inegi.org.mx/,USD Million,/mexico/balance-of-trade,Trade,NSA,Monthly,MXTBBAL,7/25/2014 2:01:00 PM,1/31/1980 12:00:00 AM,-881.20,7/31/2023 12:00:00 AM
Mexico,Banks Balance Sheet,Mexico Banks Balance Sheet,7/31/2023 12:00:00 AM,10602555.40,Banco de México,http://www.banxico.org.mx,MXN Million,/mexico/banks-balance-sheet,Money,NSA,Monthly,MEXICOBANBALSHE,9/8/2014 3:29:00 PM,12/31/2000 12:00:00 AM,10485011.08,6/30/2023 12:00:00 AM
https://api.tradingeconomics.com/country/{country}?c={your_api_key}
| Country | Category | Title | LatestValueDate | LatestValue | Source | SourceURL | Unit | URL | CategoryGroup | Adjustment | Frequency | HistoricalDataSymbol | CreateDate | FirstValueDate | PreviousValue | PreviousValueDate |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Mexico | Auto Exports | Mexico Auto Exports | 6/30/2023 12:00:00 AM | 286.29 | Instituto Nacional de Estadística y Geografía (INEGI) | https://www.inegi.org.mx/ | Thousand Units | /mexico/auto-exports | Trade | NSA | Monthly | MEXICOAUTEXP | 7/23/2019 12:20:00 PM | 1/31/1988 12:00:00 AM | 279.27 | 5/31/2023 12:00:00 AM |
| Mexico | Balance of Trade | Mexico Balance of Trade | 5/31/2023 12:00:00 AM | -74.00 | Instituto Nacional de Estadística y Geografía (INEGI) | https://www.inegi.org.mx/ | USD Million | /mexico/balance-of-trade | Trade | NSA | Monthly | MXTBBAL | 7/25/2014 2:01:00 PM | 1/31/1980 12:00:00 AM | -1509.00 | 4/30/2023 12:00:00 AM |
| Mexico | Banks Balance Sheet | Mexico Banks Balance Sheet | 4/30/2023 12:00:00 AM | 10335903.02 | Banco de México | https://www.banxico.org.mx | MXN Million | /mexico/banks-balance-sheet | Trade | NSA | Monthly | MEXICOBANBALSHE | 9/8/2014 3:29:00 PM | 12/31/2000 12:00:00 AM | 10169075.64 | 3/31/2023 12:00:00 AM |
Please consider that not all indicators are displayed and if you want a comprehensive list of all indicators that we have available you will need pass a category group argument as displayed in an example below.
Data by Country and Category Group
Category groups = (health, markets, taxes, gdp, housing, trade, climate, labour, overview, prices, government, consumer, business, money)
Using Requests:
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/country/mexico?c={your_api_key}&group=gdp'
data = requests.get(url).json()
print(data)
Or using our package:
te.getIndicatorByCategoryGroup(country='mexico', category_group='gdp')
Using Requests:
const axios = require('axios');
(async () => {
const your_api_key = 'your_api_key'
const response = await axios.get(`https://api.tradingeconomics.com/country/mexico?c=${your_api_key}&group=gdp`)
console.log(response.data)
})()
Or using our package:
data = te.getIndicatorData(country = 'mexico', group = 'gdp' ).then(function(data){
console.log(data)
});
Using Requests:
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/country/mexico?c=your_api_key&group=gdp");
https://api.tradingeconomics.com/country/{country}?c={your_api_key}&group={group}&f=json
[
{
"Country": "Mexico",
"Category": "Full Year GDP Growth",
"Title": "Mexico Full Year Gdp Growth",
"LatestValueDate": "2022-12-31T00:00:00",
"LatestValue": 3.1,
"Source": "Instituto Nacional de Estadística y Geografía (INEGI)",
"SourceURL": "https://www.inegi.org.mx",
"Unit": "percent",
"URL": "/mexico/full-year-gdp-growth",
"CategoryGroup": "GDP",
"Adjustment": "NSA",
"Frequency": "Yearly",
"HistoricalDataSymbol": "MEXFYGG",
"CreateDate": "2022-01-31T18:49:00",
"FirstValueDate": "1994-12-31T00:00:00",
"PreviousValue": 5.0,
"PreviousValueDate": "2021-12-31T00:00:00"
},
{
"Country": "Mexico",
"Category": "GDP",
"Title": "Mexico GDP",
"LatestValueDate": "2022-12-31T00:00:00",
"LatestValue": 1414.19,
"Source": "World Bank",
"SourceURL": "https://www.worldbank.org/",
"Unit": "USD Billion",
"URL": "/mexico/gdp",
"CategoryGroup": "GDP",
"Adjustment": "Current USD",
"Frequency": "Yearly",
"HistoricalDataSymbol": "WGDPMEXI",
"CreateDate": "2014-07-03T15:32:00",
"FirstValueDate": "1960-12-31T00:00:00",
"PreviousValue": 1272.84,
"PreviousValueDate": "2021-12-31T00:00:00"
},
{
"Country": "Mexico",
"Category": "GDP Aggregate Demand QoQ",
"Title": "Mexico GDP Aggregate Demand QoQ",
"LatestValueDate": "2023-06-30T00:00:00",
"LatestValue": 1.3,
"Source": "Instituto Nacional de Estadística y Geografía (INEGI)",
"SourceURL": "https://www.inegi.org.mx",
"Unit": "percent",
"URL": "/mexico/gdp-aggregate-demand-qoq",
"CategoryGroup": "GDP",
"Adjustment": "SA",
"Frequency": "Quarterly",
"HistoricalDataSymbol": "MEXGADQ",
"CreateDate": "2021-11-03T13:25:00",
"FirstValueDate": "1993-06-30T00:00:00",
"PreviousValue": 1.5,
"PreviousValueDate": "2023-03-31T00:00:00"
}
]
https://api.tradingeconomics.com/country/{country}?c={your_api_key}&group={group}&f=csv
Country,Category,Title,LatestValueDate,LatestValue,Source,SourceURL,Unit,URL,CategoryGroup,Adjustment,Frequency,HistoricalDataSymbol,CreateDate,FirstValueDate,PreviousValue,PreviousValueDate
Mexico,Full Year GDP Growth,Mexico Full Year Gdp Growth,12/31/2022 12:00:00 AM,3.10,Instituto Nacional de Estadística y Geografía (INEGI),https://www.inegi.org.mx,percent,/mexico/full-year-gdp-growth,GDP,NSA,Yearly,MEXFYGG,1/31/2022 6:49:00 PM,12/31/1994 12:00:00 AM,5.00,12/31/2021 12:00:00 AM
Mexico,GDP,Mexico GDP,12/31/2022 12:00:00 AM,1414.19,World Bank,https://www.worldbank.org/,USD Billion,/mexico/gdp,GDP,Current USD,Yearly,WGDPMEXI,7/3/2014 3:32:00 PM,12/31/1960 12:00:00 AM,1272.84,12/31/2021 12:00:00 AM
Mexico,GDP Aggregate Demand QoQ,Mexico GDP Aggregate Demand QoQ,6/30/2023 12:00:00 AM,1.30,Instituto Nacional de Estadística y Geografía (INEGI),https://www.inegi.org.mx,percent,/mexico/gdp-aggregate-demand-qoq,GDP,SA,Quarterly,MEXGADQ,11/3/2021 1:25:00 PM,6/30/1993 12:00:00 AM,1.50,3/31/2023 12:00:00 AM
https://api.tradingeconomics.com/country/{country}?c={your_api_key}&group={group}
| Country | Category | Title | LatestValueDate | LatestValue | Source | SourceURL | Unit | URL | CategoryGroup | Adjustment | Frequency | HistoricalDataSymbol | CreateDate | FirstValueDate | PreviousValue | PreviousValueDate |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Mexico | Full Year GDP Growth | Mexico Full Year Gdp Growth | 12/31/2022 12:00:00 AM | 3.10 | Instituto Nacional de Estadística y Geografía (INEGI) | https://www.inegi.org.mx | percent | /mexico/full-year-gdp-growth | GDP | NSA | Yearly | MEXFYGG | 1/31/2022 6:49:00 PM | 12/31/1994 12:00:00 AM | 5.00 | 12/31/2021 12:00:00 AM |
| Mexico | GDP | Mexico GDP | 12/31/2022 12:00:00 AM | 1414.19 | World Bank | https://www.worldbank.org/ | USD Billion | /mexico/gdp | GDP | Current USD | Yearly | WGDPMEXI | 7/3/2014 3:32:00 PM | 12/31/1960 12:00:00 AM | 1272.84 | 12/31/2021 12:00:00 AM |
| Mexico | GDP Aggregate Demand QoQ | Mexico GDP Aggregate Demand QoQ | 3/31/2023 12:00:00 AM | 1.80 | Instituto Nacional de Estadística y Geografía (INEGI) | https://www.inegi.org.mx | percent | /mexico/gdp-aggregate-demand-qoq | GDP | SA | Quarterly | MEXGADQ | 11/3/2021 1:25:00 PM | 6/30/1993 12:00:00 AM | 0.00 | 12/31/2022 12:00:00 AM |
Countries by Indicator
Using Requests:
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/country/all/gdp?c={your_api_key}'
data = requests.get(url).json()
print(data)
Or using our package:
te.getIndicatorData(indicators='gdp')
Using Requests:
const axios = require('axios');
(async () => {
const your_api_key = 'your_api_key'
const response = await axios.get(`https://api.tradingeconomics.com/country/all/gdp?c=${your_api_key}`)
console.log(response.data)
})()
Or using our package:
data = te.getIndicatorData(indicator = 'gdp').then(function(data){
console.log(data)
});
Using Requests:
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/country/all/gdp?c=your_api_key");
https://api.tradingeconomics.com/country/all/{indicator}?c={your_api_key}&f=json
[
{
"Country": "Afghanistan",
"Category": "GDP",
"Title": "Afghanistan GDP",
"LatestValueDate": "2021-12-31T00:00:00",
"LatestValue": 14.58,
"Source": "World Bank",
"SourceURL": "https://www.worldbank.org/",
"Unit": "USD Billion",
"URL": "/afghanistan/gdp",
"CategoryGroup": "GDP",
"Adjustment": "Current USD",
"Frequency": "Yearly",
"HistoricalDataSymbol": "AFGSTANGDP",
"CreateDate": "2012-11-07T14:06:00",
"FirstValueDate": "1960-12-31T00:00:00",
"PreviousValue": 20.14,
"PreviousValueDate": "2020-12-31T00:00:00"
},
{
"Country": "Albania",
"Category": "GDP",
"Title": "Albania GDP",
"LatestValueDate": "2022-12-31T00:00:00",
"LatestValue": 18.88,
"Source": "World Bank",
"SourceURL": "https://www.worldbank.org/",
"Unit": "USD Billion",
"URL": "/albania/gdp",
"CategoryGroup": "GDP",
"Adjustment": "Current USD",
"Frequency": "Yearly",
"HistoricalDataSymbol": "ALBANIAGDP",
"CreateDate": "2012-10-08T13:36:00",
"FirstValueDate": "1984-12-31T00:00:00",
"PreviousValue": 17.93,
"PreviousValueDate": "2021-12-31T00:00:00"
},
{
"Country": "Algeria",
"Category": "GDP",
"Title": "Algeria GDP",
"LatestValueDate": "2022-12-31T00:00:00",
"LatestValue": 191.91,
"Source": "World Bank",
"SourceURL": "https://www.worldbank.org/",
"Unit": "USD Billion",
"URL": "/algeria/gdp",
"CategoryGroup": "GDP",
"Adjustment": "Current USD",
"Frequency": "Yearly",
"HistoricalDataSymbol": "AlgeriaGDP",
"CreateDate": "2011-06-27T00:00:00",
"FirstValueDate": "1960-12-31T00:00:00",
"PreviousValue": 163.47,
"PreviousValueDate": "2021-12-31T00:00:00"
}
]
https://api.tradingeconomics.com/country/all/{indicator}?c={your_api_key}&f=csv
Country,Category,Title,LatestValueDate,LatestValue,Source,SourceURL,Unit,URL,CategoryGroup,Adjustment,Frequency,HistoricalDataSymbol,CreateDate,FirstValueDate,PreviousValue,PreviousValueDate
Afghanistan,GDP,Afghanistan GDP,12/31/2021 12:00:00 AM,14.58,World Bank,https://www.worldbank.org/,USD Billion,/afghanistan/gdp,GDP,Current USD,Yearly,AFGSTANGDP,11/7/2012 2:06:00 PM,12/31/1960 12:00:00 AM,20.14,12/31/2020 12:00:00 AM
Albania,GDP,Albania GDP,12/31/2022 12:00:00 AM,18.88,World Bank,https://www.worldbank.org/,USD Billion,/albania/gdp,GDP,Current USD,Yearly,ALBANIAGDP,10/8/2012 1:36:00 PM,12/31/1984 12:00:00 AM,17.93,12/31/2021 12:00:00 AM
Algeria,GDP,Algeria GDP,12/31/2022 12:00:00 AM,191.91,World Bank,https://www.worldbank.org/,USD Billion,/algeria/gdp,GDP,Current USD,Yearly,AlgeriaGDP,6/27/2011 12:00:00 AM,12/31/1960 12:00:00 AM,163.47,12/31/2021 12:00:00 AM
https://api.tradingeconomics.com/country/all/{indicator}?c={your_api_key}
| Country | Category | Title | LatestValueDate | LatestValue | Source | SourceURL | Unit | URL | CategoryGroup | Adjustment | Frequency | HistoricalDataSymbol | CreateDate | FirstValueDate | PreviousValue | PreviousValueDate |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Afghanistan | GDP | Afghanistan GDP | 12/31/2021 12:00:00 AM | 14.58 | World Bank | https://www.worldbank.org/ | USD Billion | /afghanistan/gdp | GDP | Current USD | Yearly | AFGSTANGDP | 11/7/2012 2:06:00 PM | 12/31/1960 12:00:00 AM | 20.14 | 12/31/2020 12:00:00 AM |
| Albania | GDP | Albania GDP | 12/31/2022 12:00:00 AM | 18.88 | World Bank | https://www.worldbank.org/ | USD Billion | /albania/gdp | GDP | Current USD | Yearly | ALBANIAGDP | 10/8/2012 1:36:00 PM | 12/31/1984 12:00:00 AM | 17.93 | 12/31/2021 12:00:00 AM |
| Algeria | GDP | Algeria GDP | 12/31/2022 12:00:00 AM | 191.91 | World Bank | https://algeria/gdp | USD Billion | /afghanistan/gdp | GDP | Current USD | Yearly | AlgeriaGDP | 6/27/2011 12:00:00 AM | 12/31/1960 12:00:00 AM | 163.47 | 12/31/2021 12:00:00 AM |
By ticker
Using Requests:
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/country/ticker/usurtot?c={your_api_key}'
data = requests.get(url).json()
print(data)
Or using our package:
te.getIndicatorByTicker(ticker='usurtot')
Using Requests:
const axios = require('axios');
(async () => {
const your_api_key = 'your_api_key'
const response = await axios.get(`https://api.tradingeconomics.com/country/ticker/usurtot?c=${your_api_key}`)
console.log(response.data)
})()
Or using our package:
data = te.getIndicatorData(ticker = 'usurtot').then(function(data){
console.log(data)
});
Using Requests:
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/country/ticker/usurtot?c=your_api_key");
https://api.tradingeconomics.com/country/ticker/{ticker}?c={your_api_key}&f=json
[
{
"Country": "United States",
"Category": "Unemployment Rate",
"Title": "United States Unemployment Rate",
"LatestValueDate": "2023-09-30T00:00:00",
"LatestValue": 3.8,
"Source": "U.S. Bureau of Labor Statistics",
"SourceURL": "http://www.bls.gov/",
"Unit": "percent",
"URL": "/united-states/unemployment-rate",
"CategoryGroup": "Labour",
"Adjustment": "",
"Frequency": "Monthly",
"HistoricalDataSymbol": "USURTOT",
"CreateDate": "2012-02-23T11:41:00",
"FirstValueDate": "1948-01-31T00:00:00",
"PreviousValue": 3.8,
"PreviousValueDate": "2023-08-31T00:00:00"
}
]
https://api.tradingeconomics.com/country/ticker/{ticker}?c={your_api_key}&f=csv
Country,Category,Title,LatestValueDate,LatestValue,Source,SourceURL,Unit,URL,CategoryGroup,Adjustment,Frequency,HistoricalDataSymbol,CreateDate,FirstValueDate,PreviousValue,PreviousValueDate
United States,Unemployment Rate,United States Unemployment Rate,9/30/2023 12:00:00 AM,3.80,U.S. Bureau of Labor Statistics,http://www.bls.gov/,percent,/united-states/unemployment-rate,Labour,,Monthly,USURTOT,2/23/2012 11:41:00 AM,1/31/1948 12:00:00 AM,3.80,8/31/2023 12:00:00 AM
https://api.tradingeconomics.com/country/ticker/{ticker}?c={your_api_key}
| Country | Category | Title | LatestValueDate | LatestValue | Source | SourceURL | Unit | URL | CategoryGroup | Adjustment | Frequency | HistoricalDataSymbol | CreateDate | FirstValueDate | PreviousValue | PreviousValueDate |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| United States | Unemployment Rate | United States Unemployment Rate | 6/30/2023 12:00:00 AM | 3.60 | U.S. Bureau of Labor Statistics | https://www.bls.gov/ | percent | /united-states/unemployment-rate | Labour | Monthly | USURTOT | 2/23/2012 11:41:00 AM | 1/31/1948 12:00:00 AM | 3.70 | 5/31/2023 12:00:00 AM |
Credit Ratings
Sovereign credit ratings as reported by major credit rating agencies. For historical ratings and more details, see the dedicated Credit Ratings page.
Using Requests:
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/credit-ratings?c={your_api_key}'
data = requests.get(url).json()
print(data)
Or using our package:
import tradingeconomics as te
te.login('your_api_key')
te.getCreditRatings()
With multi countries
te.getCreditRatings(country=['mexico','sweden'])
Using Requests:
const axios = require("axios");
(async () => {
const your_api_key = "your_api_key";
const response = await axios.get(
`https://api.tradingeconomics.com/credit-ratings?c=${your_api_key}`
);
console.log(response.data);
})();
Or using our package:
const te = require("tradingeconomics");
te.login("your_api_key");
data = te.getCreditRatings().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/credit-ratings?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);
}
}
}
With multi countries
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/credit-ratings/country/mexico,sweden?c=your_api_key");
https://api.tradingeconomics.com/credit-ratings?c={your_api_key}&f=json
[
{
"Country": "Kazakhstan",
"Date": "10/27/2023",
"Agency": "Moody's",
"Rating": "Baa2",
"Outlook": "Positive"
},
{
"Country": "Isle of Man",
"Date": "10/27/2023",
"Agency": "Moody's",
"Rating": "Aa3",
"Outlook": "Stable"
},
{
"Country": "Costa Rica",
"Date": "10/27/2023",
"Agency": "S&P",
"Rating": "BB-",
"Outlook": "Stable"
}
]
https://api.tradingeconomics.com/credit-ratings?c={your_api_key}&f=csv
Country,Date,Agency,Rating,Outlook
Kazakhstan,10/27/2023,Moody's,Baa2,Positive
Isle of Man,10/27/2023,Moody's,Aa3,Stable
Costa Rica,10/27/2023,S&P,BB-,Stable
https://api.tradingeconomics.com/credit-ratings?c={your_api_key}
| Country | Date | Agency | Rating | Outlook |
|---|---|---|---|---|
| Kazakhstan | 10/27/2023 | Moody’s | Baa2 | Positive |
| Isle of Man | 10/27/2023 | Moody’s | Aa3 | Stable |
| Costa Rica | 10/27/2023 | S&P | BB- | Stable |
Response fields
| Field | Type | Description | Example |
|---|---|---|---|
| Country | string | Name of the country associated with the indicator. | “Algeria” |
| Category | string | Name of the economic indicator or data category. | “Auto Exports”, |
| Title | string | Combined label of country and category. | “Mexico Auto Exports” |
| LatestValueDate | string | Date of the most recently released value, in UTC. | “2023-03-31T00:00:00” |
| LatestValue | number | Most recent published value for the indicator. | 272.69 |
| Source | string | Name of the organization or authority that provided the data. | “Instituto Nacional de Estadística y Geografía (INEGI)” |
| SourceURL | string | Direct URL link to the original data source (if available). | “https://www.inegi.org.mx/” |
| Unit | string | Unit of measurement for the value. | “Thousand Units” |
| URL | string | Hyperlink to the indicator page on Trading Economics. | “/mexico/auto-exports” |
| CategoryGroup | string | Broad classification group for the indicator. | “Trade” |
| Adjustment | string | Description of any adjustments. | “Current USD |
| Frequency | string | Frequency of data release. | “Daily” |
| HistoricalDataSymbol | string | Unique identifier used by Trading Economics for the data series. | “MEXICOAUTEXP” |
| CreateDate | string | Date and time when the indicator was added to the database | “2019-07-23T12:20:00” |
| FirstValueDate | string | Date of the earliest available historical value. | “1988-01-31T00:00:00” |
| PreviousValue | number | Value released prior to the latest one. | 230.48 |
| PreviousValueDate | string | Release date of the previous value. | “2023-02-28T00:00:00” |