I am getting an error using the ek.get_news_headlines function. Kindly see screenshots attached for error message and the news headline page that I am trying to replicate via the Python API. Thanks.
@benjamin.lee3
Thank you for reaching out to us.
You can try the Refinitiv Data Library for Python instead. I can get three news headlines.
The examples are on GitHub.
Could you elaborate what does P:[] in the search query do? A search for "PRXS" returns an empty dataframe but there were search results on the News Monitor app.
also, what is the difference between ek.get_news_headlines() and rd.news.get_headlines()?
I used the same query string appeared on the News Monitor App. It has "P:" so you may need to contact the helpdesk support team directly via MyRefinitiv to verify the query.
If I remember correctly, ek.get_news_headlines can only get news headlines from News Wire while rd.news.get_headlines can get headlines from other sources.
may i ask where on the News Monitor App could i retrieve the query string?
Hi @benjamin.lee3 ,
In the News Monitor App, when you double-click on News Monitor App's search bar, the query string of the search you're performing in the app will be shown, for example, I double-clicked on the bar (when the arrow is pointing to)
then the query string is shown as P:[Forte Insurance Cambodia Plc], you can copy this string to perform the search with Python code