Eikon API reading string as company RIC in headline query

HI,

The Eikon API seems to be interpreting 'Apple" as the Apple RIC, 'AAPL.O", and seems returning me any news headline that has that RIC associated with it. If I write 'Apple' (without the quotes) in an Eikon news search box, it does the same. It changes "Apple" to the RIC 'AAPL.O. I seem to be getting the same result with 'Trump", which I believe Eikon is interpreting as the topic code POTUS.

Could you show me how I might tweak the line below to return ONLY stories with the exact string "Apple" appearing in the headline, regardless of whether the story has the RIC AAPL.O associated with it? I only want stories with "Apple" in the headline.

df = ek.get_news_headlines('Language:LEN AND NS:RTRS AND Apple', date_from = "2019-11-13", count=100)

Thank you!



Best Answer

  • To search for news headlines containing the exact text, enclose the text in quotes. E.g. in Eikon News Monitor app you can use

    Language:LEN AND Source:RTRS AND "APPLE"

    To use this search expression in Eikon Data APIs library for Python you need to escape the quotes:

    ek.get_news_headlines(r"Language:LEN AND Source:RTRS AND \"APPLE\"", 
                          date_from = "2019-11-13", count=100)