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
13 5 9 11

Keywords search in News Screener

Hi, I am trying to use the get_news_headlines to run a keyword search on Python. I have noticed that if I use a single word this works as expected, as per example:

ek.get_news_headlines(query = 'plastic', count=100)

However, I am trying to use in this case multiple words combined in a single string as my query. For example I am looking to search for al headline containing the string 'sustainability linked'. On the Eikon News Screener I get multiple hits:

1657279205408.png

But none on Python using the same format as above:

ek.get_news_headlines(query = 'plastic use', count=100)

1657279263779.png

Would you please help me understanding how to run this correctly?

Also, can you advise whether the RDP API would be better suited for this searches?

Thanks!

python apinewsrdp searchnews-filter
1657279205408.png (45.5 KiB)
1657279263779.png (7.1 KiB)
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.

@Giorgio Cozzolino

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the 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
Upvotes
Accepted
79.2k 251 52 74

@Giorgio Cozzolino

The query should be inside double quotation marks.

ek.get_news_headlines('\\"plastic use\\"')

The output is:

1657511244388.png


1657511244388.png (42.0 KiB)
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.