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')

Best Answer

  • jason.ramchandani01
    Answer ✓

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

Answers