Downloading Analyst Reports using Eikon Data API in Python

Hi everyone,
I am trying to download analyst reports using the Eikon Data API in Python, but I am running into issues with both approaches I have tried. Hoping someone here can help!
Issue 1: 500 Internal Server Error for Document Download
The first method I tried was getting the document ID and then using the /documents/download/{documentId}
endpoint to download it. However, when I try to connect this endpoint, I get a 500 Internal Server error. Did I use the wrong parameters in this downloading request? Should I add a path parameter when sending the request? Or does this mean the endpoint is not available? Here is the code I used:
import refinitiv.dataplatform as rdp import pandas as pd rdp.open_platform_session(
Eikon_Data_API_KEY,
rdp.GrantPassword(
username=my_username,
password=my_password)
)
UUID = my_UUID
endpoint_document_download = rdp.Endpoint(
session=rdp.get_default_session(),
url='https://api.refinitiv.com/data/hvmi/v1/documents/download/113543190',
)
response_document_download = endpoint_document_download.send_request(
method=rdp.Endpoint.RequestMethod.GET,
)
print(response_document_download.is_success)
print(pd.DataFrame(response_bulk.data.raw))
Issue 2: 403 Forbidden for Bulk Request
The second method I tried was following a forum demo—first submitting a bulk request, then manifesting the files, and finally downloading them. However, I am stuck at the first step because when I try to submit a bulk request, I get a 403 Forbidden error. The error message shows 'access denied. Scopes required to access the resource: [trapi.data.research.read]. Missing scopes: [trapi.data.research.read]'. Does this mean I do not have access to this endpoint? I can access other endpoints just fine.
Here is the code I used for the bulk request:
import refinitiv.dataplatform as rdp import pandas as pd rdp.open_platform_session(
Eikon_Data_API_KEY,
rdp.GrantPassword(
username=my_username,
password=my_password)
)
UUID = my_UUID endpoint_bulk = rdp.Endpoint(
session=rdp.get_default_session(),
url='https://api.refinitiv.com/data/research/v1/bulk-request',
)
response_bulk = endpoint_bulk.send_request(
method=rdp.Endpoint.RequestMethod.POST,
body_parameters={
"action": "RUN",
"clientUUID": my_UUID,
"jobName": "ZheshangBulk",
"contributors": [
{
"ctbName": "Zheshang Securities Co., Ltd.",
"ctbId": 36351,
"docType": [
"TEXTLINEBREAK",
"TEXTPARAGRAPHBREAK"
],
"dateRange": {
"from": "2011-01-01T00:00:00Z",
"to": "2021-01-01T00:00:00Z"
}
}
],
"notification": {
"jobStart": True,
"jobEnd": True,
"emails": [
my_email
]
}
}
)
print(response_bulk.is_success)
print(pd.DataFrame(response_bulk.data.raw))
Has anyone encountered similar issues? Any insights on whether these endpoints require special permissions or if there is another way to get analyst reports?
Thanks in advance!
Answers
-
Hi @Chenzt ,
I tried to download document with the ID I get from an endpoint /data/hvmi/v1/documents and it works. Could you please verify if the Document ID you are using is valid. I also cannot get the one you mentioned.
Regarding the missing scope, the error indicates that your account don't have permission to access this scope, please talk with your LSEG representative regarding permission granting on your account
1 -
Hey @raksina.samasiri,
Thanks for your response. I see what you mean about the missing scope.
As for the document ID, I think it is valid. Document 113543190 refers to an analyst report by Wedbush Securities Inc. titled "China AI Strategy Setting Up Launch With Alibaba as Partner; Big Step Forward." I can download this report normally without any issues. I have attached a screenshot showing this document ID.
I also tested with other documents, but I keep running into the same problem. Do you have any ideas on what might be causing this?
I would appreciate any insights!
0 -
Hi @Chenzt ,
Have you had a chance to check this thread, it seems the endpoint to be used should be the Research API
Meanwhile, I'm checking with support team about which endpoint to be used (supported team can be contacted via
). I'll keep you updated.0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛