Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
1 0 0 1

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

#technologypython apinews
1715170402283.png (83.1 KiB)
1715170421347.png (259.5 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.

Upvotes
80.1k 257 52 75

@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.

1715237950847.png

1715237970678.png

The examples are on GitHub.


1715237950847.png (31.5 KiB)
1715237970678.png (101.3 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.

Upvotes
1 0 0 1

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

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.

Upvotes
80.1k 257 52 75

@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.

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.

Upvotes
1 0 0 1

may i ask where on the News Monitor App could i retrieve the query string?

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.

Upvotes
14.4k 30 5 10

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



1715575846831.png (66.5 KiB)
1715575890414.png (26.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.