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 0 0 0

How to include dates into ek.get_news_headlines

Hello, I want to get news data from the 2000s. It seems that I need to use ek.get_news_headlines instead of rd.news.get_headlines. However, I can't figure out how to include dates in my code. It gives an error every time.


For example

ek.get_news_headlines(query='Topic:LSEG and Language:LEN', count=10, date_from='2016-01-20T00:00:00', date_to='2016-02-20T00:00:00')

above code gives

TypeError: datetime64 values must have a unit specified


eikon-data-apiworkspace#technologypython apinews
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.

1 Answer

· Write an Answer
Upvotes
Accepted
84.6k 287 53 77

@handan.celik

Thank you for reaching out to us.

According to the Eikon Data API Usage and Limits Guideline, the news service does have a limit up to 15 months. To get the news from the 2000s, please contact your LSEG account or sales team to discuss alternative solutions.


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.