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
Accepted
1 1 1 1

API to get "Important and Most Recent" news headlines

Hi,

Is there a way to pull only important news headlines using ek.get_news_headlines() api call in python?

Thanks so much,

news-filter
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.

Upvote
Accepted
32.2k 40 11 19

Hello @zliu ,

Please see Eikon Data APIs for Python - Reference Guide section get_news_headlines.

I think you are looking for something like:

ek.get_news_headlines(query='Topic:TOPALL and Language:LEN', count=10, 
date_from=None, date_to=None, raw_output=False, debug=False)

Where TOPALL is top, most important news, and count=10 is 10 most recent 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
17k 80 39 63

Hi @zliu

As outlined within the Eikon Data API documentation, the get_news_headlines() API provides the most recent top news headlines by default. Specifically:

get_news_headlines(query='Topic:TOPALL and Language:LEN', count=10,
date_from=None, date_to=None, raw_output=False, debug=False)
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
14k 30 5 10

hi @zliu ,

This article demonstrates how to retrieve Top News Energy headlines and stories using Python code with Eikon Data API, feel free to check it. Plus, to get other queries for top news, you can type "top news - " on the Eikon search bar to see that which keyword can be used

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.