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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
33 1 1 4

About get_news_headlines() function in EIKON Python API

I am using the python EIKON api. When I use the function get_news_headlines('NRG', count=100), [where by NRG I mean the "energy market" instead of the company, and similarly I have also tried to use ASIAE for asia energy market] I expect it to return energy related headlines, which should look like what are returned by the News Monitor App. This is not the case, and what returned by the function is completely different from the News Monitor headlines list. I am confused by how the pass the desired parameters to the function.
I have tried all manuals and the online assistants with no clues.
Any help in teaching me how to use it would be nice.

Thank you very much!

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.

Upvotes
Accepted
38.1k 71 35 53

get_news_headlines(...) can only get the data from News Wires source.

From my test, the results from get_news_headlines are similar to News Monitor when Sources Selection is News Wires.

News Monitor

get_news_headlines(...)

headlines = ek.get_news_headlines("NRG", count=20, raw_output=False)
headlines


news.png (87.0 KiB)
eikon-data-apis.png (52.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.

Upvotes
33 1 1 4

Thanks for the info. It seems that the time index and News Monitor time is off by the amount of the time zone. Now I compared with the shifted results and they are exactly the same, for both NRG and ASIAE. Although the source is restricted to only Newswire news, I can live with that for the moment. Thanks again.


image2.jpg (183.4 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.

Click below to post an Idea Post Idea