Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
39 2 5 6

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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apinews
icon clock
10 |1500

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

@noel.randewich

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply.


This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.


Thanks,

AHS

1 Answer

· Write an Answer
Upvote
Accepted
39.4k 77 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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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