For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
33 0 2 2

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!



eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonnews
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvote
Accepted
39.2k 75 11 27

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)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea