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 0

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

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.

@emmanuel.hernandez

Thank you for your participation in the forum. Are any of the replies below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply that best answers your question. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your 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
79.2k 251 52 74

@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
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
24.7k 54 17 14

Hello @emmanuel.hernandez

Additionally, you can find more parameters detail from the Eikon Data APIs for Python - Reference Guide document.

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.