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.

Best Answer

  • pf
    pf LSEG
    Answer ✓

    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')

Answers