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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

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

Upvotes
Accepted
6.7k 8 6 7

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

Upvotes
18k 21 12 20

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

Click below to post an Idea Post Idea