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
1 2 1 3

Query news in English via python API

I tried the sample code to get news in German like this 'R:LHAG.DE'.

ek.get_news_headlines('R:LHAG.DE', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')

How can I get news in English ? what is the 'RIC' code for get_news_headlines func? , 'R:LANG.EN' does not work.

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.

Hello @ws,

Thank you for your participation in the forum. Is one of the replies below satisfactory in resolving your query? 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

Hello @ws,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? 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

Hello,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
4.3k 2 4 5

Basically, you're can type any news expression. You can validate the expression in Eikon then copy paste it.

For your example: when you type 'FOMC, FED, US' in News component, it's transformed to 'R:FMSAUBD.MX OR Topic:FED OR Topic:US'. Then you can copy the result in Python request:

>>> ek.get_news_headlines('R:FMSAUBD.MX OR Topic:FED OR Topic:US', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')

You can add language filter :

>>> ek.get_news_headlines('( R:FMSAUBD.MX OR Topic:FED OR Topic:US ) AND Language:LEN', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')
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.

Upvotes
4.6k 26 7 22

try

R:LHAG.DE AND LEN

LHAG.DE represents the quote of Lufthansa's shares (LHAG) traded on Xetra (DE). LEN represents English as in Language - English, for news in German use LDE.

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.

So what symbol should I use to get news in English from Reuters original? What kind of string should I use in blank area below?

ek.get_news_headlines(' ', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')

So what symbol should I use to get news in English from Reuters original? What kind of string should I use in blank area below?

ek.get_news_headlines(' ', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')

Upvotes
4.3k 2 4 5

You can do this :

ek.get_news_headlines('R:LHAG.DE and Language:LEN', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')
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.

Thanks for your quick response;

how ever what I really want to do is to get major news headlines not limitied to specific stock name, Lufthansa.

for example : how to get major news on FOMC, FED, US goverments comments?

what kind of ticker I should use to fill the 1 st argument in get_news_headlines?

@pierre.faurel,

@Zhenya Kovalyov


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.