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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
18k 21 12 20

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea