question

Upvotes
Accepted
5 5 5 8

[Eikon Python API] How to retrieve news headlines selecting all available sources/repositories?

Goal: use Python API to download as many headlines as possible related with a given query (e.g. Topic:BRXT NOT Topic:SPO AND Language:LEN), thus increasing the range of sources offered by eikon.get_news_headlines which is only limited to "News Wires" (reference). Ideally, I'd like to download all headlines across all sources for a given query. For example, the following headlines are related with the topic Brexit in June 2016 from the News Monitor in Eikon, including all sources:

Attempt: I've tried to use eikon.send_json_request as suggested here. However, I'm not sure where to find a list of available repository IDs as shown in the example. "GlobalPress" returns a "Backend error. 503 Service Unavailable" while "WebNews" or "NewsRoom" as suggested in the example returns a cryptic message with no headlines:

eikoneikon-data-apipythonworkspacerefinitiv-dataplatform-eikonworkspace-data-apinews
goal.png (130.6 KiB)
cryptic.png (36.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.

Upvotes
Accepted
4.6k 27 7 22

@federico.fontana we are tapping into the undocumented API space, and I am not sure what to recommend since this specific bit of functionality was never exposed by design. I will talk to the product manager about that and ask him to get in touch with you.

In the meantime, the response that you are showing seems to be coming from the news archive. When I request a recent date the response comes back in the expected format. That looks like base64 encoded string, you can decode it with:

import base64
base64.b64decode('your_text')

As for sources, 'NewsRoom' is Global Press, 'WebNews' for WebNews.

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.

Thanks. It would be great to be contacted by the product manager.

Upvotes
7 3 2 1

@deepali.kumar I hope this thread may help you for your query.

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.