question

Upvotes
Accepted
39 3 2 11

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

eikon-data-apiworkspace#technologypython api
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.

1 Answer

· Write an Answer
Upvotes
Accepted
7.1k 21 3 6

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.


1713358568542.png (47.1 KiB)
1713358557823.png (113.4 KiB)
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.

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.