News by Country, Indicator and Date

This endpoint allows for the retrieval of news filtered by country, indicator, and date.

Using Requests:

import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/news/country/mexico/inflation%20rate?c={your_api_key}&d1=2021-02-02&d2=2021-03-03'
data = requests.get(url).json()
print(data)

Or using our package:

te.getNews(country = 'mexico', indicator = 'inflation rate', start_date = '2021-02-02',
 end_date = '2021-03-03')  

Using Requests:

const axios = require('axios');
(async () => {
    const your_api_key = 'your_api_key'
    const response = await axios.get(`https://api.tradingeconomics.com/news/country/mexico/inflation%20rate?c=${your_api_key}&d1=2021-02-02&d2=2021-03-03`)
    console.log(response.data)
})()

Or using our package:

data = te.getNews(country = 'mexico', indicator = 'inflation rate',
 start_date = '2021-02-02', end_date = '2021-03-03').then(function(data){
    console.log(data)     
});

Using Requests:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/news/country/mexico/inflation%20rate?c=your_api_key&d1=2021-02-02&d2=2021-03-03");
https://api.tradingeconomics.com/news/country/{countries}/{indicators}?c={your_api_key}&d1={date}&d2={date}&f=json
[
  {
    "id": "138307",
    "title": "Mexico Inflation Rate Picks Up to 3.54% in January",
    "date": "2021-02-09T12:11:24.75",
    "description": "The annual inflation rate in Mexico increased to 3.54 percent in January of 2021 from a seven-month low of 3.15 percent in the previous month and compared to market expectations of 3.46 percent. On a monthly basis, consumer prices climbed 0.86 percent, following a 0.38 percent gain in December. The core index, which strips out some volatile food and energy prices advanced 0.36 percent from a month earlier, after a 0.55 percent rise in December.",
    "country": "Mexico",
    "category": "Inflation Rate",
    "symbol": "MXCPYOY",
    "url": "/mexico/inflation-cpi",
    "importance": 2
  }
]
https://api.tradingeconomics.com/news/country/{countries}/{indicators}?c={your_api_key}&d1={date}&d2={date}&f=csv
id,title,date,description,country,category,symbol,url,importance
138307,Mexico Inflation Rate Picks Up to 3.54% in January,2/9/2021 12:11:24 PM,"The annual inflation rate in Mexico increased to 3.54 percent in January of 2021 from a seven-month low of 3.15 percent in the previous month and compared to market expectations of 3.46 percent. On a monthly basis, consumer prices climbed 0.86 percent, following a 0.38 percent gain in December. The core index, which strips out some volatile food and energy prices advanced 0.36 percent from a month earlier, after a 0.55 percent rise in December.",Mexico,Inflation Rate,MXCPYOY,/mexico/inflation-cpi,2
https://api.tradingeconomics.com/news/country/{countries}/{indicators}?c={your_api_key}&d1={date}&d2={date}&f=xml
<ArrayOfArticlePreview xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models">
<ArticlePreview>
<category>Inflation Rate</category>
<country>Mexico</country>
<date>2021-02-09T12:11:24.75</date>
<description>The annual inflation rate in Mexico increased to 3.54 percent in January of 2021 from a seven-month low of 3.15 percent in the previous month and compared to market expectations of 3.46 percent. On a monthly basis, consumer prices climbed 0.86 percent, following a 0.38 percent gain in December. The core index, which strips out some volatile food and energy prices advanced 0.36 percent from a month earlier, after a 0.55 percent rise in December.</description>
<id>138307</id>
<importance>2</importance>
<symbol>MXCPYOY</symbol>
<title>Mexico Inflation Rate Picks Up to 3.54% in January</title>
<url>/mexico/inflation-cpi</url>
</ArticlePreview>
</ArrayOfArticlePreview>
https://api.tradingeconomics.com/news/country/{countries}/{indicators}?c={your_api_key}&d1={date}&d2={date}
idtitledatedescriptioncountrycategorysymbolurlimportance
138307Mexico Inflation Rate Picks Up to 3.54% in January2/9/2021 12:11:24 PM“The annual inflation rate in Mexico increased to 3.54 percent in January of 2021 from a…”MexicoInflation RateMXCPYOY/mexico/inflation-cpi2