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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
40 1 3 2

get_news_headlines how to properly use the criterias?

Hello,


I am using the get_news_headlines,

I am trying to identify news as below, but it doesnt show any result, could you please help me to write properly my query ?

df = ek.get_news_headlines("(hurricane OR tropical storm) AND (oil OR Gulf Coast)")


Thanks in advance.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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
6.7k 8 6 7

Hi @emmanuel.chaslin Thanks for your question. The get_news_headlines API call uses a query syntax that can be generated from the NEWS app. (Type NEWS into search bar) - I have written an article on how to generate the query from natural language. You can use topic codes or keywords or languages etc - all options appear when you type something into the news query bar, note keywords must be properly escaped by adding another set of "" around those terms - see the ""oil"" term below.

df = ek.get_news_headlines("( Topic:WND) AND (""oil"" OR Topic:PADD3 )")
df 

I hope this can help.


1600338606831.png (374.2 KiB)
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.

very well thanks

Click below to post an Idea Post Idea