How to replicate news monitor search result using Python API?

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.1715170402283.png1715170421347.png

Best Answer

Answers

  • 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()?

  • @benjamin.lee3

    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)
    1715575846831.png

    then the query string is shown as P:[Forte Insurance Cambodia Plc], you can copy this string to perform the search with Python code

    1715575890414.png