Hello Team, hope you're all okay today. Could you please advise if this supported in API (as client is requesting to download News Monitor through API via R program)? Thanks in advance.
Hi @Jaja , Yes and thank you for reaching out!
To my knowledge, our data can be consumed through API via Python, .NET or TypeScript only. Currently, we do not support R language. If any help is required using the above language, please continue on this thread and we would be happy to support : )
Thank you!
Thanks a lot for the immediate update @Ujjawal_Khandelwal Have a great day!
@Jaja
As my colleague mentioned, we do not provide an R library.
The client may try the third-party library RefinitivR but but please note that we do not support this library.
According to its documentation, the package can retrieve news headlines using a news query, which is the same type of query used in the News Monitor.
Hi @Jaja , While we do not support R, the same News services can be accessed using the LSEG Data Library, which is available in Python, .NET and TypeScript. My colleague has shared the available 3rd party alternatives if the client prefers R program, but it is quite easy to mirror the News Monitor app using our supported languages.
Below is a short sample of how I get news headlines using the Python Library:
Method1: Define the universe directly using RICs.
import lseg.data as ld ld.open_session() RICs = ['AAPL.O', 'INFY.NS'] news_method_1 = ld.news.get_headlines( query=RICs, count=5 ) print(news_method_1) ld.close_session()
Method 2: Use the query string from your News Monitor app instance. In the News Monitor: - Double‑click the search bar - It reveals the internal query used by the application - Copy that query and use it directly in get_headlines() This gives you results that closely match what you see in the News Monitor UI.
import lseg.data as ld ld.open_session() news_monitor_query = "R:AAPL.O OR R:INFY.NS" #copied from news monitor news_method_2 = ld.news.get_headlines( query=news_monitor_query, count=5 ) print(news_method_2) ld.close_session()
More such detailed examples (along with streaming) can be found within the Codebook app (search CODEBK on Workspace) and navigate to Examples -> 01. Data Retrieval and Discovery -> 01.01. LSEG Data Library.LSEG Developers Portal is another great resource for reference with in-depth documentation, tutorials and examples.
Hello @Jaja
I would like to add some information on my colleague updated above. You can find more detail regarding each edition of the Data Library from the following links: