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 1

ek.get_news_headlines giving empty df for any query

I am getting any empty data frame result each time I query news headlines using the python API:

Empty DataFrame

Columns: [versionCreated, text, storyId, sourceCode]

Index: []


I have used working queries extracted from the forum and Yves's repositories but all result in an empty data frame.

rics = [

'AAPL.O', # Apple stock

'AMZN.O', # Amazon stock

'TSLA.O', # Tesla stock

'.SPX', # S&P 500 stock index

]


news = ek.get_news_headlines('R:%s PRODUCTION IN ENGLISH' % rics[2],

date_from='2018-02-01',

date_to='2018-02-14',

count=10

)

df = ek.get_news_headlines(query="R:PGA190 AND \\\"summary\\\" AND \\\"regrade\\\" AND \\\"deals\\\"")

news = ek.get_news_headlines('R:.SPX "TRUMP" Language:LEN',

date_from='2020-02-01',

date_to='2020-05-28',

count=100

)


eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question. Thanks, AHS

@wyczolko

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
18.2k 21 13 21

Hi @wyczolko

Please update the API version to 1.1.5

pip install eikon --upgrade

And please try this code:

news = ek.get_news_headlines('R:TSLA.O AND \\"PRODUCTION\\" AND Language:LEN', date_from='2019-05-27', date_to='2019-06-09', count=100)

news

Please note that news is available from 15 months ago to today.




ahs.png (64.0 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.