Retrieving a time-series of news headlines

hi,

I have recently been migrated to Workspace (from Eikon).

Using a python api, is it possible to retrieve the news headlines over, say, the last 1 year? I would like to ad some filters like, "most impactful"/ "inflation" / "interest rates"/ "country" like US or Japan etc.

I am guessing this was possible using eikon api but can I do that using Workspace api? Any code to get me started would be very helpful


Thanks,

Sumit

Best Answer

  • Hi @sumit ,

    You can collect such data with the `rd.news.get_headlines` function of the rd python library:

    rd.open_session(
        name="platform.rdp",
        config_name="C:/Example.DataLibrary.Python-main/Configuration/refinitiv-data.config.json")
    df = rd.news.get_headlines(
        "R:VOD.L AND Topic:SIGNWS",
        start="2020-01-01",
        end="2020-03-01",
        count=3)
    display(df)

    1713358568542.png


    You can tell what to search in the universe argument via the NEWS2.0 application in Workspace. I looked, for, e.g., "vodafone and significant between 2022-01-01 and 2023-06-01". This gave me the filter "R:VOD.L AND Topic:SIGNWS" (by double clicking the news search bar):

    1713358557823.png

    You may need to login with a platform session for programmatic access to 'old' news (more than 3 months old). To access 'old' news, you will also need a license allowing for this. Please don't hesitate to enquire about this on my.refinitiv.com if needed.

    For technical information on the sessions, please read this article.