The following Python API call is only returning 10 news stories which i see is the default amount...

... rather than all of those available since the date_from of 1st Sep. get_news_headlines(query='Partial AND (BUYS OR SELLS)', date_from='2021-09-01T00:00:00')

The following Python API call is only returning 10 news stories which i see is the default amount rather than all of those available since the date_from of 1st Sep.


get_news_headlines(query='Partial AND (BUYS OR SELLS)', date_from='2021-09-01T00:00:00')

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @emmanuel.hernandez

    It returns 10 headlines by default You can use the count parameters to specify the maximum number of headlines retrieved.

        count: int, optional
            Max number of headlines retrieved.
        
            Value Range: [1-100].
        
            Default: 10

    The code looks like this:

    headlines = ek.get_news_headlines(query='Partial AND (BUYS OR SELLS)', date_from='2021-09-01T00:00:00',count=100)
    headlines

Answers