By Parameter
Get news by date, country, and indicator.
By date
Get news by date range
/news?c=guest:guest&d1={date}&d2={date}
te.getNews(start_date = '2021-02-02', end_date = '2021-03-03', output_type = 'df')
data = te.getNews('2021-02-02', end_date = '2021-03-03').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/news?c=guest:guest&d1=2021-02-02&d2=2021-03-03");
By country
Get news by country
te.getNews(country = 'mexico', output_type = 'df')
data = te.getNews(country = 'mexico').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/news/country/mexico?c=guest:guest");
By country and date
Get news by country and date range
/news/country/{countries}?c=guest:guest&d1={date}&d2={date}
te.getNews(country = 'mexico', start_date = '2021-02-02',
end_date = '2021-03-03', output_type = 'df')
data = te.getNews(country = 'mexico', start_date = '2021-02-02',
end_date = '2021-03-03').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/news/country/mexico?c=guest:guest&d1=2021-02-02&d2=2021-03-03");
By indicator
Get news by indicators
te.getNews(indicator = 'inflation rate', output_type = 'df')
te.getNews(indicator = ['inflation rate','gdp'], output_type = 'df')
data = te.getNews(indicator = 'inflation rate').then(function(data){
console.log(data)
});
data = te.getNews(indicator = ['inflation rate','gdp']).then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/news/indicator/inflation%20rate?c=guest:guest");
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/news/indicator/inflation%20rate,gdp?c=guest:guest");
By indicator and date
Get news by indicators and date range
/news/indicator/{indicators}?c=guest:guest&d1={date}&d2={date}
te.getNews(indicator = 'inflation rate', start_date = '2021-02-02',
end_date = '2021-03-03', output_type = 'df')
te.getNews(indicator = ['inflation rate', 'imports'], start_date = '2021-02-02',
end_date = '2021-03-03', output_type = 'df')
data = te.getNews(indicator = 'inflation rate', start_date = '2021-01-01',
end_date = '2021-02-02').then(function(data){
console.log(data)
});
data = te.getNews(indicator = ['inflation rate', 'imports'], start_date = '2021-01-01',
end_date = '2021-02-02').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/news/indicator/inflation%20rate?c=guest:guest&d1=2021-02-02&d2=2021-03-03");
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/news/indicator/inflation%20rate,imports?c=guest:guest&d1=2021-02-02&d2=2021-03-03");
By country and indicator
Get news by country and indicators
/news/country/{countries}/{indicators}
te.getNews(country = 'mexico', indicator = 'inflation rate', output_type = 'df')
data = te.getNews(country = 'mexico', indicator = 'inflation rate').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/news/country/mexico/inflation%20rate?c=guest:guest");
By country, indicator and date
Get news by country, indicators and date range
/news/country/{countries}/{indicators}?c=guest:guest&d1={date}&d2={date}
te.getNews(country = 'mexico', indicator = 'inflation rate', start_date = '2021-02-02',
end_date = '2021-03-03', output_type = 'df')
data = te.getNews(country = 'mexico', indicator = 'inflation rate',
start_date = '2021-02-02', end_date = '2021-03-03').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/news/country/mexico/inflation%20rate?c=guest:guest&d1=2021-02-02&d2=2021-03-03");
Response fields
Field | Type | Description | Example |
---|---|---|---|
ID | string | Unique ID | “372644” |
Title | string | Title of the event | “Eurozone Industrial Output Rises for 2nd Month” |
Date | string | Release time and date in UTC | “2023-04-13T09:25:34.693” |
Description | string | Description of the event | “Industrial production in the Euro Area rose by 1.5 percent from…” |
Country | string | Country name | “Euro Area” |
Category | string | Category name | “Industrial Production Mom” |
Symbol | string | Unique symbol used by Trading Economics | “EUROAREAINDPROMOM” |
Url | string | Hyperlink at Trading Economics | “/euro-area/industrial-production-mom” |
Importance | number | Lowest 0 to 3 highest | 2 |