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.
Best Answer
-
Hi,
By design, News Service doesn't provide more than 100 headlines per request. and raises "HTTPError: 503 Service Unavailable" if count > 100
0
Answers
-
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.
0 -
also, could you please do
print(ek.__version__)
which version does it show?
0 -
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'
1 -
Thanks for your fast reply.
Version is:
0.1.9
I get 288 successful queries. Number 289 throws the error:
HTTPError: 503 Service Unavailable
1 -
I get 288 successful queries. Number 289 throws the error.
0 -
Version: 0.1.9
1 -
@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.
0 -
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?
0 -
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).
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛