Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by jakobyth · Jul 04, 2017 at 06:38 AM · eikoneikon-data-apiworkspacepythonworkspace-data-apirefinitiv-dataplatform-eikonnewserror-503http-error

HTTPError: 503 Service Unavailable: Trying to retrive news stories with Eikon Web and Scripting API

I am trying to retrieve news data with Eikon Web and Scripting API from Eikon Database.

The Headline retrieval works fine but if I try to get news texts I get the following:

     21 for index, headline_row in headlines_summary.iterrows():
---> 22     story = ek.get_news_story(headline_row['storyId'])
     23     stories.append(story)
     24     sleep(0.1)

C:\Anaconda3\lib\site-packages\eikon\news_request.py in get_news_story(story_id, raw_output, debug)
    161     app_id = eikon.get_app_id()
    162     payload = {'attributionCode': '', 'productName': app_id, 'storyId': story_id}
--> 163     json_data = eikon.json_requests.send_json_request(News_Story_UDF_endpoint, payload, debug=debug)
    164 
    165     if raw_output:

C:\Anaconda3\lib\site-packages\eikon\json_requests.py in send_json_request(entity, payload, ID, debug)
     80             if response.status_code == 200:
     81                 result = response.json()
---> 82                 check_server_error(result)
     83                 return result
     84             if response.status_code == 401:

C:\Anaconda3\lib\site-packages\eikon\json_requests.py in check_server_error(server_response)
    128         else:
    129             status_code = server_response['ErrorCode']
--> 130         raise requests.HTTPError(error_message, response=server_response)
    131 
    132     # check DataGrid error

HTTPError: 503 Service Unavailable

I tried to put in some sleeptime. Without success.

Is there a known solution for my problem?

Thanks in advance.

People who like this

0 Show 6
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Joris.Hoendervangers · Jul 04, 2017 at 07:33 AM 1
Share

Running into a similar issue here with Eikon package 0.1.9. This doesn't work:

headlines = eikon.get_news_headlines('R:TRI.TO', count=3)
for index, headline_row in headlines.iterrows():
    story = eikon.get_news_story(headline_row['storyId'])

It produces the following error:

KeyError: 'story'
avatar image
jakobyth · Jul 04, 2017 at 07:34 AM 1
Share

Thanks for your fast reply.

Version is:

0.1.9

I get 288 successful queries. Number 289 throws the error:

HTTPError: 503 Service Unavailable
avatar image
REFINITIV
Zhenya Kovalyov ♦♦ · Jul 04, 2017 at 06:56 AM 0
Share

can you retrieve one headline manually? for instance,

html = tr.get_news_story('urn:newsml:reuters.com:20170524:nIFR1ZFCDP:1')

if yes, how may headlines do you retrieve before 503? Could you print out the index variable during the loop.

avatar image
jakobyth Zhenya Kovalyov ♦♦ · Jul 04, 2017 at 07:50 AM 0
Share

I get 288 successful queries. Number 289 throws the error.

avatar image
REFINITIV
Zhenya Kovalyov ♦♦ · Jul 04, 2017 at 06:57 AM 0
Share

also, could you please do

print(ek.__version__)

which version does it show?

avatar image
jakobyth Zhenya Kovalyov ♦♦ · Jul 04, 2017 at 07:50 AM 1
Share
Version: 0.1.9

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by pierre.faurel · Aug 02, 2017 at 07:31 AM

Hi,

By design, News Service doesn't provide more than 100 headlines per request. and raises "HTTPError: 503 Service Unavailable" if count > 100

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by Zhenya Kovalyov · Jul 04, 2017 at 07:56 AM

@jakobyth, @Joris.Hoendervangers I have escalated this to the product management and will post here once the issue is identified.

On a separate note, the API is not intended for the bulk news story retrieval. Do you have a viable use case? Leave the comments to this answer with your ideas.

Comment

People who like this

0 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
jakobyth · Jul 04, 2017 at 08:03 AM 0
Share

The use case is to retrieve historical financial news on a certain topic and use them for sentiment analysis.

I tried unsuccessfully to export news from the Eikon Client. Had also no success with the Eikon Excel Plug-in.

Is there another way to get historical financial news?

avatar image
REFINITIV
Zhenya Kovalyov ♦♦ jakobyth · Jul 04, 2017 at 08:20 AM 0
Share

While you can definitely use Eikon Scripting API for proof-of-concept work on low amounts of news articles, I suggest that you speak to your customer representative about either Thomson Reuters News Archive (TRNA) or Thomson Reuters Machine Readable News (MRN).

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
11 People are following this question.

Related Questions

How do I apply short-term and long-term filters in Python?

Is it possible to get real time news headlines into Excel?

Eikon Data API for News

Is it possible to retrieve news history with or without sentiment score since 1990 ?

sentiment scores

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges