When I'm sending a request to extract headlines on Eikon API, I'm limited to 10 lines per request?? Before August, I have no such issue... Thanks for your help.
When I'm sending a request to extract headlines on Eikon API, I'm limited to 10 lines per request?? Before August, I have no such issue... Thanks for your help.
10 is the default requested headline number.
You can modify it with the parameter count :
get_news_headlines(query='Topic:TOPALL and Language:LEN', count=20)
Many thanks for your answer Pierre. It works! But do you know if I have to always put that limit "count". My resquest is on a specific RIC or basket of RIC on a range of time so I don't know the length of my final dataframe. Of course I can enter the parameter "count" equal to 1 000 or higher for example. But it's not the best way of coding....
You're limited to a maximum of 100 news headlines (any request for more than 100 headlines will fail in error).
If you set date_from and date_to to retrieve a limited range of news (less than 100) with count=100, your result will contain all available items.
In following example, the result contains 3 headlines despite the count limit set to 100:
>>> ek.get_news_headlines(query='RENA.PA', date_from='2017-09-16', date_to='2017-09-18', count=100) versionCreated \ 2017-09-17 20:43:24 2017-09-17 20:43:24.000 2017-09-16 06:32:26 2017-09-16 06:32:26.000 2017-09-16 06:06:43 2017-09-16 06:06:47.004 text \ 2017-09-17 20:43:24 Motor racing-Aston Martin wants to be more inv... 2017-09-16 06:32:26 DJ Car Chief Bets Big on Growth -- WSJ<7201.T>... 2017-09-16 06:06:43 McLaren finally cut ties with Honda<7267.T><RE... storyId sourceCode 2017-09-17 20:43:24 urn:newsml:reuters.com:20170917:nL4N1LY0D1:2 NS:RTRS 2017-09-16 06:32:26 urn:newsml:reuters.com:20170916:nDJUP00035:1 NS:DJN 2017-09-16 06:06:43 urn:newsml:reuters.com:20170916:nNRA4hpjek:1 NS:TELGPH >>>
@pierre.faurel if my headlines request has more than 100 results, is there a way to access all of them?
Only by splitting the request into multiple requests and narrowing the time range of each request to ensure there's less than 100 headlines returned for each time window.