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

API results return

I try the demo code to download news text.However,no matter How long I set the time period for searching of crude oil news,there only returns 10 results .I guess its the parameter problem.How can I get more news texts?

df = ek.get_news_headlines('Crude', date_from='2019-03-21T09:00:00', date_to='2020-03-21T18:00:00')

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.

Hello @YanHan

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,


AHS


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

Thanks,

AHS

Upvotes
Accepted
10.2k 18 6 9

@YanHan you can add the count parameter - the max is 100:

df = ek.get_news_headlines('Crude', date_from='2019-03-21T09:00:00', date_to='2020-03-21T18:00:00', count=100)

for more detail on how to use the get_news_headlines and get_news_story calls please see my article here - which also explains how to generate the news query. I hope this can help.

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
18.2k 21 13 21

Hi @YanHan

Please see the parameters gor get_news_headlines at https://docs-developers.refinitiv.com/1584818314109/14684/book/en/eikon/index.html#get_news_headlines

So default count is 10.

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.